[SATLUG] Restoring files from a corrupted drive

Alan Lesmerises alesmerises at satx.rr.com
Tue Dec 15 22:21:11 CST 2015


Some of you may recall that I asked for some assistance a few months ago 
when I needed to recover from having my laptop hard drive get 
corrupted.  I had to set it aside for a while, but now I have the time 
to spend to try to fix it.

Background:

I was running CentOS 7, and had formatted my drive as xfs, and when I 
had to do a hard reboot, the journal file got hosed and nearly all of 
the files on the OS partition were screwed-up and unrecoverable.

The first thing I did was remove the old hard drive (it was OK; I just 
wanted to preserve everything that remained) and put in a new hard 
drive.  I took images of the partitions and tried the various recovery 
approaches recommended for an xfs partition (to rebuild the journal, 
etc.), but nothing worked.

After that, I tried re-constructing the OS on the new hard drive with 
the thought that I might be able to copy-over the files from a complete 
backup I had done, but that didn't work.  There appears to be 2 main 
problems with this approach.  First, the UUIDs assigned for the new hard 
drive & partitions are different, so anywhere the UUIDs are used or 
referenced, they don't match anymore.  Second, since having this bad 
experience with xfs, I don't want to go through this headache again and 
switched my OS partition to ext3, which means that everywhere the 
various configuration files are expecting an xfs filesystem they're now 
not finding what they're looking for.

The Question:

Any suggestions as to how to proceed?  I've resisted doing anything with 
the old hard drive, but I do recognize that using it would solve the 
UUID problem.  However, how can I address changing the filesystem from 
xfs to ext3.  A grep search of files that includes the term "xfs" 
returned what appeared to be thousands of files, and only a fraction of 
those would need to be modified -- but which ones???  Would that even be 
feasible???

If I changed the partition back to xfs and then restored the files to 
it, is it possible to switch a live filesystem from xfs to ext3?

  
Al Lesmerises



More information about the SATLUG mailing list