Powersaving in Linux - spinning down drives

Associate
Joined
28 May 2006
Posts
53
Have noticed, since upgrading mobo/cpu which required a kernel re-compile, that my hard drives are *very* hot...Even my two new SATA 300Gb drives, one of which has *nothing* on it...well, lost+found doesn't count! :)

Have been checking out sg_start from the sg3_utils package, stopping one of the new SATA drives seems to succeed...but how do I know...other than waiting a long while for it to cool down...

Performing an "ls" on /mnt/sda1 lists the contents...and quickly too...does this mean it's quick to start up, or that it was never stopped?!

Also, anyone know of a way to monitor hdd usage and automagically spin down/up SATA drives. hdparm for ide drives allows you to set up an idle time after which it spins down.
 
M0KUJ1N said:
A wee bit of digging found this:

http://www.ussg.iu.edu/hypermail/linux/kernel/0511.2/1362.html

There also seems to be an equivalent utility to hdparm for SATA disks called "sdparm", more info at http://sg.torque.net/sg/sdparm.html

Might have to have a play when I have a suitable linux box in front of me :)


Yep, Doug Gilbert is a name I've seen frequently on my google-treks! :) I had managed to install sg3_utils, and issued the command but was unsure whether it had worked. I turned them off this morning using "sg_start 0 /dev/sd[a|b]" and when I got home a little while ago, they were nice and cool. The IDE disk I'd set the standby time on was also nice and cool.

(In the time it's taken to write this post, they are now quite hot to the touch... :eek: )

So, now I know that I can power down and power up the drives I just need to go about finding a daemon that will monitor the drives for inactivity and power them down when not needed... : / Or write one myself. Could always write a simple shell script to run under cron...hmm...late night tonight I feel!
 
adamofgreyskull said:
So, now I know that I can power down and power up the drives (...)

Spoke too soon, natch. Am currently troubleshooting a problem whereby kernel panics when powering up a SATA drive after shutting down. Might be a problem with libata driver, in which case I won't bother you kind people no more ;)
 
Back
Top Bottom