Friday, May 16, 2008

WARNING: HDD shortened life span under linux

Please note this is NOT my work. I have shamelessly copyied it from so kudos to nicedude.

Due to APM constantly parking and unparking your hdd your hdd cycle count increases rapidly. As most drives are rated to 600 000 cycles the faster you get to these the faster your drive will wear. I tested my drive (Western Digital) and found I suffered from this very problem.

Basically you need to do the following - Install the disk monitoring tools

sudo aptitude install smartmontools

Then by running

sudo fdisk -l

and finding out how your drive is addressed (I.e. /dev/sda) you can run this

sudo smartctl -a /dev/sda | grep Load_Cycle_Count


NB: If in 15 mins the last number increased by more than 2-4 then you suffer from the same issue as I did.  Following the directions in the origional post I downloaded the shell script to my desktop made it executable and ran the following

sudo cp ~/Desktop/ /etc/acpi
sudo cp ~/Desktop/ /etc/acpi/start.d
sudo cp ~/Desktop/ /etc/acpi/suspend.d
sudo cp ~/Desktop/ /etc/acpi/resume.d

you could also create the shell script yourself it looks as follows

## Script by nicedude at Ubuntu forum 5-14-2008
## A fix to stop high hdd spin down counts from occuring thereby increasing hdd life
## The hdparm -B parameter can be adjusted between 200-254 should be sufficient for these purposes
## Using the value - B 200 should work fine if not enough then you could increase up to a max of 255
## which means no APM power management for the drive
## If your drive is called hda instead of sda then change it below
## You can find out by running sudo fdisk -l in a terminal and looking at whether it is called hda or sda

hdparm -B 200 /dev/sda

After a reboot run the following to get the Load_Cycle_Count

sudo smartctl -a /dev/sda | grep Load_Cycle_Count


You should only see a small increment.

Hope you are feeling a little more comfortable.. ;)

No comments: