Changeset 175 for trunk/packages/sipb-xen-remctl-auto
- Timestamp:
- Oct 10, 2007, 1:50:54 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-remctl-auto/sipb-xen-remctl-auto/files/usr/sbin/sipb-xen-lvm
r174 r175 3 3 import sys 4 4 import os.path 5 from subprocess import call, PIPE 5 from subprocess import call, PIPE, Popen 6 6 7 7 def check(b): … … 16 16 def ensureoff(machine): 17 17 # Make sure the machine is off, but we don't care about errors if it is already off. 18 rv = call(["/usr/sbin/xm", "destroy", prefix + machine], stderr=PIPE) 18 rv = call(["/usr/sbin/xm", "destroy", prefix + machine], 19 stderr=PIPE) 19 20 20 21 if subcommand == "lvcreate-all": … … 48 49 size = sys.argv[4] 49 50 ensureoff(machine) 50 rv = call(["/sbin/lvresize", "-L", size + "M", lvpath]) 51 if rv != 0: 52 print >>sys.stderr, "Error resizing LV %s\n" %(lvname,) 51 p = Popen(["/sbin/lvresize", "-L", size + "M", lvpath], 52 stdin=PIPE, stderr=PIPE) 53 print >> p.stdin, 'y' 54 err = p.stderr.read() 55 if p.wait() != 0 and 'matches existing size' not in err: 56 print >> sys.stderr, "Error resizing LV %s:\n" %(lvname,) 57 print >> sys.stderr, err 53 58 sys.exit(1) 59 print >> sys.stderr, err 54 60 elif subcommand == "lvrename": 55 61 newmachine = sys.argv[4]
Note: See TracChangeset
for help on using the changeset viewer.