Multiple devices and btrfs with raid10 - unexpected filesystem size

Hello everyone,
btrfs look quit interesting, so i decided to create a raid10 with btrfs. The kernel website of brtfs tells me to use this command to create a raid10.

terran@gaia ~ $ **mkfs.btrfs -m raid10 -d raid10 /dev/sdb /dev/sdc /dev/sdd /dev/sde**
Btrfs v3.17
See for more information.

Turning ON incompat feature 'extref': increased hardlink limit per file to 65536
adding device /dev/sdd id 2
adding device /dev/sde id 3
adding device /dev/sdf id 4
fs created label (null) on /dev/sdc
    nodesize 16384 leafsize 16384 sectorsize 4096 size **3.64TiB**

Wait a moment, 3.64TiB with 4 1TB devices and raid10?
Ok, perhaps i nee to run this command as suggested by various sites from the internet.

terran@gaia ~ $ **btrfs device scan**
Scanning for Btrfs filesystems

Again the same result.

terran@gaia ~ $ **btrfs filesystem show**
Label: none  uuid: 6c49b66e-1700-4ed8-8555-972375e3be3c
    Total devices 4 FS bytes used 112.00KiB
    devid    1 size 931.51GiB used **2.03GiB** path /dev/sdc
    devid    2 size 931.51GiB used **2.01GiB** path /dev/sdd
    devid    3 size 931.51GiB used **2.01GiB** path /dev/sde
    devid    4 size 931.51GiB used **2.01GiB** path /dev/sdf

// removed unnecessary output //

Btrfs v3.17

Ok i am out, how is it possible to have 4TB raid10 with 4 1TB devices? What did i miss? Bug/Feature-Theorem?
THX in advance.

I tried to learn from what you post, but there is one thing I can not understand.

You try to create your file system with a statement that mentions /dev/sdb, /dev/sdc, /dev/sdd and /dev/sde. Then the tool tells you that it is doing things with /dev/sdd, /dev/sde, /dev/sdf and /dev/sdc.

What seems strange (when not dangerous) to me is that something is happening to /dev/sdf where we are not even sure that it exists, and when it exists, what it is used for.

Don’t mix up TiB with TB… :wink:

1 TB = 1000100010001000 Bytes, 1 TiB = 1024102410241024 Bytes.

IOW, 4 TB is 4 000 000 000 000 Bytes, which is about 3.64 TiB (or more precisely 3,63797880709), not only for btrfs.

See also:

Show us the output of; **btrfs filesystem usage /

**Replace / with whatever path necessary, depending where your btrfs exists.

Filesystem size is 4TB. raid level simply changes how data is written to a filesystem. You can have different “raid levels” for metadata and user data.

Some of the advanced features of BTRFS like RAID are not yet full baked and not full ready for prime time.

@hcvv I am sorry, i just copy past the command from the btrfs wiki, it is c, d, e, f so thats not the problem.

@wolfi323 I know that, but I was to lazy to convert it so I just used the right units. Btw. thx for other post of you helped a lot.

@Mikuku at the moment I am not able to update btrfs-tools to version 3.18 so I used

terran@gaia ~ $ **btrfs filesystem df /mnt/lsdd/**
 Data, RAID10: total=2.00GiB, used=1.00MiB
 Data, single: total=8.00MiB, used=0.00B
 System, RAID10: total=16.00MiB, used=16.00KiB
 System, single: total=4.00MiB, used=0.00B
 Metadata, RAID10: total=2.00GiB, used=112.00KiB
 Metadata, single: total=8.00MiB, used=0.00B
 GlobalReserve, single: total=16.00MiB, used=0.00B

@arvidjaar [Solution] Ok, so the filesystem is 4TB but btrfs handles the way how data is written to the fs. If so… If I write a 1000MB file I only have 3.8TB left because its raid10.**** Tested and yes that was the missing point. THX. BTRFS is a nice little fs.**
@gogalthrop I thought the problems are in raid5 and raid56 or something so I guessed raid1 and raid0 should work and so raid10…

I hope i didnt miss something else, thx for the help, is it possible to mark this as [solved] if its common in this forum?

You better don’t make such jokes. When you post here something between CODE tags, all assume that it is an unabridged or altered copy/post from what you have on the screen. It is the only way to report what you do, get and see in a trustworthy way. You will end up not being trusted for anything you say or post. :frowning:

Yeah, sorry.
I should have looked up what a raid10 is exactly before replying… :wink:

So I understood the question as “why are only 3.6 TiB available when it should be 4 TB”.

is it possible to mark this as [solved] if its common in this forum?

Not really.
You could add “[solved]” or similar to the title when replying, if you want to.