[dm-crypt] How to determine if a LUKS device is opened or closed

Milan Broz gmazyland at gmail.com
Fri Aug 19 18:07:54 CEST 2016


On 08/19/2016 05:42 PM, Tom Hartman wrote:
> Is there a way through either cryptsetup or some other tool to
> determine if a luks device is opened or closed? It looks like the
> status command is only meant for mapped volumes.

yes, but mapped means open, IOW device is active with encryption
volume key in use.

There is no other state like "open". If you mean that device is active
_and_ used by other mapping or filesystem, you will see "is active and is in use"
in cryptsetup status command. ("In use" is not present if the mapped
volume is not mounted/used.)

> 
> Something like:
> 
> cryptsetup isLuksOpen /dev/sda1

What it is should do?

Milan


More information about the dm-crypt mailing list