The following setup describes how to set up RAID 1 inside a single LUKS container on the same drive.
Video Instructions:
https://youtu.be/PWxxV98DB4c
Unmount if needed (use Disks)
See which dev we are working with
lsblk
Assuming we are working with sdb - double check it - backup all data in case something goes wrong.
Create the luks container
sudo cryptsetup luksFormat /dev/sdb
Open the container
sudo cryptsetup luksOpen /dev/sdb mount_name
You can change mount_name to what you like.
Optional:
sudo wipefs --all --backup /dev/mapper/mount_name
LVM2 PV Create:
sudo pvcreate /dev/mapper/mount_name
Optional Check if the PV is created:
sudo pvdisplay
Create volume group
sudo vgcreate backup /dev/mapper/mount_name
Create logical volumes
sudo lvcreate -n part_one -l 50%FREE backup
sudo lvcreate -n part_two -l 100%FREE backup
Change % to what is needed.
change part_one part_two to what you like
go to disks : they will be mounted as:
/dev/backup/part_one
/dev/backup/part_two
Create the raid :
sudo mkfs.btrfs -L laptop_backup_c -d raid1 -m raid1 -f /dev/backup/part_one /dev/backup/part_two
laptop_backup_c is a label. Change to what you like.
mount any one of them using gnome disks. It will appear in
/media/<user>/laptop_backup_c
user is your username
OR, create the mount folder, mount it and later delete the mount folder
Unmount:
sudo umount /media/<user>/laptop_backup_c
Close all open volumes in a group
sudo lvchange -an backup
Close the luks container
sudo cryptsetup luksClose mount_name
Now when you insert the drive, it will ask for password only once. Your raid 1 will get mounted on /media/<user>/laptop_backup_c if you mount any one of the logical volumes using gnome disks or CLI (not shown here).
openssl speed -evp aes-128-xts) and this is per core, with two cores I'm getting 9.7GiB (runopenssl speed -evp aes-128-xts -multi 2). Also, it needs to be encrypted twice as the structures written do both disks by btrfs are different (all metadata indicates which mirror it is).