[SATLUG] Help with a corrupted file system

Samuel Smith satlug at net153.net
Wed Jul 29 01:07:53 CDT 2015

On 07/29/2015 12:49 AM, Alan Lesmerises wrote:
> I'm hoping someone on the list can provide me with some guidance or
> other suggestions that will help me recover data from a corrupted file
> system.  I have some of the data backed up, but I never expected to need
> to back-up an entire partition.
> I have a laptop at work running CentOS 7, configured as a LAMP server
> development platform.  When installing CentOS, I accepted the default
> settings, including the use of LVM with XFS.  On the 500GB hard drive,
> that worked out to 50MB (I think) for /boot, 50GB for /, and the rest
> for /home.
> About a week and a half ago, the laptop froze-up, and I had to perform a
> hard reboot.  When it tried to come back up -- nothing. It seems that
> the root partition was pooched, and it would not boot.
> I started up the CentOS recovery shell (off the install DVD), and tried
> from there to run a number of diagnostics and repair tools, but it seems
> that the XFS log file was unreadable and xfs_repair couldn't do
> anything.  Everything I found said to mount the messed-up partition so
> the log file could be read and the metadata could be read and changes
> applied to the affected files (presumably to re-build things to where
> they should have been after the last reboot), but that partition won't
> mount.
> In order to not screw up any data on the hard drive itself, I made an
> image of the root partition and used that to try to recover my data.
> When I try using xfs_repair, it says something like 'the log file is not
> empty; try to mount the partition' so the repairs can be made, but of
> course it won't mount.  The only other option I have is running it with
> the -L option (which clears the log file), but then the entire file
> system comes out as garbage -- the file names are unintelligible, and
> the contents of the files are total junk.
> There is only one piece of software that I saw anyone suggest for data
> recovery in this situation called "UFS Explorer", since it seems to be
> able to read even a corrupted XFS partition.
> So, here are my questions:
> 1. Does anyone have any experience with this "UFS Explorer" software?
> 2. Are there any other software or tools (preferably FOSS) that would
> have similar capabilities?
> 3. This experience seems to indicate that the Journaling aspect of XFS
> (and the fact that file changes are not immediately written to those
> files) is a bit of a vulnerability, especially for a non-server
> application that might have a higher probability of experiencing
> lock-ups, etc.  Would you agree (yes or no), and why?  In other words,
> should I not use it again when I rebuild my laptop's hard drive (to
> avoid this in the future)?
> Any inputs will be welcome.
> p.s. -- I apologize if I used the wrong terms for some of these -- I'm
> going from memory of what I did a few days ago.  Hopefully you'll still
> understand what I'm talking about!
> Al Lesmerises

I am going off of the top of my head here but you mentioned LVM and all 
your troubleshooting dealt with XFS. You won't be able to do anything if 
LVM is messed up. You probably want to run the chk commands for that 
layer first like pvck, vgck, ect. I've never had to use them thankfully, 
but if one does, you are on thin ice. One of the downsides of LVM imo.


More information about the SATLUG mailing list