What's new

Spinning down HDD

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

gjf

Senior Member
Hi all!

I am using Merlin's 376.47 on my AC68U. I have ST1000LM 024 HN-M101M connected via USB 3.0 to my router.

When it's quiet in the night I can hear periodical spinning up and spinning down of HDD (about every 2-3 minutes). I am pretty sure there isn't any download or other active jobs to make my HDD work.

There are some string in the log I found strange:
Code:
Oct  5 20:25:12 sd-idle-2.6[456]: spinning down /dev/sda
Oct  5 20:25:12 kernel: usblp0: removed
Oct  5 20:25:12 kernel: usb 2-2: reset high speed USB device using ehci_hcd and address 3
Oct  5 20:25:12 sd-idle-2.6[456]: Failure to open /dev/sda for spinning down: No medium found

Can anybody tell me is such periodical spinning up and down normal ("by design") or it is a bug? I am not an expert but I cannot understand what is the use of working HDD when it is not necessary.
 
HDD spindown support is always hit-or-miss, based on the disk model and the USB enclosure itself.

If the disk keeps spinning back up, then I recommend not using the spindown feature, as it will indeed reduce the HDD's life.
 
Hey, @RMerlin, looks like I cannot disable it!
I go to Tools - Other Settings and put "0" in "Disk spindown idle time (in seconds)".
Anyway I clearly can hear spinning up and down.
What am I doing wrong?
 
Hey, @RMerlin, looks like I cannot disable it!
I go to Tools - Other Settings and put "0" in "Disk spindown idle time (in seconds)".
Anyway I clearly can hear spinning up and down.
What am I doing wrong?

Then it means it's the hard disk's own firmware also doing it, not just the router (the log you posted did say that it was sd-idle on the router doing it). This is common with WD's Caviar Green disks for instance (you need to use a special WD tool to disable its aggressive power management). This could be the case with other products from other manufacturers too.

These disks are typically not meant to be kept running 24/7, or for frequent random accesses.
 
Do you have Download Manager enabled? If so that may be the problem. Try disabling it.

I had a similar problem where my USB3 HDD kept spinning up after just 30 secs. Disabling DM fixed the problem for me.
 
It's interesting, but abwyatt was absolutely right - I have disabled Download Manager and spinning down starts working OK.

But why? Download Manager had no jobs, so I wonder why it starts spinning up HDD periodically?
 
Have no idea why it happens. It seems to have happened at 376.44 when a new filesystem driver provider for NTFS/HFS+/FAT was introduced. Before that, you could leave DM enabled and the HDD would stay asleep when no tasks were downloading.

It's a slight inconvenience to have to disable and enable DM. Perhaps Merlin could have a look at it when he has time.
 
Have no idea why it happens. It seems to have happened at 376.44 when a new filesystem driver provider for NTFS/HFS+/FAT was introduced. Before that, you could leave DM enabled and the HDD would stay asleep when no tasks were downloading.

It's a slight inconvenience to have to disable and enable DM. Perhaps Merlin could have a look at it when he has time.

yes I noticed this too, the new filesystem driver also have problems with 4TB hard drives. I had to roll back to 374 because of all the bugs.
 
yes I noticed this too, the new filesystem driver also have problems with 4TB hard drives. I had to roll back to 374 because of all the bugs.

I only have a 1TB WD Passport HDD, so can't attest to large HDDs. Apart from this spinning up problem, I can say that I am very happy with 376.44. It has been absolutely stable for me with no other bugs that I know of - 14 WiFi clients on both bands and a PPTP WAN.
 
Hi, I'm using 376.48_beta2 and my drive is not spinning down. I don't have DM installed, and I've disabled all services including minidlna and samba.
I'm using an USB 3 enclosure from Orico, with a WD drive.

Oct 31 10:35:14 sd-idle-2.6[470]: spinning down /dev/sda
Oct 31 10:37:44 sd-idle-2.6[470]: spinning up /dev/sda after 2 mins 30 secs

It's in the log but not actually spinning down.

On windows I can spin down the drive manually with HDDScan.

Is there a command I can try to manually spin it down? Maybe with different parameters.

Please advise. Thanks.

EDIT: I will buy a new enclosure, comfirmed to be spinning down, Icy Box IB-254U3. Hope this solves the problem.

EDIT 2: This new enclosure supports UASP, does the router/firmware support it?
 
Last edited:
EDIT 2: This new enclosure supports UASP, does the router/firmware support it?

No, it doesn't. Linux only got working support for this about a year ago, long after the release of the kernel used by Asuswrt.
 
Ok, the Icy Box IB-254U3 experiment was a disaster, I've received a defective unit and ended up corrupting my NTFS partition beyond repair.

Back to the initial question, given that with my Orico enclosure the HDD spins down/up when I send the command with HDDScan-3.3 from Windows, I want to make it work on the AC56U.

It seems scsi-stop doesn't work with my enclosure so I've installed hdparm with ipkg.

I've played a bit with hdparm and here are my findings:

Manually putting the drive in standby/sleep worked with hdparm -s/-S but setting the automatic spin down interval had no effect until I set the APM power management value to a value under 128 (hdparm -B 120).

So setting the spin down and APM values to 120 results in auto standby after 10 minutes. How do I make these settings persistent?

Where should I place the hdparm.conf file so it keeps the values after reboot? ipkg is installed on the usb drive (which is spinning down). Should I place the conf file here somewhere? Should I use a separate flash drive for the asusware.arm folder?

Config content:

/dev/sda {
apm = 120
spindown_time = 120
}

Instead of config, should/can I use something like this?

/etc/udev/rules.d/50-hdparm.rules
ACTION=="add", SUBSYSTEM=="block", KERNEL=="sda", RUN+="/usr/bin/hdparm -B 120 -S 120 /dev/sda"

OR should I just create a script in /jffs/scripts to run the two commands? Seems to be running if I put it in post-mount, is there a better location as I have two partitions so I think it is called twice. It didn't work with services-start.

Thanks!
 
Last edited:
I have noticed small bug.
When my asus work as a "Repeater mode" spinning down doesn't work (tested on 374.43 & 378.50)
When works as a "Router mode" spinning down works well.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top