On 2014-02-24 08:37, Ilya Dryomov wrote:
> On Thu, Feb 20, 2014 at 6:57 PM, David Sterba <dste...@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 <ahferro...@gmail.com>
>> Reviewed-by: David Sterba <dste...@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
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to