← Back to team overview

desktop-packages team mailing list archive

[Bug 484429] Re: Plugging in a LUKS device causes the following error: Error unlocking device: cryptsetup exited with exit code 239: Command failed: Device already exists

 

I can reproduce the behavior on Ubuntu 11.10 (Natty) 64bit with the
following steps:

1) connect a luks-encrypted external harddrive and mount it
2) disconnect the drive
3) connect the drive
4) try to mount the encrypted partition again (happens automatically by default when inserted)

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gnome-disk-utility in Ubuntu.
https://bugs.launchpad.net/bugs/484429

Title:
  Plugging in a LUKS device causes the following error: Error unlocking
  device: cryptsetup exited with exit code 239: Command failed: Device
  already exists

Status in abstraction for enumerating and managing block devices:
  Fix Released
Status in “cryptsetup” package in Ubuntu:
  Confirmed
Status in “gnome-disk-utility” package in Ubuntu:
  Invalid
Status in “udisks” package in Ubuntu:
  Fix Released
Status in “cryptsetup” source package in Lucid:
  Confirmed
Status in “gnome-disk-utility” source package in Lucid:
  Invalid
Status in “udisks” source package in Lucid:
  Confirmed
Status in “cryptsetup” source package in Maverick:
  Confirmed
Status in “gnome-disk-utility” source package in Maverick:
  Invalid
Status in “udisks” source package in Maverick:
  Fix Released
Status in “cryptsetup” package in Debian:
  Fix Released
Status in “udisks” package in Fedora:
  Unknown

Bug description:
  Binary package hint: cryptsetup

  When creating an encrypted drive in Palimsest (Disk Utility), the
  application does not lock the disk when finished creating the
  encrypted partition. Failing to lock the drive manually without
  ejecting will give the appearance that the disk is no longer usable
  giving this error. Bringing the key to another computer works because
  the drive is not unlocked (luks mapper point is not already present)
  on that system.

  Steps to reproduce:
  1) Go into palimsest (disk utility) and create an encrypted partition on an external disk.
  2) Quit Palimsest
  3) Pull the USB stick
  4) Intert the USB stick

  Result:
  GNOME displays a dialog for the password. Once submitted, the following error comes up:
  Error unlocking device: cryptsetup exited with exit code 239: Command failed: Device already exists

  This is due to the mapping being Opened when the disk is created, but
  never closed, which creates a conflict.

  Workaround:
  Do the following to resolve the conflict of the existing device i /dev/mapper.
  $ ls -al /dev/mapper
  (Identify the mount point for your drive, "sudo blkid" may help)
  $ sudo cryptsetup luksClose devkit-disks-luks-uuid-<uuid>-uid1000

  What is expected:
  Palimsest (Disk Utility) is expected to  "cryptsetup luksClose" the mapped device when finished creating the encrypted partition.

  ProblemType: Bug
  Architecture: i386
  CheckboxSubmission: 19ba8f45e3d3d7bf348103cee5a0eeaa
  CheckboxSystem: 099634613a96bc3665b92c4a813055e8
  Date: Tue Nov 17 15:37:09 2009
  DistroRelease: Ubuntu 9.10
  Package: cryptsetup 2:1.0.6+20090405.svn49-1ubuntu7
  ProcEnviron:
   LANGUAGE=
   PATH=(custom, user)
   LANG=en_CA.UTF-8
   SHELL=/bin/bash
  ProcVersionSignature: Ubuntu 2.6.31-12.41-generic
  SourcePackage: cryptsetup
  Uname: Linux 2.6.31-12-generic i686

To manage notifications about this bug go to:
https://bugs.launchpad.net/udisks/+bug/484429/+subscriptions