Build a NAS blog – configure disk spin down in Ubuntu with hdparm

The default Ubuntu Server installation did not spin down my hard drives by default. Luckily we have a tool called ‘hdparm’ to do this for us. Spinning down disks can save up to 10watt per disk and extends life expectancy.

Hdparm is installed by default, but if it isn’t you can install it with the following command:

sudo apt-get install hdparm

To configure the idle time use the command stated below. The number indicates the idle time before the drive spins down.

60 = 5 minutes
120 = 10 minutes
180 = 15 minutes
241 = 30 minutes
242 = 1 hour
243 = 1.5 hours
244 = 2 hours

sudo hdparm -S 241

Spins downs the drive after 30 minutes of inactivity.