Making hdparm setting permanent in Ubuntu 12.04

Some Linux distros in the past set the APM default very aggressively, leading your hard drive to hundreds and thousands of load/unload cycles in too short period of time. Typically HDD are only rated for 600,000 load/unload cycles, so it might be beneficial to reduce this cycling, at the expense of some additional power consumption.

The procedure below is informational, and may or may not provide benefit.

You can slow down the cycling manually, but the system will FORGET this setting upon reboot.

make HDParm setting semi-permanent

  1. make line hdparm -B 250 /dev/sda, where /dev/sda is the HDD you’re wanting to stop cycling.

     geany /etc/pm/power.d/90_hdparm
    
  2. type

     chmod +x /etc/pm/power.d/90_hdparm
    
     cp /etc/pm/power.d/90_hdparm /etc/pm/sleep.d
    
  3. Reboot, and check that your setting “stayed”

     hdparm -B /dev/sda
    

This setting allows the drive to unload after an extended period without use, perhaps helping the HDD run a bit cooler without excessive wear. Instead of 250 you could use 254, which is thought to disallow unloading altogether–I used 254 for several months and noticed my HDD stayed at about 100 degrees Fahrenheit.

To check how many load/unload cycles you’re using, go into Disk Utility, SMART data, and scroll down to Load/Unload cycle count.

After figuring this out on my own, I found much the similar procedure

Leave a Comment