[pkg-cryptsetup-devel] Bug#781468: cryptsetup depends on udev in shutdown initramfs

Dominik Brodowski linux at dominikbrodowski.net
Sun Mar 29 17:22:44 UTC 2015


Package: cryptsetup
Version: 2:1.6.6-5

Using Debian's cryptsetup binary works just fine in my initramfs during
boot. However, it doesn't work well during shutdown, when systemd hands over
to the initramfs again[*], and udev is no longer running:

$ cryptsetup luksClose VOLUME
...
# Deactivating volume VOLUME
# dm status VOLUME ...
# Udev cookie ... created
# Udev cookie ... incremeted to 1
# Udev cookie ... incremeted to 2
# Udev cookie ... assigned to REMOVE task(2) with flags
# dm remove VOLUME
# VOLUME: Stacking NODE_DEL (verify_udev)
# Udev cookie ... decremented to 1
# Udev cookie ... waiting for zero

Then cryptsetup hangs, and does not return to the shell / shutdown script.

As the same issue also appears in upstream cryptsetup (1.7.0-git -
046e0e52), I see two options to resolve this for future revisions of
cryptsetup:

- Disable UDEV in the device mapper backend, same as it is done when
  running cryptsetup from the initramfs during boot.

- Provide a command line option similar to LVM's vgchange --noudevsync

Many thanks for taking a look at this issue.

Best,
        Dominik


[*] http://www.freedesktop.org/wiki/Software/systemd/InitrdInterface/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-cryptsetup-devel/attachments/20150329/1a3eed3a/attachment.sig>


More information about the pkg-cryptsetup-devel mailing list