Re: corruption, xfs_repair 3.1.4 segfaults

Marc Lehmann
2011-03-04T10:26:52Z

On Fri, Mar 04, 2011 at 08:51:46AM +0100, Emmanuel Florac <eflorac@intellique.com> wrote:
> Ah, I think the problem may lie in the loop device. Try to run

At least the xfs_repair problem cannot be in the loop device:

>From the strace it's obvious that xfs_repair tries to read close to 2**64
bytes, and then crashes when the kernel rightly says that it can't do that.

It also shows that xfs_repair tries to allocate 3gb of memory (which is in
addition to the 1gb it already uses at that point), which is far more then
it should (specifying -m 990 didn't change that), which is another bug in
xfs_repair.

I think that, no matter what the loop device would do, xfs_repair is buggy
- it simply shouldn't crash, no matter how corrupted the filesystem is.

As a sidenote, I am now about 30% in recovering (copying) and
verifying the data, and it seems the volume isn't corrupted completely
(fortunately), so I can probably recover the important stuff, and reformat
the partition, so this might not turn out to be data loss (fortunately :).

> xfs_repair -f /file/path
>
> (not using the loop device).

that will not work, as xfs_repair has no encryption support (which is why
the loop device is used in the first place).