Tuesday, October 30, 2007

Check your hard-drive's remaining life

Its always a horrible scenario when your hard-drive crashes - and adds more ghosts to it when you have important data into it.

It would always be nice to have some tool that can be used to find out the approximate life period remaining of your hard-drive. Well in newer SATA hard-drives they are using a Load/Unload mechanism for separating the disk and head. (detail explaination: http://www.linux-hero.com/rant/explanation-ubuntu-hard-drive-wear-and-tear).

In linux machines you can install 'smartmontools' to find out some interesting information about your hard-drive. This tool uses S.M.A.R.T (Self-Monitoring, Analysis and Reporting Technology) technology available in new hard-drives. This gives a specific count of Load/Unload done on your hard-disk. Normal hard-disk has 600,000 of Load/Unload cycles. Following is the method to find out the remaining life time of your hard-disk.

If you are a ubunbtu user like me simply give the following command:

sudo apt-get install smartmontools


It will install 'smartmontools' to your system. After than give the following command

sudo smartctl -d ata -a /dev/sda | grep '193'


It will show output something like this:

193 Load_Cycle_Count        0x0012   097   097   000    Old_age   Always       -       30385


Here in the last the number is 30,385 which is load/unload cycle count of my hard-drive. Well my drive is only 1.5 months old and it has already used 30,385 cycles.