[pkg-cryptsetup-devel] Bug#601886: Bug#601886: cryptsetup: luksformat leaves the Luks device open

Milan Broz mbroz at redhat.com
Sat Feb 19 17:00:52 UTC 2011


On 02/19/2011 04:48 PM, Jonas Meurer wrote:
> but i guess that the race condition is between libdevmapper and udev.
> maybe this is related to the outdated devmapper (+udev rules) in debian?
> 
> on irc someone said that cryptsetup (luksClose) should wait for the
> device to become free in case that udev sync is enabled.

device-mapper udev rules are constructed such way that after cryptsetup
operation udev links processing should be finished.
(iow dmsetup udevcomplete must be the last udev rule which manipulates
with these links. Debian breaks it by reordering udev rules.)

(There is still race with "watch" udev rule but AFAIK only udisks
using that - but this is not the case here.)

Sorry but I cannot help here until Debian maintaner wakes up and updates
lvm/device-mapper udev rules. The changed Debian udev device-mapper rules
are not supported by upstream.

(You can add udevadm settle instead of sleep 1, but all these hacks are
workarounds which are not needed with upstream.)

Milan





More information about the pkg-cryptsetup-devel mailing list