I used to have RAID10 btrfs setup with 4 disks. Now I added sdf a new disk (its doing the balancing):

Total devices 5 FS bytes used 5.73TiB
devid    1 size 3.64TiB used 2.78TiB path /dev/sdd
devid    2 size 3.64TiB used 2.78TiB path /dev/sdc
devid    3 size 3.64TiB used 2.78TiB path /dev/sdb
devid    4 size 3.64TiB used 2.78TiB path /dev/sde
devid    5 size 3.64TiB used 336.00GiB path /dev/sdf

What I don't understand is that how is disk 5 inserted into this array?


By looking at the standard raid10 I would say it got into as a 3rd mirror to the right on the picture (storing the A2 A4 A6 blocks) but I'm sure it's done differently for BTRFS.

Could someone explain it please?


Btrfs doesn't mirror entire disks. It mirrors individual blocks of data ("chunks") and spreads them around the disks.

One chunk will be mirrored between disk 1 & 2, another between 3 & 4, another between 2 & 5, and so on.

So every chunk of data will have a backup copy on another disk, but not all on the same disk.

There are two good aspects of this:

  • Your disks don't need to be all the same size. It will spread chunks around on whatever space is available, on any two drives.
  • When a disk fails, one drive does not take all the stress of redundancy and recovery. All other disks with needed chunks are used, speeding up access.

It's a very flexible system. I like it especially because the disks don't need to be the same size.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.