Regression: device-mapper cannot open devices with identical uuids anymore
Hello,
somewhere between 2.6.26 and 2.6.30 device-mapper stopped being able to open multiple devices with the same UUID:
# uname -a Linux darkside 2.6.30-1-686 #1 SMP Sat Aug 15 19:11:58 UTC 2009 i686 GNU/Linux # cp -ia /tmp/foo0 /tmp/foo1 # losetup /dev/loop0 /tmp/foo0 # losetup /dev/loop1 /tmp/foo1 # cryptsetup luksOpen /dev/loop0 foo0 Enter LUKS passphrase for /dev/loop0: key slot 0 unlocked. Command successful. # cryptsetup luksOpen /dev/loop1 foo1 Enter LUKS passphrase for /dev/loop1: key slot 0 unlocked. [234800.953458] device-mapper: ioctl: device doesn't appear to be in the dev hash table. Command failed: device-mapper: create ioctl failed: Device or resource busy
This did work in 2.6.26:
# uname -a Linux abaris 2.6.26-2-686 #1 SMP Fri Aug 14 01:27:18 UTC 2009 i686 GNU/Linux # cp -ia /tmp/foo0 /tmp/foo1 # losetup /dev/loop0 /tmp/foo0 # losetup /dev/loop1 /tmp/foo1 # cryptsetup luksOpen /dev/loop0 foo0 Enter LUKS passphrase: key slot 0 unlocked. Command successful. # cryptsetup luksOpen /dev/loop1 foo1 Enter LUKS passphrase: key slot 0 unlocked. Command successful.
Equal preparation-sequence for both tests is:
# dd if=/dev/zero of=/tmp/foo0 bs=1M count=100 # losetup /dev/loop0 /tmp/foo0 # cryptsetup luksFormat /dev/loop0 # losetup -d /dev/loop0
Changing the UUID in the LUKS header of the foo1 image helps to successfully open the second device, so the issue seems to be closely related to the identical UUID.
I've stumbled across this issue because I backup crypted devices and sometimes (not very often :)) I have to have a peek into one of the backups...
PS: I'm mailing here because my mail doesn't seem to get delivered to [email protected].
Thanks for your work & regards
Mario
Signature · 2 lines
A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing?
Quoted 4 lines · Mario 'BitKoenig' Holbe
Hello,
somewhere between 2.6.26 and 2.6.30 device-mapper stopped being able to open multiple devices with the same UUID:
This is not related to kernel at all.
cryptsetup since 1.0.7 just started to set UUID for device and kernel device-mapper never allowed device with the same UUID.
See http://code.google.com/p/cryptsetup/issues/detail?id=34
(also for workaround, next version will have --disable-uuid option)
Milan
--
[email protected]