linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Murphy <lists@colorremedies.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: Alexander Wetzel <alexander.wetzel@web.de>,
	Btrfs BTRFS <linux-btrfs@vger.kernel.org>,
	wqu@suse.com
Subject: Re: [BUG] BTRFS critical corrupt leaf - bisected to 496245cac57e
Date: Sun, 14 Jul 2019 09:40:32 -0600	[thread overview]
Message-ID: <CAJCQCtTNrF-Oj_WQ71_ApRRpVikwdG7mYW4iiz2iA+N1AAWkmQ@mail.gmail.com> (raw)
In-Reply-To: <6e764f38-a8dd-19e2-e885-3d7561479681@gmx.com>

On Sun, Jul 14, 2019 at 3:49 AM Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>
> I totally understand that the solution I'm going to provide sounds
> aweful, but I'd recommend to use a newer enough kernel but without that
> check, to copy all the data to another btrfs fs.
>
> It could be more safe than waiting for a btrfs check to repair it.

Does the problem affect all trees? If so, then merely creating new
subvolumes, and then 'cp -a --relink oldsubvol newsubvol', and then
delete old subvolumes, won't fix it.

I wonder where the ideas are for online or even out of band fsck.
Offline fsck is too slow and does not scale, a known problem. And both
copying old file system to new file system; as well as restoring
backups to a new file system, is astronomically slower because data
must also be copied, not just metadata. Also a known problem.

What about a variation on btrfs send/receive with --no-data option, to
read out all the old metadata and rewrite all new metadata to the same
file system, taking advantage of COW, but without having to copy out
the data? And then after all of that is done, delete the old file
subvolumes?

Or a variation on seed/sprout, without requiring additional devices.
The seed part "snapshots" the whole original file system (all trees),
and create two read-write file systems: current online mounted volume,
and in-progress offline repair volume. If the repair fails, it's
straightforward to clean up everything while retaining the changes -
at least it's not worse off. If the repair succeeds, then there'd need
to be some means of merging the two read-write file systems - that
could be complicated. But even if in the short term that merge
required an unmount, and perform the merge offline, that would be way
more tolerable than the way things are now.


-- 
Chris Murphy

  parent reply	other threads:[~2019-07-14 15:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-13 20:48 [BUG] BTRFS critical corrupt leaf - bisected to 496245cac57e Alexander Wetzel
2019-07-14  1:30 ` Qu Wenruo
2019-07-14  9:25   ` Alexander Wetzel
2019-07-14  9:49     ` Qu Wenruo
2019-07-14 12:07       ` Alexander Wetzel
2019-07-14 12:51         ` Qu Wenruo
2019-07-14 15:40       ` Chris Murphy [this message]
2019-07-15  1:07         ` Qu Wenruo
2019-07-29 12:46 ` Swâmi Petaramesh
2019-07-29 13:33   ` Qu Wenruo
2019-07-30  4:56     ` Qu Wenruo
2019-07-30  6:44       ` Swâmi Petaramesh
2019-07-30  7:21         ` Qu Wenruo
2019-07-30  8:02           ` Swâmi Petaramesh
2019-07-30 13:57           ` Swâmi Petaramesh
2019-07-30 14:16             ` Qu Wenruo

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=CAJCQCtTNrF-Oj_WQ71_ApRRpVikwdG7mYW4iiz2iA+N1AAWkmQ@mail.gmail.com \
    --to=lists@colorremedies.com \
    --cc=alexander.wetzel@web.de \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.com \
    --cc=wqu@suse.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).