btrfs RAID1 - do 3 drives allow for 2 drives to fail before dataloss?

this is not really SUSE related but I hope to tap into the wisdom on btrfs here. …

I wonder whether spanning a btrfs RAID1 over 3 drives would allow for 2 drives to fail, before data loss or rather make more space available
Or in other words: would a btrfs RAID1 on 3 HD’s provide

A) more datasafety

  • 2 x 2TB
    drives RAID1 = 2TB space (1 hd can fail before data loss) - 3 x 2TB
    drives RAID1 = 2TB space (2 hds can fail before data loss)


B) more space

  • 2 x 2TB
    drives RAID1 = 2TB space (1 hd can fail before data loss) - 3 x 2TB
    drives RAID1 = 3TB space (1 hd can fail before data loss)


P.S. I don’t care much about hotswap capabilities if that matters. Can stop the server for exchanging a failed drive if necessary[/FONT]


RAID 1 supports two drives period. Which is drive A mirrored to drive B . There are other RAID levels that support different schemes

No. btrfs RAID1 means 2 copies of data on different devices. Losing two devices may result in data loss depending on how exactly data is distributed over devices. In practice you will most likely lose some data; if you are unlucky, it will be metadata and catastrophic loss of almost everything.

This is so wrong that I do not even know where to start …

There might be some confusion if we don’t understand the difference between “drive” and “disk”
A disk is the physical storage device
A drive is the logical storage object that can span more than one disk.

RAID1 is mirroring the data across two member drives, so at least one of the members can be more than one disk.

Understanding the above,
the features and limitations of RAID1 can also be understood since only when the integrity of an entire member drive exists, is the data considered usable.

Most often,
If you have 3 drives, RAID5 is the preferred option so that with the loss of <any> drive, the data integrity is still considered usable, and when the faulty drive is replaced the array can be regenerated without a problem.

Probably most arrays are configured so that a drive=disk to simplify and isolate disk problems if they arise, else spanning potentially introduces problems similar to RAID0 where a problem on one disk might cause an entire member drive spanning multiple disks to fail.


Answering the @OP question exactly,

To create a RAID1 across 3 disks, you will still be creating 2 member drives, for example

Drive 1…Drive 2

For RAID1 to work,
Let’s say 2GB of data is spread across disk1 and disk2, and mirrored to disk3.
If your data corruption occurs in disk1 <or> disk2, then Drive 1 is dead, but you could still have usable data on disk3.
Note that corruption on disk1 <or> disk2 invalidates the entirety of what you have on those two disks.

If your data corruption is on disk3 instead,
Then the data on disk3 is unusable but the uncorrupted data on disk1 plus disk2 is usable. Note that disk1 and disk2 have to be both mounted together and working, you can’t use use data when only one of the two disks working.