[rc-scripts] LVM + LUKS = fail
Radosław Zieliński
radek at pld-linux.org
Wed Jun 30 06:36:55 CEST 2010
I have a LVM volume group, created over three logical partitions:
# fdisk -l /dev/sda | grep LVM
/dev/sda5 2676 8754 48829536 8e Linux LVM
/dev/sda6 8755 14833 48829536 8e Linux LVM
/dev/sda7 14834 19457 37142248+ 8e Linux LVM
It contains a single LVM volume:
# lvscan
ACTIVE '/dev/vg/home' [60.00 GiB] inherit
The volume has been formatted for LUKS using cryptsetup, and an ext4
partition has been created:
# service cryptsetup start
Starting disk encryption...........................................[ BUSY ]Enter passphrase for /dev/vg/home:
[ DONE ]
# tail -n1 /etc/crypttab
home /dev/vg/home none
# grep mapper.home /etc/fstab
/dev/mapper/home /nhome ext4 defaults 1 2
# mount /nhome
# mount | grep nhome
/dev/mapper/home on /nhome type ext4 (rw)
So far, so good. But rc-scripts try to start the encryption first, and
scan for the LVM volumes later, so it fails at boot time.
Question: what is the correct way of solving it?
(Current workaround: rc.local, but I'd prefer to get rid of it.)
--
radek
More information about the pld-devel-en
mailing list