Comment 11 for bug 880645

Thomas Mayer (thomas303) wrote :

With Ubuntu 14.04, Kernel 3.16 (from HES), I could btrfs-balance a non-raid /dev/sda2 btrfs fs with

cd /mnt
mkdir fulldisk
mount /dev/sda2 fulldisk
btrfs device add /dev/sdb fulldisk
btrfs balance start fulldisk
btrfs device delete /dev/sdb fulldisk

But with Ubuntu 14.04, Kernel 4.2.0-30-generic btrfs-delete gives me a message

"error removing the device '/dev/sdb' - unable to go below two devices on raid1"

It does not make sense to me why btrfs is reporting a raid 1 (mirroring) instead of a raid 0 (for adding a device).

I consider this to be a regression (or at least a change in behaviour) somewhere between kernel 3.16 and kernel 4.2. Note that I'm still using the same btrfs-tools (3.12), so the change in behaviour should have happened in the kernel.


I have:

btrfs filesystem show
Label: none uuid: 16120d81-8cde-4e81-87cd-f55f65a4923b
        Total devices 2 FS bytes used 1.99TiB
        devid 1 size 2.73TiB used 1.81TiB path /dev/sda2
        devid 2 size 465.76GiB used 200.03GiB path /dev/sdb