5

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 :)

5
  • I strongly recommend adding a fourth drive and using two mirrored pairs (similar to RAID-10). Less capacity overall, but much better performance. and easier to upgrade (when you upgrade a raid-z, you have to upgrade all drives in the vdev before you get any extra storage available. To upgrade a pool made of mirrored pairs, you can either upgrade just one mirrored pair at a time, OR add an extra mirrored pair of drives. technically you could also add a mirrored pair vdev to a pool that has a raidz vdev but performance will still suck) Commented May 1, 2016 at 10:42
  • FYI: btrfs.wiki.kernel.org and zfsonlinux.org Commented May 1, 2016 at 10:46
  • sorry, i got that second sentence wrong. a 3-drive RAID-Z (or RAID-5) would have the same capacity as a 4-drive pool of two mirrored pairs (or RAID-10). the mirrored pairs would be much faster for both reads and writes. with mirrored pairs, you also have the option of starting with two drives now, and adding two more later when you need the extra space. and then two more some time later again. Commented May 1, 2016 at 10:51
  • Interesting discussion here: reddit.com/r/linux/comments/32cu9w/zfs_vs_btrfs Commented May 1, 2016 at 17:58
  • 3
    BTRFS had some issues with the built in RAID5/ RAID6-code in 2016: phoronix.com/… -- might be fixed now. Note that BTRFS is younger than ZFS. Also, in a 2016 filesystem fuzzing, BTRFS died quite early: blog.fefe.de/?ts=a9f560e2 Commented Apr 13, 2017 at 15:25

1 Answer 1

3

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.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.