lkml.org 
[lkml]   [2009]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRegression: 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
dm-devel@redhat.com.


Thanks for your work & regards
Mario
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2009-08-31 13:55    [W:0.036 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site