Tuesday, January 30, 2018

Disabling HDD Spindown

Disabling HDD Spindown


Recently Ive noticed that my HDD stops and starts too frequently. Not only has this affect on performance (access time) but it has negative impact to its lifetime. So Ive turned off Advanced power management (APM) function.

Not all HDDs support APM. You can show information with hdparm -I /dev/sdX

With one simple command, you can adjust APM level:

hdparm -B255 -S180 /dev/sdX

This disables APM (-B255) and sets timeout for HDD spin down (-S180), which has no effect here because of disabled APM.
After this command, HDD wont spin down.

To make this changes permanent Ive created udev rule /etc/udev/rules.d/11-hdparm.rules, so the setting will apply after reboot:
ACTION=="add", SUBSYSTEM=="block", KERNEL=="sdb", RUN+="/usr/bin/hdparm -B255 -S180 /dev/sdb"


visit link download