diagnostics

created onJanuary 19, 2022

list mapped devices

root@idoru:/# ls -l /dev/mapper total 0 crw------- 1 root root 10, 236 Dec 30 22:48 control lrwxrwxrwx 1 root root 7 Dec 30 22:48 cr-nvme0n1p10 -> ../dm-4 lrwxrwxrwx 1 root root 7 Dec 30 22:48 cr-nvme0n1p11 -> ../dm-5 lrwxrwxrwx 1 root root 7 Dec 30 22:48 cr-nvme0n1p7 -> ../dm-2 lrwxrwxrwx 1 root root 7 Dec 30 22:48 cr-nvme0n1p9 -> ../dm-3 lrwxrwxrwx 1 root root 7 Dec 30 22:48 cr-sda2 -> ../dm-0 lrwxrwxrwx 1 root root 7 Dec 30 22:48 cr-sda3 -> ../dm-1

show status of LUKS device

root@idoru:/# cryptsetup -v status cr-sda3 /dev/mapper/cr-sda3 is active and is in use. type: LUKS1 cipher: aes-xts-plain64 keysize: 256 bits device: /dev/sda3 offset: 4096 sectors size: 488278016 sectors mode: read/write Command successful.

show reference count to a LUKS device

a reference count > 0 indicates that the LUKS device is mounted under some mount point

dmsetup info -c --noheadings -o open cryptsda3

dump the header information of a LUKS device

root@idoru:/# cryptsetup luksDump /dev/sda3 LUKS header information for /dev/sda3 Version: 1 Cipher name: aes Cipher mode: xts-plain64 Hash spec: sha256 Payload offset: 4096 MK bits: 256 MK digest: 65 c9 a6 69 b0 fd 0d 6c 6a 48 3d 7f 2b f4 5c f9 e9 89 d7 e0 MK salt: 57 de 6c 0f a4 f5 6d 21 66 52 f7 93 b9 9e e0 6c 09 cd 71 47 0a dd f4 e4 2d 2e ee e0 62 72 7c 7a MK iterations: 530000 UUID: 524654a9-61f7-4e01-8cdb-e8ac35e97504 Key Slot 0: ENABLED Iterations: 4129031 Salt: 8d 47 96 50 59 28 e3 1c 02 75 bc a5 51 24 4e 84 ac 40 81 92 39 36 09 27 d0 f8 0b 3c f1 68 f5 0a Key material offset: 8 AF stripes: 4000 Key Slot 1: ENABLED Iterations: 4091906 Salt: 9f 15 cb a1 91 a9 2a 0c bf 13 f1 b7 83 f3 6a c6 51 ef 0f d3 0e 97 c3 30 6e 47 bc 02 35 e0 cd 45 Key material offset: 264 AF stripes: 4000 Key Slot 2: ENABLED Iterations: 4124873 Salt: 43 bb af 1e 12 cb e5 fb f1 c7 e3 84 7c 46 3a f1 e9 1f 39 e7 d8 63 37 e4 82 14 5a 1d 41 2e f4 20 Key material offset: 520 AF stripes: 4000 Key Slot 3: DISABLED Key Slot 4: DISABLED Key Slot 5: DISABLED Key Slot 6: DISABLED Key Slot 7: ENABLED Iterations: 4158375 Salt: 4d 70 a8 ab 54 b2 b1 19 61 8e 47 9c 26 69 6f 12 ad 10 6d be 76 a7 51 df 84 cb 38 89 d4 19 7c bb Key material offset: 1800 AF stripes: 4000