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
unlock with TPM
Troubleshooting
Command failed: Device busy on LVM
vgchange -a n VOLGROUPNAME
further reading
- LVM on LUKS (Alpine Linux Wiki)