Question How to create a LUKS encrypted OS drive on raid 1 in Ubuntu Server 24.04 ?

anvoice

Honorable
Jan 12, 2018
142
10
10,615
I'm trying to create a LUKS encrypted drive for the OS of a server, hoping to use software raid 1 with 2 NVME drives, under Ubuntu server 24.04. Unfortunately I see no option to do so in the installer: it can do software raid or encrypted LVM but seemingly not both. I also see no good way to do this after the installation, as running the cryptsetup command on the mdraid array tells me I'll overwrite all data (and it's my OS drive). Is there some way to do this?

Before, I think I accomplished something similar using motherboard raid and an ecrypted LVM. However, for some reason, even though I put the disks in motherboard raid 1, the installer still shows individual disks rather than an array when giving options where to install, hence an attempt at software raid.
 

Ralston18

Titan
Moderator
Not an Ubuntu person (full disclosure).

However, is there a specific requirement for using RAID 1 (or any version RAID for that matter) in the hosted server environment?

If RAID is not required then the requirements are simplified which would faciltate using encrypted LVM.

Is all data backed up somewhere else and proven to be recoverable?

Overall, more information is neeeded.
 

anvoice

Honorable
Jan 12, 2018
142
10
10,615
The system originally had 2 identical NVMEs, which are now fairly old. I was hoping to use raid 1 to prevent abrupt failure of the OS disk.

There will be additional data drives with ZFS (the server is a NAS), but it would be nice to store the OS on encrypted raid 1. If this is impossible, I'll settle for single disk encryption. I didn't think about backups of the OS drive yet, but it's certainly a good idea.