Comment on Trouble automounting a LUKS parition that is on a mdadm raid6
@Hercules My exampled assumed, that you only have a password set on keyslot 0.
LUKS keyslots are starting at 0, so it seems, that you deleted the initial set password.
I hope, you know the other keyslots.
As far I can see, you can specify, which keyslot has to be selected for unlocking the volume key.
More information you can find in the man page.
```
man cryptsetup-luksaddkey
cryptsetup luksAddKey /dev/md0 --new-key-slot 0 --key-slot 1
```
Hercules@lemmy.world 1 day ago
Just to give you an update. The other keyslot was the key i added earlier for testing which i removed … So its time for me to copy over a lot of data to another system en recreate the luks volume. Thanks for your help!
@Hercules So it was possible to use one of the other keyslots to open the encryption?
Probably you can test your wanted configuration in a virtual machine with some small virtual drives to avoid any loss of data.
I found it relative difficult to find the correct UUID which had to be used when I setup my system in the past.
Hercules@lemmy.world 10 hours ago
No it wasn’t. Luckely the luks parition was still mounted on my system so im making a backup, recreating the partiiton and the restoring …
I found an article from RedHat on how to restore a luks1 partitions keys while it is still mounted but this isn’t possible with luks2 :/
@Hercules That was really luck. I hope, that your backup will be successful.
Until now I didn't used it, but probably I will also have a deeper look into luksHeaderBackup.
https://man.archlinux.org/man/cryptsetup-luksHeaderBackup.8.en
https://man.archlinux.org/man/cryptsetup-luksHeaderRestore.8.en