Bug#549691: lvm2: lvremove fails to remove open logical volume which is not opened
Michael Stapelberg
stapelberg at debian.org
Wed Oct 3 10:13:17 UTC 2012
Hi,
I have the same problem. lvremove fails to remove snapshot LVs in many
cases (but not 100% of the time).
As a workaround, I am currently using the "dmsetup remove" trick.
What can we do to fix this problem?
Here are the software versions I’m using:
lvm2 2.02.95-4
udev 175-3.1
dmsetup 2:1.02.74-4
libdevmapper1.02.1 2:1.02.74-4
systemd 44-4
linux-image-3.5.0 3.5.0-10.00.Custom (with Debian config)
The machine is an x86_64 AMD Athlon II X2 250.
I don’t have udisks installed, so I don’t have a file called
/lib/udev/rules.d/80-udisks.rules either. The suggested solution
from the RedHat bugzilla therefore is not applicable in my case.
To give a bit more information about how I reproduce this issue:
lvcreate -n snap_web -L 1G -s plana/domu-web
kpartx -a /dev/mapper/plana-snap_web
mount /dev/mapper/plana-snap_web1 /mnt/snap_web
# Run backup
umount /mnt/snap_web
kpartx -d /dev/mapper/plana-snap_web
lvremove -f plana/snap_web
I have also tried using maximum verbosity and stracing lvremove,
but I don’t understand enough of how lvremove should work to
make any sense out of it (even when comparing the working and
non-working strace output).
Best regards,
Michael
More information about the pkg-lvm-maintainers
mailing list