Why are logical volumes used with LUKS partitions

lukspartition

All of the instructions I've seen on setting up a LUKS encrypted drive require using logical volumes to create root and swap partitions inside a LUKS device. Why not just put standard partitions inside with fdisk or parted? I know that it can be done. I've tried it. But I have no idea how to set up GRUB and initramfs to work with them. And in order to get the partitions to show up (e.g. in blkid) I have to run parted and remake them. They aren't automatically added to any device list when I open the encrypted device.

Best Answer

What you call “standard” partitions are IBM PC partitions. The point of using them is to be compatible with other operating systems that like or even require IBM PC partitions.

Inside a Linux software RAID volume, or inside a LUKS encrypted volume, only Linux cares. So you might as well use Linux's native partitioning system, i.e. LVM, which is a lot more powerful (names rather than numbers, non-consecutive partitions, mirroring, snapshots, volume groups, …).

Since there's rarely any point of having PC-style partitions inside LUKS volumes, distribution scripts are generally not set up to handle that case.

Related Question