[dm-crypt] Are /dev objects required for clean shutdown?

Milan Broz gmazyland at gmail.com
Tue Feb 6 17:31:52 CET 2018

On 02/06/2018 04:48 PM, Pascal wrote:
> Does cryptsetup need anything in /dev to shutdown cleanly?

Cryptsetup close (remove) operation should be very resilient,
it should work despite underlying device disappears etc.
But it just removes a kernel state, nothing persistent.

It cannot work if basic system files are missing, for example
/dev/mapper/control that is used to communicate with kernel device mapper.
And perhaps indirectly some other nodes, like console etc.

But if you reboot the box, the /dev/device is created dynamically in RHEL7
and LUKS metadata resides on disk. If anything is missing in /dev after
reboot, you probably did some other destructive action than just rm /dev.


More information about the dm-crypt mailing list