Originally Posted by hedron
I have a few hard drives run by a linux partition opened by WM Ware as samba share in Windows. I hope that makes sense to you guys.
But the hard drives are always in sleep mode everytime I turn on the computer(I always hibernate) and this leads to programs that depend on them to lock up.
I'm wondering is how I would go about keep them out of sleep mode in a cron script or something. I've looked at hdparm, but it doesn't seem to do what I want to do, and I'd prefer something higher level anyway.
I use hdparm to set the desired timeout for spindown on my nas PC drives.
workdir="$( cd "$( dirname "$0" )" && pwd )"
disklist=`ls /dev/sd* | egrep "/dev/sd[a-z]+$"`
for disk in $disklist
# hdparm -S0 $disk #> /dev/null &
hdparm -S242 $disk #> /dev/null &
# hdparm -S 241 $disk #> /dev/null &
S0 means no spindown
S241 meand 'after 30 minutes"
S242 means "after one hour"
Check the hdparm manpage.
Hope this helps. I am not sure it does in your virtualized environment.