cryptsetup fails for certain mapping names, regression from edgy

Bug #108456 reported by Matias
8
Affects Status Importance Assigned to Milestone
cryptsetup (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

The command `cryptsetup luksOpen /dev/DEVICE NAME' no longer works when NAME==DEVICE. It
used to work in edgy. For example, the command

    # cryptsetup luksOpen /dev/sda6 sda6

fails (well, cryptsetup succeeds, but /dev/mapper/sda6 gets the "linear" target, so it's unusable).
More generally,

    # cryptsetup luksOpen /dev/sda6 sda4

also fails. Both worked fine in edgy. A more detailed transcript follows:

The following used to work in edgy, but doesn't work after upgrading to feisty:

root@chucho:~# dmsetup ls | grep sda6
root@chucho:~#
root@chucho:~# cryptsetup luksOpen /dev/sda6 sda6
Enter LUKS passphrase:
key slot 0 unlocked.
Command successful.
root@chucho:~# mount /dev/mapper/sda6 /crypt
mount: unknown filesystem type 'crypto_LUKS'
root@chucho:~# dmsetup status sda6
0 18603207 linear
root@chucho:~# dmsetup remove sda6

This, however, does work in feisty:

root@chucho:~# cryptsetup luksOpen /dev/sda6 foo
Enter LUKS passphrase:
key slot 0 unlocked.
Command successful.
root@chucho:~# mount /dev/mapper/foo /crypt
root@chucho:~# df -hT /crypt
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/cs
              ext3 8.8G 7.2G 1.2G 87% /crypt
root@chucho:~# dmsetup status foo
0 18602175 crypt

Revision history for this message
Kees Cook (kees) wrote :

I suspect this is due to changes in the udev rules for devmapper devices. Perhaps the symlinks are colliding?

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

From your bug report, it looks like /dev/mapper/foo exists - so this doesn't seem to be a devmapper bug?

Revision history for this message
Reinhard Tartler (siretart) wrote :

Scott, this bug is filed against cryptsetup and set to Confirmed. Can you perhaps explain how and why this is a bug in the cryptsetup package? Is the bug in the packaging/the shipped udev rules or in cryptsetup upstream?

Revision history for this message
Reinhard Tartler (siretart) wrote :

it seems to me that this bug has wrong bug status.

There have been many changes to this in devmapper, udev rules and cryptsetup that may have an effect on this. Does this still happen? Could someone please try again with at least hardy final?

Changed in cryptsetup:
status: Confirmed → Incomplete
Revision history for this message
Christoph (christop) wrote :

Works in Hardy to me.

Revision history for this message
Reinhard Tartler (siretart) wrote :

okay, I assume that this bug is fixreleased then. If you still encounter it, please reopen.

Changed in cryptsetup:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.