Eric Olsen
2014-09-02 15:26:37 UTC
More information below, the tl;dr is: which do you think would be more
efficient to keep a hard drive out of suspend only during waking hours, but
allow it to spindown when it's highly unlikely to be used? Also, are there
any side-effects I should be aware of (ie, if I use hdparm daily will it
break something pretty quick)?
option 1 - cron job to ls the drive every 1/2 hour (give-or-take depending
on the suspend timer)
option 2 - cron job to use hdparm to disable suspend during the day but
enable it at night
option 3 - just hdparm to disable spindown and leave the drive running all
night (I'd rather avoid this one, it seems it would decrease the life of
the drive a bit)
or any alternative options I haven't thought of?
(more info below)
Thanks,
Eric
More information:
I have a NAS with a USB-HDD attached to it, that drive goes into
suspend/spindown and takes longer to wake up than my wife cares for (It
takes maybe 10 seconds when I use Samba or ls to access it, but she uses
XBMC to connect to it via NFS, so maybe something in that combination
causes it to take longer? She claims it takes about 2 minutes).
My first thought was to use a cron job to ls the drive as a keep-alive
action, trigger the suspend to wait another 1/2 hour then do it again in
1/2 hour - I do worry that this might not be timed right, and I may be
letting it spin-down and then minutes later spin-up every 1/2 hour, that
doesn't sound like a good idea to me. After setting that up, I wondered if
it might be any better to just use hdparm to set the suspend timer, but I
didn't want to leave the drive spinning 24/7 so I considered using cron to
use hdparm to keep the drive awake during the day, but allow it to sleep if
unused at night. My concern here is that I don't know what hdparm modifies
exactly, but if it's a chip on the drive for example, I would worry about
how many times the chip could handle being written to.
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/
efficient to keep a hard drive out of suspend only during waking hours, but
allow it to spindown when it's highly unlikely to be used? Also, are there
any side-effects I should be aware of (ie, if I use hdparm daily will it
break something pretty quick)?
option 1 - cron job to ls the drive every 1/2 hour (give-or-take depending
on the suspend timer)
option 2 - cron job to use hdparm to disable suspend during the day but
enable it at night
option 3 - just hdparm to disable spindown and leave the drive running all
night (I'd rather avoid this one, it seems it would decrease the life of
the drive a bit)
or any alternative options I haven't thought of?
(more info below)
Thanks,
Eric
More information:
I have a NAS with a USB-HDD attached to it, that drive goes into
suspend/spindown and takes longer to wake up than my wife cares for (It
takes maybe 10 seconds when I use Samba or ls to access it, but she uses
XBMC to connect to it via NFS, so maybe something in that combination
causes it to take longer? She claims it takes about 2 minutes).
My first thought was to use a cron job to ls the drive as a keep-alive
action, trigger the suspend to wait another 1/2 hour then do it again in
1/2 hour - I do worry that this might not be timed right, and I may be
letting it spin-down and then minutes later spin-up every 1/2 hour, that
doesn't sound like a good idea to me. After setting that up, I wondered if
it might be any better to just use hdparm to set the suspend timer, but I
didn't want to leave the drive spinning 24/7 so I considered using cron to
use hdparm to keep the drive awake during the day, but allow it to sleep if
unused at night. My concern here is that I don't know what hdparm modifies
exactly, but if it's a chip on the drive for example, I would worry about
how many times the chip could handle being written to.
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/