From e445ebd0365e198a119f6f042d6c024f73b059a9 Mon Sep 17 00:00:00 2001 From: Brendan Kerrigan Date: Fri, 16 Oct 2015 14:21:44 -0400 Subject: [PATCH] Update the installer to dynamically calculate dom0 rootfs volume size during updates, to reflect previous work done to do so during clean installs. Signed-off-by: Brendan Kerrigan --- part2/stages/Functions/install-main | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/part2/stages/Functions/install-main b/part2/stages/Functions/install-main index 971cc1b..d0a3ddc 100644 --- a/part2/stages/Functions/install-main +++ b/part2/stages/Functions/install-main @@ -306,6 +306,10 @@ upgrade_dom0() mixedgauge "Upgrading filesystem..." ${PERCENT} PERCENT=$((PERCENT + 30)) + + DOM0_SIZE_BYTES=$(zcat ${DOM0_ROOTFS} | wc -c) + DOM0_ROOT_LV_SIZE=$(((${DOM0_SIZE_BYTES} / 1048576) + 1))M + do_cmd lvcreate --name `basename ${ROOT_DEV}.new` \ --size ${DOM0_ROOT_LV_SIZE} `dirname ${ROOT_DEV}.new` >&2 || return 1 write_rootfs ${DOM0_ROOTFS} ${ROOTFS_TYPE} ${ROOT_DEV}.new >&2 || {