Skip to content

Commit

Permalink
Merge pull request #9 from brendank310/fix-upgrade-dom0-rootfs-size
Browse files Browse the repository at this point in the history
[OXT-383] Update the installer to dynamically calculate dom0 rootfs volume size…
  • Loading branch information
jean-edouard committed Oct 20, 2015
2 parents 0a6f5c6 + e445ebd commit 8bbe8d3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions part2/stages/Functions/install-main
Original file line number Diff line number Diff line change
Expand Up @@ -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 || {
Expand Down

0 comments on commit 8bbe8d3

Please sign in to comment.