Table of Contents

LUKS

add key cryptsetup luksAddKey /dev/disk/by-partlabel/CRYPT
close device cryptsetup luksClose /dev/mapper/OPENEDCRYPT

LVM on LUKS

format disk with LUKS and LVM

cryptsetup luksFormat -y /dev/disk/by-partlabel/CRYPTPART
cryptsetup luksOpen /dev/disk/by-partlabel/CRYPTPART LVMCRYPT
pvcreate /dev/mapper/LVMCRYPT
vgcreate CRYPT_DATA /dev/mapper/LVMCRYPT
lvcreate -n LVNAME -l100%VG CRYPT_DATA
mkfs.xfs /dev/mapper/LVNAME

resize LVM on LUKS

Arch Wiki: Resizing LVM on LUKS

Extend LUKS encrypted partition to fill entire disk

unlock with TPM

Troubleshooting

Command failed: Device busy on LVM

vgchange -a n VOLGROUPNAME

further reading