projects
/
invirt/packages/invirt-remote.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
I know this is the wrong answer, but doing lvchange -a n twice before
[invirt/packages/invirt-remote.git]
/
files
/
usr
/
sbin
/
invirt-lvm
diff --git
a/files/usr/sbin/invirt-lvm
b/files/usr/sbin/invirt-lvm
index
00766f6
..
6367216
100755
(executable)
--- 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)
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()
rv = call(["/sbin/lvchange", "-a", "n", lvpath])
if rv != 0:
error()