Unofficial Ugly Load_Cycle_Count Fix for Gutsy
Don't apply any unofficial ugly fixes unless you understand what you are doing and you understand how to revert. Only apply this fix if you are heavily affected. After applying this fix keep an eye on your Load_Cycle_Count and on your harddrive temperature and make sure it remains below the maximum temperature specification of your harddrive. Also don't forget that having your harddisk head park protects your harddrive if you experience any bumps (which is especially nice if you are on the road and therefor probably working on battery).Everything you do is on your own risk.
Please read why I'm recommending this solution if you are heavily affected :
http://ubuntuforums.org/showthread.p...55#post5038155
Now to determine whether you actually suffer from this problem :
To query S.M.A.R.T. data you need to install smartmontools :
Code:
$ sudo aptitude install smartmontools
If smartctl says your drive isn’t healthy anymore (for any reason) your harddrive might start dying soon.
Code:
$sudo smartctl -H /dev/sda
Now check how fast your Load_Cycle_Count is increasing (the last number is your Load_Cycle_Count) :
Code:
$ sudo smartctl -a /dev/sda | grep Load_Cycle_Count
Look up how many Load_Cycle_Counts your harddrive can handle (most harddrives can handle 600.000 Load_Cycles but be sure to look it up). Calculate the average difference in Load_Cycle_Count per day. Now calculate what your Load_Cycle_Count will be in three years of harddrive use to determine whether you need to apply the ugly fix.
The smartctl values aren’t always easy to interpret. If the Load_Cycle_Counter value behaves as a counter and increments by steps of 1 and is below impossible to reach values it’s probably the right number.
You can also look at “WORST” and “THRESHOLD” (|more instead of |grep to easily see which value is “WORST” and which value is “THRESHOLD”) :
Code:
$ sudo smartctl -a /dev/sda | more
If WORST is lowering (too fast) than you might be suffering from this problem. You can roughly calculate how long it will take for WORST to reach THRESHOLD if you keep watching those values daily/weekly. The closer WORST is to THRESHOLD the likelier it is for your drive to die from a high Load_Cycle_Count. WORST often starts at 100 or 200 from what I have seen.
From https://bugs.launchpad.net/ubuntu/+s...16/comments/40 :

Originally Posted by
Brian Visel
Something to bear in mind as well:
smartmon does not always report SMART values as you might think. Different values are stored in different ways by different manufacturers.
Namely, if you do the smartctl check, wait for the click, and do it again immediately after, you may find that the amount has increased by more than one. In this case, it’s a pretty safe bet that the number you’re seeing isn’t accurate.
Also, it’s a pretty safe bet (though not guaranteed) that you can get the real value by dividing by the amount it increments by. So, if the value you see first is 477,296, and then it clicks once, and the value is 477,312 (difference of 16), it’s a pretty safe bet that the number you’re really dealing with is more along the lines of 29,831 to 29,832, in which case you have no worries.
If you think you might be suffering from this problem you might want to apply the ugly fix.
If you think your harddrive might start dying soon you should make backups of all your data and run the diagnostic tool of your harddrive manufacturer (which is probably included on the ultimate boot cd-rom).
The ugly fix :
You should only apply this fix if you feel your Load_Cycle_Count is increasing too fast. You should only apply this fix if you understand what you are doing so that you can reverse it. Apply this fix on your own risk. Also don't forget that having your harddisk head park protects your harddrive if you experience any bumps (which is especially nice if you are on the road and therefor probably working on battery).
Try the following :
Code:
$ sudo hdparm -B 254 /dev/sda
Code:
$ sudo hdparm -B 255 /dev/sda
One of these two will cause the drive will never be spun down and up again.
If hdparm solved your problem let's make these settings permanent. But first read why I'm recommending this :
http://ubuntuforums.org/showthread.p...55#post5038155
1) revert any previous fixes. remove all 99-hdd-spin-fix.sh files if any. comment the lines you added in /etc/hdparm.conf to fix this issue if any.
2) make a file named "99-hdd-ugly-fix.sh". The important thing is starting with "99".
Code:
$sudo gedit 99-hdd-ugly-fix.sh
3) make sure the file contains the following lines (fix it if you have PATA HDD):
Code:
#!/bin/bash
if on_ac_power; then
# on AC so don't do any head parking
hdparm -B 254 /dev/sda # you might need 255 or a different value
else
# either on battery or power status could not be determined
# so quickly park the head to protect the disk
hdparm -B 128 /dev/sda
fi
4) copy this file to 4 locations:
Code:
$sudo install 99-hdd-ugly-fix.sh /etc/acpi/resume.d/
$sudo install 99-hdd-ugly-fix.sh /etc/acpi/start.d/
$sudo install 99-hdd-ugly-fix.sh /etc/acpi/ac.d/
$sudo install 99-hdd-ugly-fix.sh /etc/acpi/battery.d/
By using install the file 99-hdd-ugly-fix.sh should have the x-bit set.
You probably shouldn't turn of head parking when on battery so you probably shouldn't use 254 when on battery. You should want your harddisk to park/unpark in order to safe power and protect your harddisk from bumps while on battery that's why we are using 128 while on battery. You might want to experiment with numbers between 128 (most head parks, best protection from bumps, lower power usage) and 254 (no protection from bumps,no head parks,best performance,increased heat). All values below 254 still can do much head parks (depending on the harddrive) so you should keep watching your Load_Cycle_Count.
Keep an eye on your harddisk temperature (for example using hddtemp) to make sure it doesn't exceed the harddisk's specifications. Keep an eye on your Load_Cycle_Count. If your Load_Cycle_Count is already close to it's specification (and behaves as a normal counter thus increments by 1) or your WORST is already at your THRESHOLD or very close to your THRESHOLD you should consider changing the "number for apm while on battery" (128) to 254 but you will lose any protection from bumps.
To get my disk temperature without disk activity (hddtemp causes disk activity) I'm using :
sudo smartctl -a /dev/sda | grep Temp
If you are worried about the temperature of your disk you might want to consider buying a laptop cooler. For my experiences with the Zalman ZM-NC2000 read :
http://ubuntuforums.org/showthread.php?t=818040
http://ubuntuforums.org/showpost.php...03&postcount=4
I didn't came up with this fix. Some contributions to this fix :
https://launchpad.net/ubuntu/+source...95/comments/14
https://launchpad.net/ubuntu/+source...95/comments/25
https://launchpad.net/ubuntu/+source...95/comments/99
http://www.linuxquestions.org/questi...97#post2939397
http://ubuntuforums.org/showpost.php...&postcount=487
Don't apply any unofficial ugly fixes unless you understand what you are doing and you understand how to revert. Only apply this fix if you are heavily affected. After applying this fix keep an eye on your Load_Cycle_Count and on your harddrive temperature and make sure it remains below the maximum temperature specification of your harddrive. Also don't forget that having your harddisk head park protects your harddrive if you experience any bumps (which is especially nice if you are on the road and therefor probably working on battery).Everything you do is on your own risk.
Bookmarks