Comment 6 for bug 880645

Tom (doyenguy) wrote :

I can also reproduce this bug, both with 10.10 (kernel 2.6.35) and 11.10 (which has 3.x)

It also fails even if you use "mkfs.btrfs -m single -d single /dev/sdxx" when you create the initial device for the btrfs filesystem.

It seems to work OK if all the devices have no data on them, like if you create several small loopback devices, add no data to the filesystem, then you will have no trouble adding and removing devices willy-nilly.

Here's how it pops up for me: I have a 2 TB btrfs filesystem (1 drive) about halfway full. I then added a 2nd 2TB drive to the pool/filesystem. I did a sync and then immediately tried to remove the 2nd device. No go. You can issue "btrfs device delete ..." all you like. It won't remove, even though no data has been written to it yet. It's locked in place it seems :-(

I am attaching a testcase that reproduces the bug.