[Bug 223583] Re: LVM unusable after uncleanly unplugging USB disk
RW Penney
223583 at bugs.launchpad.net
Tue Apr 7 07:34:46 UTC 2026
This issue seems long outdated, and not an issue with cryptmount itself.
Can we actually close this ticket? Thanks.
--
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