[Bug 223583] Re: LVM unusable after uncleanly unplugging USB disk

Jean-Louis Dupond jean-louis at dupond.be
Thu Mar 8 14:21:10 UTC 2012


Thank you for taking the time to report this bug and helping to make
Ubuntu better. However, I am closing it because the bug has been fixed
in the latest development version of Ubuntu - Precise Pangolin. It won't
be fixed in previous versions of Ubuntu because the package doesn't fit
the requirements for backporting. See
https://help.ubuntu.com/community/UbuntuBackports for more information.

** Changed in: cryptsetup (Ubuntu)
       Status: Confirmed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to cryptsetup in Ubuntu.
https://bugs.launchpad.net/bugs/223583

Title:
  LVM unusable after uncleanly unplugging USB disk

Status in cryptsetup:
  Confirmed
Status in “cryptmount” package in Ubuntu:
  Confirmed
Status in “cryptsetup” package in Ubuntu:
  Fix Released
Status in “lvm2” package in Ubuntu:
  Triaged

Bug description:
  Binary package hint: lvm2

  When a disk containing an active LVM volume has been removed without
  properly closing the LVM volume first, LVM becomes unusable as the LVM
  mapping entries remain active but can never be closed anymore since
  the disk is gone.

  ls -al /dev/mapper/
  totaal 0
  drwxr-xr-x  2 root root     180 2008-04-27 19:55 .
  drwxr-xr-x 15 root root   14880 2008-04-28 12:21 ..
  crw-rw----  1 root root  10, 63 2008-04-27 21:53 control
  brw-rw----  1 root disk 254,  5 2008-04-27 19:55 encrypted-debian
  brw-rw----  1 root disk 254,  4 2008-04-27 19:55 encrypted-swap
  brw-rw----  1 root disk 254,  3 2008-04-27 19:55 luks_crypto_1c95cbac-b4a3-436e-9d75-56f8ff2d8947

  luks_crypto_XXX is the partition on the USB disk. encrypted-debian and
  encrypted-swap are the LVM volumes which were enabled with  vgchange
  -a y

  Then, the disk was removed (perhaps laptop suspended, disk removed
  when packing it, laptop resumed, it's easy to accidentally unplug),

  > vgchange -a n

    /dev/mapper/luks_crypto_1c95cbac-b4a3-436e-9d75-56f8ff2d8947: read failed after 0 of 4096 at 92643786752: Invoer-/uitvoerfout
    /dev/mapper/luks_crypto_1c95cbac-b4a3-436e-9d75-56f8ff2d8947: read failed after 0 of 4096 at 0: Invoer-/uitvoerfout
    /dev/encrypted/swap: read failed after 0 of 4096 at 805240832: Invoer-/uitvoerfout
    /dev/encrypted/swap: read failed after 0 of 4096 at 0: Invoer-/uitvoerfout
    /dev/encrypted/debian: read failed after 0 of 4096 at 90760478720: Invoer-/uitvoerfout
    /dev/encrypted/debian: read failed after 0 of 4096 at 0: Invoer-/uitvoerfout

  
  So there is no real way to get rid of these anymore, and re-plugging this disk does not try to mount the Luks partition anymore. The only real way out is to reboot.

  What should happen: the disk is not going to come back in the original
  mounted state, ever again. LVM should just forget about it, discard
  whatever is there, either automatically (preferred) or through a
  commandline switch (which would ideally be done directly by Ubuntu
  when one unplugs such a disk).

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




More information about the foundations-bugs mailing list