Making hdparm setting permanent in Ubuntu

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:

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

type

chmod +x /etc/pm/power.d/90_hdparm

cp /etc/pm/power.d/90_hdparm /etc/pm/sleep.d

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. Try 254 and monitor HDD temperature–100 degrees Fahrenheit is possible.

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

similar procedure