Trying to build an encrypted, scalable RAID 1 array...

Kernels & Hardware, configuring network, installing services

Trying to build an encrypted, scalable RAID 1 array...

Postby Gorg » 2020-05-22 17:15

Hi all,

after some back-and-forth considering using Btrfs and ZFS, I decided on building an error-detecting RAID 1 array myself with LUKS2/dm-integrity. ( ... ryptsetup/)

Now, I've sort of collected the ingredients, but am uncertain how best to combine them. What makes it a bit obscure for me is that I want to grow the filesystem space later on.

So, if I have 2+ physical hard drives to be mirrored, I first need to encrypt them all individually with LUKS2, then add them to an md-device and then create the filesystem after that. I guess it's pretty safe until that point.

However, how do I make sure that I can grow the partition freely later on? For example if I'd get larger drives down the road and swap them out one by one, keeping my data structure intact.

Should I use LVM on top of the RAID device or maybe even below? Do I even need LVM or should I directly create the filesystem on the md-device? Also, which filesystem should I use? Ext4, XFS or even straight Btrfs, although I don't use its RAID-features anyway? Is there any advantage to one in this scenario? (Not a root-partition, just data.)

Has somebody done something similar? I'd be glad about some thoughts on how to best deal with this. :)
Posts: 17
Joined: 2019-10-24 09:30

Return to System configuration

Who is online

Users browsing this forum: No registered users and 19 guests