Linux – RAID: ZFS or Btrfs

arch linuxbtrfsraidsoftware-raidzfs

I've mounted my own NAS with ArchLinux on an old HDD.
I want to add 3x4To to have real storage capabilites and I would like to use a RAID5 system with these 3 disks.

I've read a lot about ZFS Raid-z and it's exactly what I want to do.
But I've heard about Btrfs and it seems Btrfs is also able to handle software RAID-5 like ZFS.
But I wonder if Btrfs RAID work as well as ZFS. I also couldn't find complete information regarding how to create and manage the raid.
So my question is:

  • Is Btrfs able to handle a software raid with same protection as ZFS (no «write hole error», self-healing, etc… ?
  • Is Btrfs as reliable as ZFS Raid-z or is it still experimental features?
  • If the answer to my 2 first questions are «yes», where can I find full information about how to setup, repair and clean a Btrfs raid?

Thanks for your help 🙂

Best Answer

Is Btrfs able to handle a software raid with same protection as ZFS (no «write hole error», self-healing, etc… ?

No. Neither the RAID-5/6 code, nor the self-healing code is fully functional. The self-healing code sometimes works and sometimes doesn't. If you use BTRFS RAID-5/6, the question isn't "Will my file-system die?", it's "When will my file-system die?".

Is Btrfs as reliable as ZFS Raid-z or is it still experimental features?

BTRFS is claimed to be "Production" by the authors, and it is used as such by a few people, but please remember that RedHat has removed BTRFS from their future releases and made XFS their default file-system.

I've been reading the BTRFS mailing list for eight years. One of the core initial problems they had (out of space when there's LOTS of space actually available) is still there. Also, they just posted information about missing/broken code for various drive failure/replacement activities, and it's not pretty.

While ZFS isn't perfect, the latest release is quite robust.

I would like to use a RAID5 system with these 3 disks.

I would recommend RAID-Z2 if you can accept the performance. Otherwise, a pair of mirrors. The time to resilver (ZFS version of reconstruct) a 4TB drive is just too long without some redundancy.