Bug#618016: lvremove sometimes fails to remove snapshot volumes
Michael Goetze
mgoetze at mgoetze.net
Sun Mar 13 13:15:07 UTC 2011
Package: lvm2
Version: 2.02.66-5
Severity: important
I am using LVM snapshots for my backup and I am finding it impossible to
automate their removal. My current code looks like this:
umount /mnt/snap/$LV || exit 3
sleep 1
lvremove -f $VG/$LV-snap
if [ $? -ne 0 ]; then
sleep 5
lvremove -f --noudevsync $VG/$LV-snap || exit 2
fi
and it fails regularily, like this:
Unable to deactivate open vg0-home--snap (254:7)
Unable to deactivate logical volume "home-snap"
Unable to deactivate open vg0-home--snap (254:7)
Unable to deactivate logical volume "home-snap"
I have also tried adding such commands as "sync" or "sleep 60" between
umount and lvremove, none of which helped.
I strongly suspect it is the same bug as reported here:
https://bugzilla.redhat.com/show_bug.cgi?id=577798
which is why I tried the --noudevsync option, to no avail.
More information about the pkg-lvm-maintainers
mailing list