Activate hard disk standby in Linux.
My new server is running Linux, more specifically openSuse. After setting it up, I noticed that the hard disk does not go into standby, but runs through. This can save a few watts, which makes sense given today’s electricity prices.
Installation of tlp
First we install the package “tlp”. This package implements different power-saving settings for the computer. Among others, also for hard disks and drives.
sudo zypper in tlp
Then we edit the following file:
First we activate the functions by commenting the following line (i.e. remove the # at the beginning)
We find the hard disk settings at DISK_DEVICES. We also comment on these. If necessary, we enter our hard disks here. Several disks or device names are separated with spaces.
The actual setting is made in the next step, where values from 1 to 255 can be entered. I use 128 here, which switches the unit off after 10 minutes of inactivity. The values are set for battery and current. Here, too, the devices or the setting are separated with spaces.
An explanation for different values can be found here.
Then we have to activate “tlp” as a system service and start it.
sudo systemctl enable tlp sudo systemctl start tlp
Done! The hard disk should now be retired. We can query the current status with the following command:
hdparm -C /dev/sda
- Kofler, Michael (Author)
- Neumann, Markus (Author)
- Wendzel, Steffen (Author)