- log.write( "Extending vservers logical volume.\n" )
-
- # make all LVMs known again for lvextend/resize2fs to work
- utils.sysexec( "vgchange -ay", log )
-
- if not utils.sysexec_noerr("lvextend -l +%s /dev/planetlab/vservers" %
- remaining_extents, log):
- log.write( "Failed to extend vservers logical volume, continuing\n" )
- return 1
-
- log.write( "making the ext3 filesystem match new logical volume size.\n" )
- if BOOT_CD_VERSION[0] == 2:
- resize = utils.sysexec_noerr("resize2fs /dev/planetlab/vservers",log)
- elif BOOT_CD_VERSION[0] == 3:
+ log.write( "Extending vservers logical volume.\n" )
+ utils.sysexec( "vgchange -ay", log )
+ cmd = "lvextend -l +%s %s" % (remaining_extents, PARTITIONS["vservers"])
+ if not utils.sysexec_noerr(cmd, log):
+ log.write( "Failed to extend vservers logical volume, continuing\n" )
+ res = 1
+ break
+
+ log.write( "making the ext filesystem match new logical volume size.\n" )
+