Goal: to create RAID1 and encrypt it using VeraCrypt (so if one drive fails, I can connect it to any OS with VC installed and access my data). Then make sure that VC volume (which is on RAID1) gets decrypted/automounted during startup of antergos. So I guess steps are the following:
- Create RAID1 volume (/dev/md0).
- Encrypt RAID1 volume.
- Automount /dev/md0 which is encrypted using VeraCrypt at /mnt/raid1 (or whatever name).
- Decrypt and automount /mnt/raid1 at /mnt/decrypted_volume (or whatever name).
I created RAID1 from sda/sdb using mdadm and enabled automount in fstab:
UUID=xxx /mnt/raid1 ext4 defaults 0 0
Works well. However, now I need to encrypt whole RAID volume using VeraCrypt. I can see/select /dev/md0 in VeraCrypt and encrypt it. However, once I do so and reboot, system fails to start and I’m dropped into maintenance mode. The only way to boot system again - remove that line from fstab.
Unfortunately, even if system starts, I can’t mount encrypted RAID. Doing mount /dev/md0 /mnt/raid1 returns errors wrong fs type, bad option, bad superblock
I guess it happens because VeraCrypt changes whole filesystem at /dev/md0 from ext4 to its own encrypted volume, while fstab and mdadm.com are still set to use ext4. What can I do now to achieve my goal?
If some of my initial steps are wrong, please also let me know.