Three Disk RAID0+1 Array with BTRFS

2

Would it be possible to have two or three disks in a RAID0 array and have a separate disk that is as large as the RAID0 disks combined size for pairity?

Or, would it be better to just RAID0 the smaller disks and perform periodic backups to the larger disk? (problem with that being, you can't really be sure the data you're backing up is correct)

It's my understanding that BTRFS is a little more flexable about RAID setups, but the documentation isn't really clear on this point--at least, not to my eyes.

Ben

Posted 2015-10-06T21:31:21.220

Reputation: 46

Answers

1

Is it not possible to do the following.

I have a similar idea to OP.

  1. Buy two 3 TB Drives and one 6TB drive.
  2. Build a RAID0 BTRFS on the two 3TB
  3. Create a RAID1 BTRFS on the New 6TB(2*3) and the Single 6TB.

That's what I would do with mdadm anyway.

Joel Wirāmu Pauling

Posted 2015-10-06T21:31:21.220

Reputation: 11

1

BTRFS doesn't quite fit the traditional RAID model even though most of its terms are handled that way.

With BTRFS you specify a separate "raid level" for metadata (directories and checksums) as well as file data. By default, BTRFS runs with "RAID1" (two copies) metadata and "RAID0" (one copy) file data - even on one disk (the two copies of metadata are stored separately on the same disk). If you add another disk and rebalance, the redundant metadata copy will be moved to another disk.

Since you're concerned with redundancy, you're going to want to use at least RAID1 mode for both the filesystem and metadata. This will ensure that two copies of your data exist across your various drives for redundancy, and you get a bit of speedup on reads as only one device (whichever is least-busy) must be read with checksums in the metadata used instead of parity for integrity checking.

If you have at least 4 devices, you can enable "RAID10" mode which behaves similarly -- data is split into two stripes, and each stripe is mirrored onto two disks.

If you're set on getting exactly what you asked for, and don't mind adding another layer, you can get there with LVM. Use LVM to build a striped volume across the smaller disks, and then build a BTRFS mirrored filesystem on top of that and the larger disk... This would yield pretty unpredictable performance though, as writes would be limited by the speed of the larger disk, and reads would be erratic depending on whether BTRFS chose to read from the LVM set or the larger disk.

BowlesCR

Posted 2015-10-06T21:31:21.220

Reputation: 2 607

If you set read priority to the LVM volume, I think you could avoid the large drive causing problems with read speed. I'm pretty sure that I read about that somewhere, though I could be making it up. As far as metadata, could I be sure that all the metadata was on both logical drives? – Ben – 2015-10-07T16:03:09.320

I'm not sure on priority. As for metadata, yes... Setting it to RAID1 (the default) would ensure redundancy. – BowlesCR – 2015-10-07T16:05:44.600