1

Which command would you suggest to use in order to find out whether a LUKS encrypted partition is mapped or not (other than looking at or using lsblk output)?

By opened device, I mean a device for which the command

ctrytpsetup luksOpen <device> <map name>

was executed.

user123456
  • 4,758
  • 11
  • 52
  • 78

1 Answers1

3

I would do it like this:

$ sudo dmsetup ls
    crypthome   (254:0)
$ sudo dmsetup -v table /dev/mapper/crypthome 
    Name:              crypthome
    State:             ACTIVE
    Read Ahead:        256
    Tables present:    LIVE
    Open count:        1
    Event number:      0
    Major, minor:      254, 0
    Number of targets: 1
    UUID: CRYPT-LUKS1-87863643a6aa43c191f69ee3a2b3301a-crypthome
    0 870313984 crypt aes-xts-plain64 0000000000000000000000000000000000000000000000000000000000000000 0 8:2 4096
gabriwinter
  • 146
  • 1