I'm using RHEL 6.5 and I want to encrypt some of my logical volumes (LVM). In order to not have to enter the passphrase multiple times, I want to store a keyfile in an encrypted LV.
/var/xxx will be encrypted and the passphrase will be asked during the boot.
/var/xxx/yyy will be encrypted and the keyfile will be under
/var/xxx/keyfile (for more security).
This way the passphrase has to be entered only one time.
LogVolXxx /dev/vg/LogVolXxx none LogVolXxxYyy /dev/vg/LogVolXxxYyy /var/xxx/keyfile luks
[...] /dev/mapper/vg-LogVolAaa /Aaa ext4 noatime 1 2 /dev/mapper/LogVolXxx /var/Xxx ext4 noatime 1 2 /dev/mapper/LogVolXxxYyy /var/Xxx/Yyy ext4 noatime 1 2 [...]
A problem appears during the boot, the keyfile is not found. I suppose the system is trying to decrypt the device before mounting it.
How can I handle this?