Making an encrypted BTRFS raid

I'm mostly confused about how to set this up right. I haven't done a system with raid.

I will have a system drive, shared with windows, and changing 3 hdd for manjaro only. I would like to make an even 4 but that can't happen for now. This leaves me with choosing raid 5 which from what I found is simple enough with BTRFS and could be changed later (I've made my mind on raid 5 for what I have, I see arguments about it).

After installing, how would I go about having the 3 encrypted drives raid 5 together for system boot? If set with the same encryption password as the system will it still ask for a password for the raid? For each drive? How is a raid like this added to fstab? Is expanding to 4 drives going to be too weird with the encryption?

Be careful with that. Arch wiki says:

Warning: Parity RAID (RAID 5/6) code has multiple serious data-loss bugs in it. See the Btrfs Wiki's RAID5/6 page and a bug report on linux-btrfs mailing list for more detailed information.

1 Like

Why an encrypted RAID with 3 disks at all?

I would recommend to use LVM which has both a LUKS and a RAID configuration.

That's where I'm getting confused. Where is the difference for using LVM? I don't really know how it's used here.

To be fair, that wiki page is over a year old. I am leaning for raid 5 after seeing other people saying it's gotten better. From my understanding it isn't officially stated to work until way more verification is done, which takes a while.

This RAID5 issue is several years old. And it still exists:
https://news.ycombinator.com/item?id=22005823

And the kernel wiki still says RAID5/6 is "unstable":
https://btrfs.wiki.kernel.org/index.php/Status

Do what you want, but be cautious. If something happens to your data, you can not say you didn't know it.

I have had great success finally figuring out how to do what I was looking for. I suppose I could post my method here for future reference. Someone might be stumped like I was when looking through several webpages.

One thing that BTRFS is still tricky for me with is having timeshift set up a little better. I have my skinny ssd installation with the huge disk array. I store my biggest data like videos on this array in a videos folder. That folder is mounted to my home directories video folder with fstab bind.

Because of BTRFS timeshift I understand that because the home directory is not the location of 'real' home directory. I should change these binds to /run/timeshift/backup/@home/... and THEN those folders contents will be snapshot with timeshift. Is this right? Is there a better way? I haven't quite got subvolumes figured out and timeshift makes mention that other subvolumes outside of @ and @home are not implemented, so I don't mess with that.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by