What's new

Make USB HDD sleep when not in use

  • 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!

sammyano

Senior Member
Guys, Is there any away (script) to make attached 1TB WD go to sleep when not in use?
PS - I have Asus Download Master installed

thanks
 
Guys, Is there any away (script) to make attached 1TB WD go to sleep when not in use?
PS - I have Asus Download Master installed

thanks

Tools -> Other Settings.
 
Thanks, please which of these are for making it sleep when not in use

Disk spindown idle time (in seconds)
0 = disable feature
Exclude the following drives from spinning down - sda sdb sdc sdd sde sdf sdg sdh sdi
 
Thanks, please which of these are for making it sleep when not in use

Disk spindown idle time (in seconds)
0 = disable feature
Exclude the following drives from spinning down - sda sdb sdc sdd sde sdf sdg sdh sdi

The settings should be fairly straightforward here. Enter how many seconds in idle before the disk will spindown, and select any disk you wish to exclude from spinning down. Not sure how more simpler I could explain it, sorry.
 
The settings should be fairly straightforward here. Enter how many seconds in idle before the disk will spindown, and select any disk you wish to exclude from spinning down. Not sure how more simpler I could explain it, sorry.

Rmerlin what is the standard behavior of the router without using this option?
 
Rmerlin what is the standard behavior of the router without using this option?

The router itself won't do anything. It will be up to your hard disk's own firmware to spin down if it supports it.
 
Sorry for taking out this post from the graveyard. But I prefer use it to have all the info in the same thread.

I have an old western digital external usb hard disk and the option "Disk spindown idle time" seems to be not working.

I know my hard disk doesn't have the option to fully spindown by himself, but it has the option to low the speed of the motor (hdparm -M).

The same hard disk was running perfectly and reduce the spins when idle with my old router Buffalo WZR-HP-G300NH (which was one of the first routers with usb port and torrent downloader).

I want to know how the merlin firmware it's doing this action. It runs hdparm ? I tried to modify the settings of the kernel but it seems the power manager module was note selected while compiling the kernel.

Anyway to use autofs? Autofs should mount the device when required and it will umount the device when idle. As i know all the USB devices (hardisks, pen drives, ...) go to idle mode when unmounted.
 
want to know how the merlin firmware it's doing this action. It runs hdparm ?

It's done through the sd-idle daemon, which will send a STOP command to the HDD controller if it sees there hasn't been any disk i/o for the configured period of time. It will be up to the USB controller to decide what to do when it receives that command.
 
In my configuration the usb hdd don't goes to sleep with the sd-idle.

I don't know if it's a problem with the command or usb controller, or a problem related with the torrent downloader. I read something related to this, the apps seems to be installed on the hdd and they do not allow the usb drive to enter the sleep mode . My torrent downloader doesn't has nothing to download or to share so I think it should close himself and leave the hdd enter the sleep mode. Any tip for this?

I saw the autofs filesystem it's not compiled on the kernel, please add it in the next beta build and I will try if it works better than the sd-idle daemon.
 
I saw the autofs filesystem it's not compiled on the kernel, please add it in the next beta build and I will try if it works better than the sd-idle daemon.

Changing kernel options isn't always possible, as any change that causes a change in symbol versions would prevent the kernel from loading the closed source modules.
 
the WD HDDs(i have a newer one myself) have a firmware[accessible via SATA(also via SATA-USB adapter possible, as with me)], where the hard disk can turn itself off
you can change(or deactivate) with WDIDLE3 the timer of the HDD(the hard disk must be connected to a computer on which WDIDLE3 is installed)[but Google itself]

The setting remains so until it is changed again, so handle with caution.
 
Last edited:
Hi BlackMage, it seems the wdidle3 only changes the time some WD hard disks wait to park the heads. As the official Western digital webpage says it can only be changed with some hard disks [1]. On this other forum I read more information about the Green WD and Red WD hacks to change the time to park its heads [2], but I'm asking for a more universal way to send to sleep all the hardisks in the market. The perfect way IMHO should be the autofs because usually all the usb pendrives, or hard disks do a full spin down when they're unmounted(*nix)/ejected(win).

As RMerlin said, to add autofs kernel module we need Asus add it to the official kernel of our routers, because developers of Merlin firmware cannot add new modules to the kernel due to some binary modules the official kernel uses.

[1] http://support.wdc.com/downloads.aspx?p=113
[2] https://forums.freenas.org/index.php?threads/hacking-wd-greens-and-reds-with-wdidle3-exe.18171/
 
Maybe a silly question: What happens if I set this spin down to a Pendrive? Does it harm it, should I exclude from the list?
 
Try it, it won't harm your pendrive. If it works your pendrive should become cooler.
 
I know this is a very old thread, but recently my USB 3.0 HDD connected to AC1900P has been refusing to go to sleep. I am very sure that it worked on AC66, AC87, AC1900P over the years, but not sure when this problem started. Only major change on current setup has been upgrade to 384 branch a month ago.

It was not something to do with settings, sd-idle in log showed all the right messages, only HDD was not actually spin down. (I usually put my hand on the HDD to check)

It was solved by enabling and setting the Advanced Power Management value to 1.

It got disabled somehow, reason unknown.
The HDD never left AC1900P after initial installation and I have never used hdparm on the router before yesterday. (I installed hdparm yesterday via entware) So I have no idea how this happened.

You can check Advanced Power Management status with this command, (/dev/sda1 is my HDD, check yours with 'df' command)

hdparm -I /dev/sda1
hdparm -B /dev/sda1

if Advanced Power Management is disabled, then assign a value to have HDD sleep feature working.

hdparm -B 1 /dev/sda1

The actual value must be something between 1 and 126, not really sure about the difference, please refer hdparm manual for that. Of course you need to enable HDD Sleep feature in Web GUI too.

Warning: the man page says too aggressive (too low) value may damage the HDD. (I only access my HDD a few times a week, so I consider 1 is not that aggressive.)

Further test shows that this does not survive reboot. Please help.
 
Last edited:
Hi all, I've set the time to spin down to 60s and the seagate goflex 2Tb (USB3) spun down fine, but it won't spin back up which I presume should happen automatically whenever I access the drive, e.g. from the Mac finder (tested this by trying to create a new "test" folder but I got an error message saying it could not connect to the drive). I have CCC backing up to the HDD (using disk image) so I want to be sure that the HDD will spin back up when the backup task is due to start in the future.
Is there something I'm not doing?
I'm on Merlin's 384.6 on AC86U.
Many thanks
 
Last edited:

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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