|  About Me  |  Blogs  |  Photos  |  Publications  |  Resume  | 

Data Recovery

System hanged today, it’s happening more often lately, possibly due to
too many interfaces talking at the same time.

Sadly /dev/hda2 (vfat) got corrupted, suffered great data loss.
Notes truncated, entire recently created directory tree disappeared.

Steps took to recover:

  1. boot into init 1 (before it mounts hda2)
  2. run fsck /dev/hda2 - found errors, suggest to truncate file, told
    it not to.
  3. remove /dev/hda2 from fstab, reboot.
  4. try to copy whatever’s left of the file on working partition.
    (don’t write to it!)
  5. more /dev/hda2, and try to search for lost segments of file
    manually. (takes forever). ‘more’ cannot go page up so need to use
    xterm buffer to go up.
  6. salvage what I can…
  7. run fsck again in init 1 but didn’t want to correct the data…
    strange.
  8. ran scan disk in windows, there’s two options, automatically
    correct file system error and scan for bad blocks. I did both, it
    didn’t give any warning or messages in the process and when it
    finished, the files that were corrupted was gone. The consolation is
    that it left a directory called found.000 where I suspect keeps all the
    files it removed from the filesystem. I was able to grep and get back
    some some files from there.

Later I heard from Chris there’re programs under windows that recovers
file for you. I guess I’ll try that next time.

Will not keep important data in vfat unless absolutely
have to. Will setup version control and commit changes every day.

Leave a Reply

You must be logged in to post a comment.