linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Austin S Hemmelgarn <ahferroin7@gmail.com>
To: Ilya Dryomov <idryomov@gmail.com>, David Sterba <dsterba@suse.cz>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: Allow forced conversion of metadata to dup profile on multiple devices
Date: Mon, 24 Feb 2014 08:44:20 -0500	[thread overview]
Message-ID: <530B4CB4.5010909@gmail.com> (raw)
In-Reply-To: <CAOi1vP9hEqBcDgY-zthijx37+_cowhoMQaTZyWG9OUqOQvJR2A@mail.gmail.com>

On 2014-02-24 08:37, Ilya Dryomov wrote:
> On Thu, Feb 20, 2014 at 6:57 PM, David Sterba <dsterba@suse.cz> wrote:
>> On Wed, Feb 19, 2014 at 11:10:41AM -0500, Austin S Hemmelgarn wrote:
>>> Currently, btrfs balance start fails when trying to convert metadata or
>>> system chunks to dup profile on filesystems with multiple devices.  This
>>> requires that a conversion from a multi-device filesystem to a single
>>> device filesystem use the following methodology:
>>>     1. btrfs balance start -dconvert=single -mconvert=single \
>>>        -sconvert=single -f /
>>>     2. btrfs device delete / /dev/sdx
>>>     3. btrfs balance start -mconvert=dup -sconvert=dup /
>>> This results in a period of time (possibly very long if the devices are
>>> big) where you don't have the protection guarantees of multiple copies
>>> of metadata chunks.
>>>
>>> After applying this patch, one can instead use the following methodology
>>> for conversion from a multi-device filesystem to a single device
>>> filesystem:
>>>     1. btrfs balance start -dconvert=single -mconvert=dup \
>>>        -sconvert=dup -f /
>>>     2. btrfs device delete / /dev/sdx
>>> This greatly reduces the chances of the operation causing data loss due
>>> to a read error during the device delete.
>>>
>>> Signed-off-by: Austin S. Hemmelgarn <ahferroin7@gmail.com>
>> Reviewed-by: David Sterba <dsterba@suse.cz>
>>
>> Sounds useful. The muliple devices + DUP is allowed setup when the
>> device is added, this patch only adds the 'delete' counterpart. The
>> imroved data loss protection during the process is a good thing.
> 
> Hi,
> 
> Have you actually tried to queue it?  Unless I'm missing something, it won't
> compile, and on top of that, it seems to be corrupted too..
The patch itself was made using git, AFAICT it should be fine.  I've
personally built and tested it using UML.
> 
> IIRC muliple devices + DUP is "allowed" only until the first balance, has that
> changed?

This is just a limitation of how the kernel handles balances, DUP
profiles with multiple devices work, it's just terribly inefficient.
The primary use case is converting a multi-device FS with RAID for
metadata to a single device FS without having to reduce integrity.
> Thanks,
> 
>                 Ilya
> 

  reply	other threads:[~2014-02-24 13:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-19 16:10 [PATCH] btrfs: Allow forced conversion of metadata to dup profile on multiple devices Austin S Hemmelgarn
2014-02-20 16:57 ` David Sterba
2014-02-24 13:37   ` Ilya Dryomov
2014-02-24 13:44     ` Austin S Hemmelgarn [this message]
2014-02-24 14:12       ` Ilya Dryomov
2014-02-24 14:40         ` Austin S Hemmelgarn
  -- strict thread matches above, loose matches on Subject: below --
2014-02-26 14:23 [PATCH] btrfs: Allow forced conversion of metadata to dup profile on, " Austin S Hemmelgarn
2014-03-07 18:05 ` Josef Bacik

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=530B4CB4.5010909@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=dsterba@suse.cz \
    --cc=idryomov@gmail.com \
    --cc=linux-btrfs@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 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).