Originally Published: Thursday, 9 August 2001 Author: Mark Warburton
Published to: enhance_articles_sysadmin/Sysadmin Page: 2/2 - [Printable]

Recovering from an ext2 Hard Drive Crash

Mark Warburton recently recovered from a nasty crash. An admin who refuses to give up, Mark shares his problem and ultimate solution with the readers of Linux.com.

Success  << Page 2 of 2  

Eureka! I got my project. At this stage, I recommend a new installation of Linux having copied all of the files you need from the old damaged installation, as you do not know for sure what is damaged in the filesystem. There may be a way of painstakingly determining this if you take down the block information of reported hardware failures and track them back to the inodes and back to the filenames (gurus will no doubt be able to tell you how). Even then there may be one or two read errors that slip through the cracks, especially if you have already tried repairing the system a few times without success.

By the way if you reach here, then I might mention that backing things up very regularly is a very good idea for preventing loss of anything again. Due to monetary constraints, I have had to make do with what I have got, which is a CDRW. As an aside, I found an excellent backup utility some time ago that effectively allows you to treat your CDRW/CDW as a block output device (like a tape streamer would be). It also very importantly allows you to span multiple CDs. It is called cdbackup: http://www.cableone.net/ccondit/cdbackup/

I use cdbackup in conjunction with afio so any hardware media failures on the CDRW result in only the loss of a single file and not the entire backup from then on! tar.gz or tar.bz2 are a bad idea as they suffer from the loss referred to.

Another thing that you should regularly do is check your /var/log/syslog file and other logs for hardware error reports. Also, in my case I also heard the drive making angle-grinder noises a few months ago but it seemed fine so I left it thinking it could just have been an harmonic vibration. I suspect that the SMART technology in the drive hid the errors for as long as it could before running out of spare resources. I could have saved some time and grey hairs if I had responded sooner.

Nevertheless, I have my data and a new drive. Happy days are here again!

Success  << Page 2 of 2