You are not logged in.
Pages: 1
Hello,
I made some tests with btrfs by installing Arch in a VM. I made a raid 1 with 2 whole disks and created root and home subvolumes. Here it is after rebooting after the install :

Then I made a failed disk simulation by formatting the first disk, mounting the second disk in degraded mode, adding the first disk again, deleting the missing disks and balancing the data. It worked and after rebooting here is the result :

You can see a few differences. First, why is there a Data, System and Metadata single in the first image ? I created the raid with :
mkfs.btrfs -f -L ARCH -m raid1 -d raid1 /dev/sda /dev/sdb
mount /dev/sda /mnt
cd /mnt
btrfs subvolume create root
btrfs subvolume create homeNext, it shouldn't be important because I imagine that the allocation would grow automatically when the used space is near the allocation limit but why did the Metadata allocated space shrink from 1 GiB to 256MB ?
Thanks ! ![]()
Last edited by Nolhian (2014-06-09 20:25:28)
Offline
The tidbits of 'Single' are apparently a bug. You can get rid of them with a balance.
# btrfs balance start -dconvert=raid1,soft -mconvert=raid1,soft /path/to/btrfs The System and Metadata sections are both handled by the -m. But sometimes the System chunk will not balance. If this happens, you can use:
# btrfs balance start -sconvert=raid1,soft -f /path/to/btrfs This will do only the System portion and will force it. Like pacman, use the force with extreme caution.
In the examples above, the soft simply tells it to balance only the portions that are not already in the desired profile that is specified by convert.
I'm not sure why the Metadata shrank the way it did. But there is no reason why you would need to have 1GiB of Metadata chunks for 45MiB of Metadata. It is supposed to allocate chunks 256MiB at a time. So really I just have no idea why it would have given it a full GiB to begin with there.
But when you added a new disk, you balanced the filesystem. So basically it saw that there was such a tiny amount of Metadata, and acted accordingly.
Offline
Pretty annoying bug, hopefully they will fix it soon, thanks for the commands to make it right ![]()
Yes that's really strange, especially ( I didn't know that ) if like you said it's supposed to allocate chunks of 256MiB at a time, don't know where the 1GiB came from. It should have allocated only 256MiB from the start.
Thanks for clearing everything up !
Offline
No problem. If you are satisfied with the answer I gave, please mark the thread as [Solved].
Offline
Pages: 1