0

My current LVM configuration: I have two physical volumes (pv): 256 GB of SSD and 1 TB of HDD. These volumes are used by different volume groups (vg):

  • SSD vg has logical volumes which are mount where speed is required
  • HDD vg for all other places

Now I want to perform full disk encryption, but all tutorials (e.g. this one) uses only one volume group to create logical volumes, so I have doubts that I will not be able to split my drives to "fast" and "common" ("fast" from SSD, "common" from HDD) groups and mount "fast" group where needed.

So my question is: how to perform full disk encryption, but keep two volume groups in LVM?

  • Not sure if I understand your problem. The tutorial you linked shows how to encrypt one drive and set up LVM on it. You have two drives, so you encrypt one, create one encrypted VG, then you encrypt the other, to create another encrypted VG. Encryption doesn't really change anything about how you use / partition / split up / manage your drives. – frostschutz Sep 26 '18 at 8:39
  • When doing full disk encryption, it's best to read the documentation for the specific distro. This is because with full disk encryption you'll need an initramfs to act as the rootfs when the system first boots. This initramfs will have a script to obtain the LUKS passphrase, from a prompt, USB drive, etc. Once the LUKS partition is unlocked the actual rootfs is mounted and the boot process proceeds as normal. The process for creating and maintaining the initramfs is often distro-specific. In your case, you'll probably have an initramfs (which you can create with genkernel) that will... – Emmanuel Rosa Sep 27 '18 at 2:15
  • ... prompt for the LUKS passphrase to unlock the LUKS container which has the LVM VG containing the LV with the real rootfs; This means you'll also need to enable LVM with genkernel. Phew! Gentoo has a service you can enable to unlock LUKS partitions AFTER the system is booting from the real rootfs, so you can use that to unlock the other LUKS partition. Start with this guide, and then proceed to the full disk encryption guide at the bottom: wiki.gentoo.org/wiki/… – Emmanuel Rosa Sep 27 '18 at 2:19
1

You can do LUKS on LVM, check this link: https://wiki.archlinux.org/index.php/Dm-crypt/Encrypting_an_entire_system#LUKS_on_LVM

You can encrypt one or all volumes.

You can use SSD as a volume to do "fast", generally even without encryption you should avoid to mix volume creation of SSD and HDD.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.