[Bug 1205741] New: btrfs splitting a raid1 mirror is "not a trivial process".
https://bugzilla.suse.com/show_bug.cgi?id=1205741 Bug ID: 1205741 Summary: btrfs splitting a raid1 mirror is "not a trivial process". Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Kernel Assignee: kernel-bugs@opensuse.org Reporter: william.brown@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- In zfs if I have a pool of two disks in a raid 1 mirror and want to "split" that to remove a single device (say I'm replacing it, and can't add all three at once)., all I have to do is: zpool remove pool device. In btrfs you can't simply break a raid1 mirror and you have to go through a very confusing and tedious process. First, you need to find which devid you need to remove: # btrfs filesystem show Label: none uuid: cfa4961a-bb45-4941-ae70-948bb27fdd9b Total devices 2 FS bytes used 101.68GiB devid 1 size 256.00GiB used 103.03GiB path /dev/nvme0n1p2 devid 2 size 256.00GiB used 103.03GiB path /dev/nvme1n1p2 Then you have to rebalance to raid0 (jbod?). It's unclear where stripes of data are moved and rebalanced here. The rebalance command is not trivial either, required a bit of knowledge about what is a data,system and metadata chunk. # btrfs balance start -f -sconvert=dup -mconvert=dup -dconvert=single / So at this point I can only assume my raid 1 is now a raid 0 and data is striped over two devices (reducing redundancy). Then I can finally split this with: # btrfs device remove 2 /home Beside being very confusing, this process does open up the possibility of surprise dataloss due to the raid 1 -> raid 0 conversion in the middle, as well as generally being very time consuming. Breaking mirrors to remove a drive and replace a new one in should be a routine and easy task but it's not so here. I think the user experience here should be improved so that I can "break" a raid 1 mirror, keep it as "raid 1" in the btrfs metadata and just remove a single device into a degraded mode before replacing in the new one. -- You are receiving this mail because: You are the assignee for the bug.
participants (1)
-
bugzilla_noreply@suse.com