admin:linux:luks

LUKS

add key cryptsetup luksAddKey /dev/disk/by-partlabel/CRYPT
close device cryptsetup luksClose /dev/mapper/OPENEDCRYPT
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
vgchange -a n VOLGROUPNAME
  • Last modified: 2024-07-05 14:31