JRehkemper.de

Set Disk-Spindown with hdparm

If you want to set after how much time in standby a hard disk should be switched off, you can do that with the command hdparm.

This has the advantage that on the one hand some power is saved, because a spinning HDD takes about 8 watts per hour. In addition, the life expectancy for the disk is extended when writing is infrequent and the disk does not have to rotate permanently in between. It also makes the system quieter. You can set the time until standby as follows. But you should make sure that your disk doesn’t spin up and down all the time. That might shorten it’s lifetime.

#-S: time to spindown
#/dev/sdx: name of your disk
sudo hdparm -S 25 /dev/sdx

The time is determined by the number after the -S. However, you have to multiply this number by 5 to get the time in seconds.
So in my case 25 * 5 seconds = 2 minutes 5 seconds.

So now after 2 minutes of no activity the hard disk is shut down and turned on again as soon as a program wants to write or read to it.

profile picture of the author

Jannik Rehkemper

I'm an professional Linux Administrator and Hobby Programmer. My training as an IT-Professional started in 2019 and ended in 2022. Since 2023 I'm working as an Linux Administrator.