My Hard Drive Is Clicking Again So I’m Stopping It Cold When Ubuntu Boots
Earlier I wrote an article discussing the hyperactive APM modes that some drive manufacturers use and how that leads to excessive head parking and severly reduced drive life. It seems newer versions of Ubuntu and Kubuntu are coming with APM on the drives completely disabled (a setting of 255 using the -B option of the hdparm command). This is all swell and good but disregards the fact that many of us have hardware that doesn’t support the 255 option and rely on the slightly lower setting of 254, which doesn’t completely disable APM on the drive but causes it to be very, very slow to park.
So let’s set up the system for the rest of us. First we need to edit the /etc/hdparm.conf file and add this at the end. Please be aware that your hard drive may not be “/dev/sda” like mine, so make sure you get that part right for your system.
/dev/sda {
apm = 254
}
Finally, let’s reboot and check our current APM settings on the drive to be sure our settings are being applied at startup. The command to check the drive’s current state is:
sudo hdparm -I /dev/sda|grep "Advanced power management level:"
If that shows you a value of 254 then you’re golden. Congratulations on extending the life of your hard drive. It looks like the folks at Ubuntu also got this sorted out for both ATA and SATA drives when resuming from sleep, but do yourself a favor and check that on your system as well.
As a side note, how can you tell how many times the heads have parked? First, install the smartmontools package, then check the number of load cycles that the drive has gone through:
sudo apt-get install smartmontools sudo smartctl -A /dev/sda|grep "Load_Cycle_Count"
As a rule of thumb most consumer drives can load cycle at or just above 500,000 times. Be aware that this isn’t a hard limit, it’s just a guess. Your mileage will vary.
My Hard Drive Is Clicking Again So I’m Stopping It Cold When Ubuntu Boots | Eric Biven’s Blog…
Describes the how to ‘disable’ APM on your hard drives when your hardware doesn’t support Ubuntu’s current plan of fully disabling APM and get it to apply itself on boot and resume….
[...] Be sure to also check out the follow-up to this article, My Hard Drive Is Clicking Again So I’m Stopping It Cold When Ubuntu Boots. [...]
I can confirm that this fixed the HD clicking problem I was experiencing after I installed Ubuntu 8.10 on a new Western Digital 250GB SATA (scorpio) drive in my Dell Inspiron 1501.
Thanks!