All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Bart Brashers <bart.brashers@nyckelharpa.org>
Cc: linux-xfs@vger.kernel.org
Subject: Re: mount before xfs_repair hangs
Date: Mon, 9 Mar 2020 09:26:46 +1100	[thread overview]
Message-ID: <20200308222646.GL10776@dread.disaster.area> (raw)
In-Reply-To: <CAHgh4_+p0okyt3kC=6HOZb6dr8o3dxqQARoFB-LkR9x-tGuvSA@mail.gmail.com>

On Sun, Mar 08, 2020 at 12:43:29PM -0700, Bart Brashers wrote:
> An update:
> 
> Mounting the degraded xfs filesystem still hangs, so I can't replay
> the journal, so I don't yet want to run xfs_repair.

echo w > /proc/sysrq-trigger

and dump demsg to find where it is hung. If it is not hung and is
instead stuck in a loop, use 'echo l > /proc/sysrq-trigger'.

> I can mount the degraded xfs filesystem like this:
> 
> $ mount -t xfs -o ro,norecovery,inode64,logdev=/dev/md/nvme2
> /dev/volgrp4TB/lvol4TB /export/lvol4TB/
> 
> If I do a "du" on the contents, I see 3822 files with either
> "Structure needs cleaning" or "No such file or directory".

TO be expected - you mounted an inconsistent filesystem image and
it's falling off the end of structures that are incomplete and
require recovery to make consistent.

> Is what I mounted what I would get if I used the xfs_repair -L option,
> and discarded the journal? Or would there be more corruption, e.g. to
> the directory structure?

Maybe. Maybe more, maybe less. Maybe.

> Some of the instances of "No such file or directory" are for files
> that are not in their correct directory - I can tell by the filetype
> and the directory name. Does that by itself imply directory
> corruption?

Maybe.

It also may imply log recovery has not been run and so things
like renames are not complete on disk, and recvoery would fix that.

But keep in mind your array had a triple disk failure, so there is
going to be -something- lost and not recoverable. That may well be
in the journal, at which point repair is your only option...

> At this point, can I do a backup, either using rsync or xfsdump or
> xfs_copy?

Do it any way you want.

> I have a separate RAID array on the same server where I
> could put the 7.8 TB of data, though the destination already has data
> on it - so I don't think xfs_copy is right. Is xfsdump to a directory
> faster/better than rsync? Or would it be best to use something like
> 
> $ tar cf - /export/lvol4TB/directory | (cd /export/lvol6TB/ ; tar xfp -)

Do it how ever you are confident the data gets copied reliably in
the face of filesystem traversal errors.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2020-03-08 22:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-07 20:36 mount before xfs_repair hangs Bart Brashers
2020-03-08 19:43 ` Bart Brashers
2020-03-08 22:26   ` Dave Chinner [this message]
2020-03-09  1:32     ` Bart Brashers
2020-03-11 23:11       ` Bart Brashers
2020-03-11 23:25         ` Dave Chinner
2020-03-11 23:27           ` Bart Brashers
2020-03-12  5:45             ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200308222646.GL10776@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=bart.brashers@nyckelharpa.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.