
Quoting "Chris Samuel" <chris@csamuel.org>:
On 06/02/12 10:36, Peter Ross wrote:
Still, the basics should get reported properly by df & Co.
It's not that easy, I believe btrfs can have per-chunk RAID settings so the kernel doesn't really have a hope at guessing correctly.
The chunks are fixed-size "lumps", usually ca. 1GB. As long as you "leave them alone", they count like the space of a normal block device. If you RAID-1 them - it halves the number of chunks.
That said for RAID1 there were some fixes made in reporting in 2.6.34, viz:
To run RAID-1 on two partitions/disks/etc of different size is not really good practise in the first place. But the btrfs knows that there are chunks that cannot be duplicated. Why counting them in the first place? I know that you can lump multiple disks of varying size together (and writes two copies of a chunk any time if you do RAID-10) but even then btrfs needs some foresight to organize the available space. FreeBSD's ZFS had similar issues of integration into the "base system". They seem to be gone by now, at least I do not notice any these days anymore. I believe the same will happen to btrfs as it matures. Regards Peter