You are not logged in.

#1 2010-07-04 10:49:14

knux
Member
Registered: 2010-07-04
Posts: 4

lvm,dmcrypt and shutdown issues

Hi,

i have to do some explaining about my (i guess not everyday...) setup and i hope anyone even reads through all of this ^^

i'm running arch64. i have 3 hdds. every single one encrypted with cryptsetup luks. these 3 encrypted harddisks are physical volumes to ONE volumegroup. the VG holds all of my data and the system (/,/home,/var,etcetc).

because of this setup i have to decrypt all of the 3 encrypted harddisks directly after grub, otherwise the system won't start. (because lvm needs of course all of the PV accessible to fire up the VG (that holds root as well)). i also don't want to enter my pwd 3 times and i mistrust having my keys lying around unencrypted. so i made another encrypted partition which holds my keys for the other 3 encrypted hdd's. so that was no biggie, i wrote my own kernel hook which decrypts this single partition and opens the encrypted harddisks. after that the lvm hook is running and open the VG and then it's just standard procedure.

so but my actual problem is this one: is there a way to close the encrypted hdd during shutdown? i'm getting the feeling that this is not possible. because the system has to shut down the VG and only after that the /dev/mapper/* mappings for the encrypted disks can be removed. i read through /etc/rc.shutdown and found that it doesn't even try to close the encrypted disks. (it's doing it for all of the entries in /etc/crypttab but not for an encrypted root partition!).
am i getting something wrong here? is the system running another shutdown hook after / has been umounted?
any help, suggestions, opinions are very appreciated.
thanks for reading through all of this.
knux.

Offline

Board footer

Powered by FluxBB