Beiträge von FabrizioMaurizio

    Hi!
    I removed the disk (a WD green) from the WD Elements enclousure and I attached it to a usb to dual sata adapter (JMS561u) connected to a rock64. The disk appears in the "disks" section but not in the "file systems" one. The disk is formatted with ext4 and contains data so I would prefer to avoid formatting it if possible.


    I need to test this more but I think SMART was causing the disk to spin up. Anyway, I need to change the default spindown time for the hd622 (which currently is 10 minutes) to something higher like 60 minutes. I tried hdparm and hd-idle but neither of them work. Can anyone suggest a solution (changing the hd622 for something else is also an accepted solution)?

    Again on this matter, I tried flashing the firmware for the cloudshell2 on the hd622 and as expected it didn't work since the cloudshell2 has the JMS561 chip and the hd622 has the JMS561u chip. However, changing the spindown timer using the jms561fwupdater worked just fine.



    Code
    ./JMS561FwUpdate -d /dev/sda -t 30


    "hdparm -C /dev/sda" still doesn't work: it returns "drive state is: standby" even if the drive is active. Can anyone tell me what are the implications of this?

    I need to test this more but I think SMART was causing the disk to spin up. Anyway, I need to change the default spindown time for the hd622 (which currently is 10 minutes) to something higher like 60 minutes. I tried hdparm and hd-idle but neither of them work. Can anyone suggest a solution (changing the hd622 for something else is also an accepted solution)?

    On this matter, I bought this cheap adapter with the jms578 chipset. I flashed the firmware for the odroid HC2 and everything seems to be working perfectly!



    Code
    root@rock64:~/JMS578FwUpdater# ./JMS578FwUpdate -d /dev/sda -v                                                                                               
    Bridge Firmware Version: v173.1.0.2                                                                                                                          
    root@rock64:~/JMS578FwUpdater#

    Changing the drive spindown time using the GUI also works but a full power cycle is needed for changes to be applied. I'm very pleased with this thing.

    Hi! Update. This is what happened. First thing I noticed that the issue had a pattern: the HD was being waken up every 15 minutes. Then I noticed that even with all the components active (smb, docker, SMART, ecc.), a simple reboot was fixing the issue... for a day. The next day the issue was coming back again. I then deactivated every component one by one with a reboot and a day of waiting in between. And I finally found the culprit: the transmission docker. I simply reinstalled it and now it looks like it's all working fine. Thanks for the help!

    Sorry for bothering you guys again but I'm still having this issue :( . This time with smb deactivated. iosnoop shows that this caused by "sync". Any idea what could it be?


    Code
    mmcqd/0      170    WFS  179,0    163968       4096       0.85                                                                                               
    mmcqd/0      170    WS   179,0    294912       4096       0.69                                                                                               
    mmcqd/0      170    FWS  179,0    18446744073709551615 0          0.16                                                                                       
    sync         18922  FWS  8,0      18446744073709551615 0       6970.21                                                                                       
    mmcqd/0      170    WS   179,0    3827584      32768      1.31                                                                                               
    mmcqd/0      170    WS   179,0    4351872      32768      2.00

    This happened again but this time "smbd" was present among the processes in iosnoop.


    Code
    smbd         2911   RM   8,16     5033242544   4096    6922.81                                                                                               
    kworker/0:1H 383    WS   8,16     3905925968   28672      0.33                                                                                               
    jbd2/sdb1-62 622    FWS  8,16     18446744073709551615 0         70.79                                                                                       
    <idle>       0      WS   8,16     3905926024   4096       0.22                                                                                               
    <idle>       0      FWS  8,16     18446744073709551615 0         24.96


    I wasn't using using smb at the moment and the only other device that has access to the share is my nvidia shield tv so it must be it.
    "find /sharedfolders -amin -1" showed a bunch of random directories.




    I think the reason "smbd" didn't show up ealier is because I run the iosnoop command after the drive woke up. I forgot to mention that, my bad.
    However, I'm pretty sure I have seen the drive woke up without any activity shown in iosnoop in the past, so I'm not excluding SMART yet.

    Ok, I hear you. I just realized that pine64 charges 12$ for shipping so their cable is not an option anymore :) . I think I'm going to try my luck on amazon and buy something with the jms578 chip. At worst I can return it.


    Meanwhile my drive has been randomly waken up by jbd2:


    But if I understand correctly your problem is your disks spinning up while they shouldn't

    That was my initial problem but I think I figured that out. I think it was caused by SMART, not 100% sure though. My problem now is that the disk spins down after only 10min of inactivity and there seems to be no way of increasing that. I can settle for an adapter that doesn't work with hdparm but has a higher spindown time by default. Do you happen to know what is the factory spindown time for the pine64 adapter?

    Update: I've hooked up the hard drive to my desktop pc but unfortunately it can't be detected. I'm guessing it's because the pc is running windows and the drive is formated in ext4. I don't think it's worth wasting time trying to workaround this problem since I'm pretty sure this won't solve my issue which is raising the spindown time.


    I've asked on the pine64 forum if their usb to sata works with hdparm but I've got no answer. @tkaiser I noticed you reviewed it, can you please tell me if hdparm works as intended with it?

    Yeah I've read about that. I tried idle3 to query the parking time but it doesn't work. I guess the hard drive must be attached to a sata controller and not a sata to usb adapter.
    However, I've read that the low head parking time was only an issue on the early versions of the reds and greens and that WD are selling reds with 300 seconds head parking time from factory. I noticed that roughly 5 minutes after the disk wakes up, the disk makes a click noise. That might be the head parking noise. The disk continues spinning for another 5 minutes and then it goes to sleep.
    I'm gonna give the WD utility a shot for confirmation after the backup is done.
    I'm afraid that the spindown time is handled by the sata to usb adapter and it cannot be changed. Thus, I need to buy a different one. I'm also afraid I need to settle for a single sata port. Can you recommend me one?

    I need to test this more but I think SMART was causing the disk to spin up. Anyway, I need to change the default spindown time for the hd622 (which currently is 10 minutes) to something higher like 60 minutes. I tried hdparm and hd-idle but neither of them work. Can anyone suggest a solution (changing the hd622 for something else is also an accepted solution)?


    Edit: Solution at post 28.

    I think the issue is gone. I renamed "parted", disabled smb and deleted the active rsync jobs and then the issue disappeared. I then undid each change one by one to find the culprit but the issue never came back. So now it's gone but I don't know what has caused it in the first place. I have the smb share mounted on my nvidia shield so it could have been that even though I'm pretty sure there wasn't any smb activity on iosnoop. Oh well at least it's gone. Thank you all for your time.

    The user in this thread also had the same issue I'm having and he managed to find out what was causing it. But I didn't quite catch how he managed to do that.


    Well, I was digging a little bit deeper into the system and disabled temporarily the services collectd and monit. But this wasn't the clue.
    Then I read the great how to including test script in the following thread:
    My Guide to Debugging Disk Spin-ups


    So I have found, that "parted" was checking my devices over and over again. Unfortunately I was not able to discover which process was triggering parted. I've simply disabled the system tool via renaming it inside /sbin.


    I'm still curious, what's behind this process. So if anybody has an idea I'd be glad to read it here..

    There's a general problem since Windows uses different 'new line' characters compared to Unix/Linux

    That was the issue. Luckily notepad++ allows to choose the new line character, so that was an easy fix.


    Create a different directory than / (which is root) for scripts e.g. "/scripts", copy the script to this folder and chdir to this folder: "chdir /scripts".

    Thanks for the advice!


    So first I'd try to disable everything on the page for "Physical disk properties".


    If a HDD is spun down, then running a SMART test on it may spin it up. So disable any and all SMART tests. Or possibly set a long interval between tests. Like 24 hours.

    Ok, so I disabled everything in "Physical disk properties", turned off SMART and rebooted. Then I run the find_culprit script and it looked like it was working.


    Code
    root@rock64:/scripts# ./find_culprit sda                                                                                                                     
    Putting the disk sda into standby...                                                                                                                         
    Checking the status of sda.                                                                                                                                  
    Drive is still in standby.  Sleeping 45 seconds...                                                                                                           
    Drive is still in standby.  Sleeping 45 seconds...

    But when the disk woke up, the script didn't show any message, it kept saying "drive is still in standby". I then ran hdparm -C /dev/sda and it also reported the drive to be sleeping even if it actually was active.


    Code
    root@rock64:~# hdparm -C /dev/sda                                                                                                                            
    /dev/sda:                                                                                                                                                    
     drive state is:  standby

    Hi!
    I just finished building my first nas with a Rock64 with emmc, one 3tb WD elements external hard drive, one 4tb WD red with the HD622 board.
    The issue I'm having is that something wakes up my drives and I can't figure out what is it. I'm using a new installation of OMV from sourceforge with omv extras, flashmemory, shell in a box, docker (with no containers for now), smb and ssh running.
    Changes in the "Physical disk properties" seem to have no effect (I tried setting spindown time to "disabled" but the disks are spinning down anyway). I'm guessing that the usb to sata controllers have spindown built in and it can't be changed in OMV. Anyway, I'm not really interessed in turning it off, I just want to know why the disks spin back up for no apparent reason.
    I currently have S.M.A.R.T. enabled (check interval: 1800, power mode: standby). I tried disabling it but that didn't work. I tried with iosnoop but nothing came up.


    I found this thread but I can't get the script to work:


    Code
    root@rock64:~# ./find_culprit.sh sdb                                                                                                                         
    -bash: ./find_culprit.sh: /bin/sh^M: bad interpreter: No such file or directory

    I'm new to Linux so I must be doing something wrong. What I did was: create the file "find_culprit.sh" with notepad++ on windows and move it to /root using filezilla, chmod 755 find_culprit.sh, ./find_culprit.sh sdb. Again, I don't know if this is the right way to do it but this is what I figure out and it took me a long time to do so because I'm a total noob :) .
    I also found this thread where this user had the same issue I have and managed to track it down to "webmin". I have never heard of webmin and I am pretty sure I haven't installed it on my system.


    I'm looking for some tips.


    Thanks!

    The plan was to use the wd red as the "main" drive that never gets unplugged and the wd elements as a "secondary" drive that I can carry around if I need to. But this is my first Nas so I don't really know what the best practices are. Anyway, if you say I can run into issues then I will use a linux file system and leave the drive in a fixed position.

    There is no should. Whatever works is OK. Most likely the most efficient way to copy the files would be if both HDDs are connected to the same Linux computer over SATA. But if you are not in a hurry then you can most likely do the transfer over the network or with one or both HDDs connected using USB. Even over USB 2.


    Linux computers can read and write windows filesystems. But it is much more difficult for a windows computer to read a Linux file system. It is like the Americans or British speaking a second language or not...


    But using a Linux file system on a Linux computer is much faster than using a windows file system.

    If speed is the only issue that means I don't really need to change the file system because that drive is going to be attached to a USB 2.0 port so that is going to be the bottleneck anyway. At least with the NTFS I have the flexibility to unplug the drive and use it with a windows machine if I need to. I was worried that the files could get corrupted if used with linux.