From 01ef2aff9ed26389e88f9c1a86a74c7c38bfd5ee Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Thu, 31 Mar 2011 00:44:58 +0200 Subject: [PATCH] Wait for device size change, before resize2fs (#5) --- dom0/qvm-tools/qvm-grow-private | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom0/qvm-tools/qvm-grow-private b/dom0/qvm-tools/qvm-grow-private index e14802b6..7ca50d2e 100755 --- a/dom0/qvm-tools/qvm-grow-private +++ b/dom0/qvm-tools/qvm-grow-private @@ -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])