HDD Spindown

One of the main aspect I evaluate while I choose new Hardware for my IT Infrastructure is the Power Consumption of devices.

After I decided to buy my first “HP Proliant Microserver”, I installed a 3 disks RAID 5 storage on it, to provide Shared Storage over multiple protocols over my SoHo Network.

I realized immediately I would like to Spindown HDDs while the Storage was not used for a while, this is the solution I found:

1. Install “hdparm” package (as the description says, hdparm tune hard disk parameters for high performance):

apt-get install hdparm

 

2. Edit /etc/hdparm.conf

vim /etc/hdparm.conf

and add the following lines (my setup is based on hdb,hdc,hdd, used in the RAID 5 array):

1
2
3
4
5
6
7
8
9
/dev/sdb {
  spindown_time = 240
}
/dev/sdc {
  spindown_time = 240
}
/dev/sdd {
  spindown_time = 240
}

In summary, spindown_time is calculated as follows:

0 = disabled
1..240 = multiples of 5 seconds (5 seconds to 20 minutes)
241..251 = 1..11 x 30 mins
252 = 21 mins
253 = vendor defined (8..12 hours)
254 = reserved
255 = 21 mins + 15 secs

 

3. Reboot the machine to check if all settings are correctly read on boot:

shutdown -r now

and/or set manually the timer with hdparm:

hdparm -S 240 /dev/sdb
hdparm -S 240 /dev/sdc
hdparm -S 240 /dev/sdd

In normal operations a drive (for example /dev/sdb) stays in active/idle state:

hdparm -C /dev/sdb
/dev/sdb:
drive state is:  active/idle

After the timeout specified with hdparm, if no access has been done to the HDD, the same drive will appear like this:

/dev/sdb:
drive state is:  standby

 


Comments are closed.