+sipb-xen-remctl-auto (1.1) unstable; urgency=low
+
+ * Explicitly lock a volume before deleting it
+
+ -- Evan Broder <broder@mit.edu> Sun, 05 Oct 2008 18:01:34 -0400
+
sipb-xen-remctl-auto (1.0.21) unstable; urgency=low
* start inetd too in init script
lvname = prefix + machine + "_" + disk
lvpath = "/dev/" + vg + "/" + lvname
if subcommand == "lvremove":
+ def error():
+ print >>sys.stderr, "Error removing LV %s\n" % lvname
+ sys.exit(1)
+ rv = call(["/sbin/lvchange", "-a", "n", lvpath])
+ if rv != 0:
+ error()
+ rv = call(["/sbin/lvchange", "-a", "ey", lvpath])
+ if rv != 0:
+ error()
rv = call(["/sbin/lvremove", "--force", lvpath])
- ensureoff(machine)
if rv != 0:
- print >>sys.stderr, "Error removing LV %s\n" %(lvname,)
- sys.exit(1)
+ error()
+ ensureoff(machine)
elif subcommand == "lvresize":
size = sys.argv[4]
ensureoff(machine)