profile picture

Michael Stapelberg

lvm-snapshots: fixing lvremove (2012)

published 2012-09-24, last modified 2018-03-23
Edit Icon

On an up-to-date Debian testing system, lvremove fails sporadically when removing snapshots. The cause is not yet fully debugged, see Debian bug 549691. The symptom looks like this:

$ lvremove -f plana/snap_web
  Unable to deactivate open plana-domu--web-real (253:3)
  Failed to resume domu-web.

To work around this, use the following commands (works reliably, tested for a few days):

$ dmsetup remove /dev/mapper/plana-snap_web
$ dmsetup remove /dev/mapper/plana-snap_web-cow
$ lvremove -f plana/snap_web

Since they only remove the snapshot-mappings, this does not touch the data on the original LV at all.

I run a blog since 2005, spreading knowledge and experience for almost 20 years! :)

If you want to support my work, you can buy me a coffee.

Thank you for your support! ❤️