From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Roman Mamedov <rm@romanrm.net>
Cc: btrfs <linux-btrfs@vger.kernel.org>, David Sterba <dsterba@suse.com>
Subject: Re: Ideas for btrfs-convert fix(or rework)
Date: Tue, 10 Nov 2015 16:16:26 +0800 [thread overview]
Message-ID: <5641A7DA.6010102@gmx.com> (raw)
In-Reply-To: <20151110125501.1aa6f155@natsu>
Roman Mamedov wrote on 2015/11/10 12:55 +0500:
> On Tue, 10 Nov 2015 14:27:41 +0800
> Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>
>> But without such work, btrfs-convert will always be a mess and no
>> real support for balance.
>
> I wonder, what happened to the current btrfs-convert?
>
> Perhaps a couple of years ago I converted a 7TB and ~70% full Ext4 filesystem
> into Btrfs. At first the result showed up to have about 3TB of Metadata
> chunks, but several iterations of balance reclassified this as Data (and thus
> made it practical to also enable Metadata DUP). Everything went flawlessly and
> with no data loss whatsoever.
Old btrfs-convert works well, since it's using mixed block group and
using it correctly.
It's quite hard to mess chunk types up if they can be both data and
metadata.
But in that case, kernel doesn't support to convert mixed block group
into separate ones.
Which means you will only get mixed block groups, and no method to get
normal separate data/meta block groups.
So if things are correct, the btrfs you converted should still be in
mixed-bg mode.
A recent 'btrfs fi df' command should show things like:
Data+Metadata, DUP: total=512.00MiB, used=68.23MiB
>
> But as we know recently there were reports that it now causes corruption or
> does not work. So I wonder what happened that broke it, and is there really no
> simpler fix? Even if requiring the user to balance to get rid of the bloated
> Metadata like I had to.
>
Yes, current btrfs-convert has problem on marking chunk meta or data.
Resulting some data extents may lay in metadata chunk, and vice verse.
At least it won't pass latest btrfsck.
In that incorrect chunk layout, I'm not surprised any thing go wrong.
For alternative fix, David mentioned one, but that's going to land in
kernel, to support convert mixed block group.
And then we can still use the old mixed-bg method for btrfs-convert.
But I'm not sure if it
Thanks,
Qu
next prev parent reply other threads:[~2015-11-10 8:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-10 6:27 Ideas for btrfs-convert fix(or rework) Qu Wenruo
2015-11-10 7:55 ` Roman Mamedov
2015-11-10 8:16 ` Qu Wenruo [this message]
2015-11-10 9:08 ` Roman Mamedov
2015-11-10 9:18 ` Qu Wenruo
2015-11-10 10:31 ` Duncan
2015-11-12 10:23 ` Vytautas D
2015-11-12 13:27 ` Austin S Hemmelgarn
2015-11-12 14:09 ` Roman Mamedov
2015-11-12 14:38 ` Austin S Hemmelgarn
2015-11-13 6:41 ` Duncan
2015-11-16 17:46 ` David Sterba
2015-11-17 0:42 ` 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=5641A7DA.6010102@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=dsterba@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=rm@romanrm.net \
/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