Spin Down HDDs

LstBrunnenG

Supreme [H]ardness
Joined
Jun 3, 2003
Messages
6,676
My HDDs on my Gentoo server don't ever seem to spin down. Is there a way I could fix this?

I'm running software RAID-5 using mdadm, if that matters (it shouldn't).
 
Add something like this to /etc/conf.d/hdparm:
Code:
sda_args="-S242" #set half hour interval
Consult the hdparm man page for how to figure out the number for a given spindown interval - it's not straightforward.

The md raid driver works correctly with sleeping disks, if you and your applications can tolerate a few seconds of wakeup time.
 
I can tolerate it more than I can tolerate a dead drive.

Edit:Hmm, it looks as though the man page for hdparm disagrees with you on the value you said to pass:
Values from 1 to 240 specify multiples of 5 seconds, yielding timeouts from 5 seconds to 20 minutes. Values from 241 to 251 specify from 1 to 11 units of 30 minutes, yielding timeouts from 30 minutes to 5.5 hours.
According to this, 242 would be one hour? Which is actually what I'd rather use anyway.

Anyway, I wasn't aware of how hdparm passed values on startup, so thank you for pointing me in the right direction.
 
You're right, 242 would be one hour. I posted it from memory, I thought I did well :p Don't forget to add the hdparm init script to your default runlevel, and each hard drive in the RAID array will need its own entry in /etc/conf.d/hdparm.
 
Back
Top