Subject: | |
From: | |
Reply To: | |
Date: | Sat, 15 Mar 2008 15:32:46 +0100 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Hi all,
I'm writing to report that I have detected the "unload cycle bug" while
running SL5.1 on my laptop. This "bug" has received some attention
months ago when it was found in Ubuntu¹ and consequently featured on
Slashdot².
----- SUMMARY -----
Some hard disk manufacturers ship their drives - especially laptop
drives - preset with some aggressive power saving settings. These
settings cause the hard disks to park their heads after a very short
inactivity time.
This hectic parking/deparking activity dramatically shortens the disk's
life.
Said manufacturers apparently take for granted that the OS will set more
sensible power saving defaults for the hard disk. Linux distros often
don't do this. So it's not exactly a "bug", rather an omission (even
though it can be argued that this is not really "Linux's fault").
----- DIAGNOSIS -----
The continued parking/deparking is typically easier to detect on a
laptop, where you might hear periodic "clicks" coming from the hard
disk.
A more reliable way is to watch the output of the following `sh` command
line, to be issued as root while your system is AC powered (as opposed
to battery powered) and not performing disk-intensive tasks:
while true;do smartctl -a /dev/hda|grep Load_Cycle_Count;sleep 120;done;
If the last number is constantly increasing every 1 or 2 lines, your
system is affected.
----- A SOLUTION -----
The command:
hdparm -B254 /dev/hda
changes the primary drive's (/dev/hda) power settings to "almost never
park heads". A lower number *might* be desired when running on battery,
and an ideal solution would include a way to change that number
according to power source (I don't know yet how to do this).
For the moment, I suggest that the above command be put
into /etc/rc.local to make sure it is executed at boot.
Best regards,
Andrea Remondini
----- NOTES -----
¹ <https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/59695>
² <http://hardware.slashdot.org/article.pl?sid=07/10/30/1742258>
|
|
|