4 ms·
>Moving beyond the question of individual disk reliability, btrfs-raid1 can only tolerate a single disk failure, no matter how large the total array is. The rem
by COGlory 5y ago
>Moving beyond the question of individual disk reliability, btrfs-raid1 can only tolerate a single disk failure, no matter how large the total array is. The remaining copies of the blocks that were on a lost disk are distributed throughout the entire array—so losing any second disk loses you the array along with it. (This is in contrast to RAID10 arrays, which can survive any number of disk failures as long as no two are from the same mirror pair.)
This feels a little disingenuous to me. This is a distinctly RAID-1 problem. This doesn't feel like a BTRFS problem. Everyone knows RAID-1 = 1 drive loss.
>I don't have anything specific to say about btrfs-raid0, other than the fact that it's raid zero. Any failure of any disk loses all data on the array. This is not a storage system, it's a virtual woodchipper. Avoid.
If the previous paragraph felt disingenuous, this one feels downright malicious. Not only does BTRFS RAID-0 have no differences from normal RAID-0, but the blanket recommendation to avoid it makes no sense. There are many use cases for RAID-0, but the author is acting like this is some kind of problem with BTRFS.
- tw04 5y ago>This feels a little disingenuous to me. This is a distinctly RAID-1 problem. This doesn't feel like a BTRFS problem. Everyone knows RAID-1 = 1 drive loss. That's simply not true. I can do a RAID-1 (mirror) with 3 drives on ZFS or mdadm and lose 2 drives. I can do it with 10 drives and lose 9. https://www.thegeekdiary.com/how-to-add-a-3rd-disk-to-create-a-3-way-mirror-raid1-md-device-centos-rhel-7/ https://www.thegeekdiary.com/how-to-add-a-3rd-disk-to-create... >There are many use cases for RAID-0, but the author is acting like this is some kind of problem with BTRFS. Sure, but for a novice the default advice needs to be: don't do that. And he's writing for folks with all sorts of levels of technical knowledge. Someone who knows nothing about RAID reading the article should be scared away unless they have a very, very good reason for doing RAID-0.
- nybble41 5y ago> I can do a RAID-1 (mirror) with 3 drives on ZFS or mdadm and lose 2 drives. You can do this with BTRFS also; it's called RAID1C3 (for three copies). RAID1C4 is also an option with larger arrays. The issue is that if you have, say, four drives and standard RAID-1 (two copies) it doesn't divide the drives into mirrored pairs where you could lose one drive from each pair without any ill effect (like RAID-10), but rather just ensures that each piece of data is stored on any two different drives. With 4-drive RAID-10 if you lose two drives you have a 50% chance of losing the whole array, since both failing drives could be from the same pair. With BTRFS RAID1 in a four-drive array you have a high probability of losing both copies of some of the data no matter which two drives fail. RAID-6 is strictly better than either, though, since you can lose any two drives and still access all your data.
- bluGill 5y agoOnly in small arrays. In larger zfs systems RAID-1 you divide the disks into chunks of drives - 5-7 is typical. If you have 10 drives, any one can fail without issues, but even with that one failure, a second can fail without losing data 50% of the time. This puts the odds more in your favor. If you are like the typical single person 5 disks is enough and so this doesn't matter at all. However if you a larger organization with several hundred disks odds are you have more than one failed at a time on a regular basis, but the odds that more than one failed drive is from the same chunk is still low enough to not worry too much. I personally have zfs-z2 with 6 disks in my NAS. This any 2 drives can fail. If I want to expand my NAS I would need 6 more disks, but not only could any 2 fail, many combinations of up to 4 can fail without issues. If you have a small number of drives this doesn't matter, but BTRFS-raid1 is not acceptable for large number of disks.
- mst 5y ago> This feels a little disingenuous to me. This is a distinctly RAID-1 problem. This doesn't feel like a BTRFS problem. Everyone knows RAID-1 = 1 drive loss. The point he's making is that classic RAID-1 is pairs of disks, of which you can lose one of the two, whereas btrs-raid1's (admittedly very neat) feature to bolt multiple disks together means you can end up with a situation where you can only lose one of N drives, which is significantly riskier. > There are many use cases for RAID-0, but the author is acting like this is some kind of problem with BTRFS. I read the "anything specific" as them being clear that it's not remotely btrfs specific and is, indeed, exactly a limitation of RAID-0. Plus over the years I've definitely run into a lot more cases where people have misused RAID-0 and ended up with an unexpected virtual woodshipper than cases where they were actually right to use it (even those do absolutely exist), which does have a tendency to colour one's experience. I think "Avoid" is the safest advice to give in a general-audience article, people who will genuinely get advantages out of RAID-0 in spite of the failure modes are likely to be able to figure that out themselves anyway.
- tashbarg 5y agoIn BTRFS, RAID1 simply means 2 copies on different devices. There is RAID1C3 and RAID1C4 if you want more redundancy/copies. This whole critique boils down to poorly chosen naming and bad documentation. Both VERY valid critique. But feature-wise, BTRFS delivers „classic“ RAID1 and more/better. It’s just hard to find and easy to misread.
- morning_gelato 5y agoI would argue btrfs does not deliver "classic" RAID1. Last I checked if you lose 1 disk in a 2 disk btrfs RAID1 setup and then reboot, it will be unable to mount the filesystem until you change the mount options so that it is set to 'degraded' mode. This is very different from other RAID1 setups (e.g. hardware raid controllers, mdadm, openzfs), and a big problem if you don't have lights out management or fast physical access to the machine.
- mst 5y ago