Wierd partition behaviour with BTRFS

Chris Murphy lists at colorremedies.com
Thu Mar 13 06:05:55 UTC 2014


On Mar 12, 2014, at 7:22 PM, Chris Murphy <lists at colorremedies.com> wrote:

> I think you've stumbled into a bug. Since Btrfs directly supports multiple devices, it's like LVM or raid in this respect, and for LVM and RAID, anaconda might be eager to configure multiple device layouts this way.
> 
> So I'm going to bet dollars to donuts this is a Btrfs raid0 volume. 

I just tried this with Rawhide, and it is rather easy to create a multiple device Btrfs volume and maybe not realize it. The resulting volume uses data profile single, metadata profile raid1. This can be confirmed with:

btrfs fi df /

Data profile single allocations in 1GB chunks to the block device (partition) with the most free space. When free space remaining among all devices is the same, it round robin allocates in 1GB increments. The metadata being raid1 means both SSD and HDD have a copy of the file system.

The way data profile single works is it allocates in 1GB chunks to the block device (partition) that has the most free space, until both have the same free space remaining, and then it alternates between them in 1GB chunks. The metadata however is raid1, so the SSD and the hard drive each have a copy of the file system.

So if yours is configured this way, it's probably not critical to change it. The metadata going to the SSD isn't much, and since the HDD has much more space probably all data chunks are allocated on it for the near/medium term. But conversion to single device Btrfs is straightforward, three btrfs commands will do it. And then some extras to reclaim the space on the SSD for /var or / or whatever.


Chris Murphy



More information about the users mailing list