I started out talking about SMART and drive temperatures the other day but got all geeked out about hardware and forgot where I was going. I meant to also talk about how I tried to just spin down my older Western Digital ATA hard drives to give them a chance to cool off.
I looked at the hdparm, I saw some comments on forums saying it could be used to set a time delay to spin-down a hard drive.
Basically you could use it like this:
copper:~ # hdparm -y /dev/sda
/dev/sda:
issuing standby command
Just now when I did that I could hear the hard drive stop. Giving a command like
copper:~ # hdparm -S 5 /dev/sda
/dev/sda:
setting standby to 5 (25 seconds)
Seems to make no difference. I can check the status a minute later and see the drive is still running
copper:~ # for f in a b c d ; do hdparm -C /dev/sd$f ; done ;
/dev/sda:
drive state is: active/idle
/dev/sdb:
drive state is: active/idle
/dev/sdc:
drive state is: active/idle
/dev/sdd:
drive state is: active/idle
Since OpenSuse 10.3 uses the SCSI translation layer for older IDE drives like my first three, I can also use the sdparm command to stop them:
copper:~ # for f in a b c d ; do sdparm /dev/sd$f --command=stop ; done ;
/dev/sda: ATA WDC WD1600JB-00F 15.0
/dev/sdb: ATA WDC WD1600JB-00F 15.0
/dev/sdc: ATA WDC WD1600JB-00D 75.1
/dev/sdd: ATA ST3320620AS 3.AA
The thing is, something's usually in use on a couple of the drives so they'll just spin right back up again:
copper:~ # for f in a b c d ; do hdparm -C /dev/sd$f ; done ;
/dev/sda:
drive state is: standby
/dev/sdb:
drive state is: standby
/dev/sdc:
drive state is: active/idle
/dev/sdd:
drive state is: active/idle
I haven't found a utility in YaST or anywhere obvious yet that lets me set a time for the drives to go in to standby or give me a short reason why they can't.