Etch + encryption + lvm + multiple disks/pvs

I'm trying to rebuild my system with a pair of 120 GB drives and a 160GB drives. In the partitioner, I configured the drives with

hda1 1.5GB encrypted swap
hda2 500MB /boot
hda3 500MB encrypted /keys (for key files for the other encrypted partitions)
hda4 119GB encrypted pv

hdc1 120GB encrypted pv

hdd1 160GB encrypted pv

I am using a single volume group and multiple logical volumes. After the encrypted partitions were filled with random data, I added my passphrases for all of the partitions, went back into the partitioner and built the LVM config, created my VG, added the PVs and created all my LVs. Finished the install and rebooted.

When the system came up, I get the following:

hda information
hdc information
hdd information

Begin: Mounting root file system... ...
Begin: Running /scripts/local-top ...

device-mapper: ioctl: 4.7.0-ioctl (2006-06-24) initialised:
Volume group "vg00" not found
Setting up cryptographic volume hdd1_crypt (based on /dev/hdd1
Enter LUKS passphrase:
key slot 0 unlocked.
Command successful
Couldn't find device with uuid ''.
Couldn't find all physical volumes for volume group vg00.
Couldn't find device with uuid ''.
Couldn't find all physical volumes for volume group vg00.
Volume group "vg00" not found
cryptsetup: failed to setup lvm devuce
Done.
Begin: Waiting for root file system... ...

it finally boots to busybox.

Is there a fix/workaround to get it to recognize all of the physical volumes at boot? I suspect that LUKS is not attempting to open the other filesystems before trying to find the volume group. Are there any recommendations? Should I just build on one disk (hda) and add the other disks by hand, rewriting my initrd each time?

Suggestions?
--storm

No votes yet

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Etch + encryption + lvm +

I'm not really clear from your description, but it looks like you may be trying to build the volume group on a base partition that isn't defined yet, because the keys for the base are in the volume group - failure.

Try building the system on your first drive, ignoring the other two for the time being. Then you will have a working system to go with. Done with that, encrypt the other two drives with cryptsetup and add keys for them to be read from /etc/keys at boot. Then play with adding them to lvm if you wish, but that may not be necessary if you're just using them for brute storage... It might be simpler to add them to /etc/fstab ;)

So, I would take it this way - build the root directory outside the LVM scheme on it's own encrypted partition, and place the keys for the other partitions and disks in the root partition - hence placing something in /etc/keys/ and telling crypttab to look there for it. use LVM on the rest of the the system, excluding /boot and /

The first time you boot, you'll need to give two passphrases - that's why it may be a good idea to use exactly the same passphrase for both - you can change them later.

--
Jai yen

Syndicate content