Monday, March 23, 2009

How to extend Lifetime of a degrading Hard Disk

If one of your hard disks is physically degrading, you can extend its lifetime (while you backup data and prepare to replace the disk) by marking bad blocks and preventing from attempting to store data on them. Assuming an unmounted, ext3 filesystem on /dev/sda1, you can use the following command to perform a non-destructive check for physical failures and then store them in a special inode that the operating system knows to avoid using:

~ e2fsck -cc /dev/sda1

You could also use the badblocks command by its self to write a list of bad blocks to a file and read it into e2fsck with the -l option later.

No comments: