From: Evan Broder Date: Tue, 18 Nov 2008 16:55:50 +0000 (-0500) Subject: I know this is the wrong answer, but doing lvchange -a n twice before X-Git-Tag: invirt-remote-host/0.0.8^0 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-remote.git/commitdiff_plain/refs/tags/invirt-remote-host/0.0.8 I know this is the wrong answer, but doing lvchange -a n twice before deleting an LV tends to make it less likely to error out svn path=/trunk/packages/invirt-remote-host/; revision=1716 --- diff --git a/debian/changelog b/debian/changelog index 6cbf7e6..0739c67 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +invirt-remote-host (0.0.8) unstable; urgency=low + + * I know this is the wrong answer, but doing lvchange -a n twice before + deleting an LV tends to make it less likely to error out + + -- Evan Broder Tue, 18 Nov 2008 11:55:22 -0500 + invirt-remote-host (0.0.7) unstable; urgency=low * Actually remove the unused vmboot remctl diff --git a/files/usr/sbin/invirt-lvm b/files/usr/sbin/invirt-lvm index 00766f6..6367216 100755 --- a/files/usr/sbin/invirt-lvm +++ b/files/usr/sbin/invirt-lvm @@ -44,6 +44,10 @@ if subcommand == "lvremove": def error(): print >>sys.stderr, "Error removing LV %s\n" % lvname sys.exit(1) + # I know this is the wrong answer, but sometimes the first + # lvchange -a n fails for no particularly good reason, so this is + # a pretty good workaround + call(["/sbin/lvchange", "-a", "n", lvpath]) rv = call(["/sbin/lvchange", "-a", "n", lvpath]) if rv != 0: error()