Enable USB hard disk spin down?

If your problem doesn't fall into one of the other categories, report it here.

Moderator: Moderators

Post Reply
Nilist
Posts: 11
Joined: Tue Nov 15, 2011 8:41 am

Enable USB hard disk spin down?

Post by Nilist »

Using a TP-WR1043 router and quite happy with the stock firmware EXCEPT that it does not spin down my external Seagate FreeAgent 2TB drive. Since the drive is only used for backup and otherwise gets quite hot while running, I would like it to spin down after 5-15min without access.

I was therefore hoping that Gargoyle would help me, but unfortunately not:
I have set up the drive with the Seagate tools to spin down automatically after 3 min. When the router is turned on, the drive stops OK after 3 mins, but restarts itself after less than 1 min and never stops after that.
Since Gargoyle is based OpenWRT and there is an option in LuCi to set the spin down time, maybe a kind soul could explain how to do this in Gargoyle (since I would really hate to go to OpenWRT. LuCi is killing me...)
Last edited by Nilist on Tue Nov 15, 2011 11:02 am, edited 1 time in total.

behappy
Posts: 84
Joined: Thu Mar 31, 2011 5:06 pm

Re: Force USB hard disk spin down?

Post by behappy »

Try this
- copy the file to /tmp
- run opkg install sdparm...
- config it using Google for parameters

Nilist
Posts: 11
Joined: Tue Nov 15, 2011 8:41 am

Re: Enable USB hard disk spin down?

Post by Nilist »

Thanks, Unfortunately the reason I am looking at Gargoyle is that I'm a total Linux novice and had hoped to stay that way...
The guys over at dd-wrt have discussed this extensively, and it could be that hdparm is the way to go. Again, it would require me to take a stab at Linux.
There seems to be several ways to get the drive to spin down, but interestingly enough my Seagate enclosure is supposed to do it autonomously. That seems to work fine on a windows PC, so I am wondering what is keeping the drive awake on the router? It is not user access to the disk...

Nilist
Posts: 11
Joined: Tue Nov 15, 2011 8:41 am

Re: Enable USB hard disk spin down?

Post by Nilist »

OK, have played around a bit and gotten wiser:

Initially I tried using the build in timer and the drive would spin down once and then spin up after less than a minute.
Have now installed hdparm and hd-idle, and both can spin the drive down after the time set (I use 10-30s for the testing), but the drive spins up within a minute. It will run for a couple of minutes and then spin down for a short while again. There is no external data access during that periode.

I am beginning to suspect that something (samba?) is accessing the drive on a regular basis and thus preventing it from spinning down for a longer time which is really what I desire (it is a backup drive that will only be accessed a couple of times per week by various computers on the network, so keeping it running will only shorten the lifespan).

Any ideas how to identify which process is causing the disk to spin up again?
And of course how to prevent that from happening?

Nilist
Posts: 11
Joined: Tue Nov 15, 2011 8:41 am

Re: Enable USB hard disk spin down?

Post by Nilist »

A bit more browsing, and it could be that I need to modify the samba settings in /etc/samba/smb.conf

http://www.nslu2-linux.org/wiki/FAQ/Spi ... BHarddisks

Problem is that Gargoyle overwrites whatever changes i make on next boot. Suggestions?

Nilist
Posts: 11
Joined: Tue Nov 15, 2011 8:41 am

Re: Enable USB hard disk spin down?

Post by Nilist »

OK, after several evenings fighting with this, the conclusion is that the problem lies with the Seagate FreeAgent Desktop 2TB enclosure, not with Gargoyle/OpenWRT.
I plugged in a Hitachi Touro Mobile 750GB drive and it spins down as directed by hdparm and stays that way until the disk is accessed.
The Seagate drive will always spin up regardless if samba is running or not...

Post Reply