Wait for device size change, before resize2fs (#5)

This commit is contained in:
Marek Marczykowski 2011-03-31 00:44:58 +02:00
parent 212fd13957
commit 01ef2aff9e

View File

@ -99,7 +99,7 @@ def main():
retcode = subprocess.check_call(["losetup", "--set-capacity", loop_dev])
retcode = subprocess.check_call([qvm_run_path, "-uroot", vmname,
"resize2fs /dev/xvdb" ])
"while [ \"`blockdev --getsize64 /dev/xvdb`\" -lt {0} ]; do sleep 0.2; done; resize2fs /dev/xvdb".format(size_bytes) ])
else:
retcode = subprocess.check_call(["resize2fs", "-f", vm.private_img])