X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-remote.git/blobdiff_plain/7d04f87eb75b30b99ef841c0ad0447deca898c8c..3f15f96f630ed9006ab99ac92b601c1e902442de:/files/usr/sbin/invirt-lvm?ds=inline 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()