[Top] [All Lists]

Re: Corrupted filesystem: thoughts?

To: Emmanuel Florac <eflorac@xxxxxxxxxxxxxx>
Subject: Re: Corrupted filesystem: thoughts?
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 8 Oct 2014 06:53:18 +1100
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20141007132210.55b2183a@xxxxxxxxxxxxxxxxxxxx>
References: <20141007093533.66ba8c7b@xxxxxxxxxxxxxx> <20141007105657.GO2301@dastard> <20141007132210.55b2183a@xxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Oct 07, 2014 at 01:22:10PM +0200, Emmanuel Florac wrote:
> Le Tue, 7 Oct 2014 21:56:57 +1100
> Dave Chinner <david@xxxxxxxxxxxxx> écrivait:
> > Is the log clean? (use xfs_logprint -t <dev> to determine that)
> > 
> No, it wasn't, that was probably the source of most of the ominous
> messages. The many files in lost+found were probably deleted files

You really, really want to recover the log before running repair if

> In case this may help someone, before running xfs_repair I've mounted
> the volume in "ro,nonrecovery" mode, then ran this command to make a
> listing of files with their inodes: 
>  find /mnt/raid/ -print0 | xargs --null ls -di | gzip - > FILELIST.gz

Generating the list before recovery is run will result in a
partial list because there will be parts of the directory heirarchy
that can't be traversed due to corruption. So there's no guarantee
that this list will be in any way complete.

Besides, we already have amore robust offline tool for generating
such a list:

$ man xfs_ncheck
xfs_ncheck with no -i arguments generates an inode number and
pathname list of all files on the given filesystem.

It will also tell you when it fails to resolve a pathname or inode
number due to corruption, so you have direct indication of what
inodes and/or paths are broken.


Dave Chinner

<Prev in Thread] Current Thread [Next in Thread>