From 6ddaa5e0dd0b0ce9dbffef17f7be4b505494d536 Mon Sep 17 00:00:00 2001 From: Lars Karlitski Date: Tue, 21 May 2019 17:43:32 +0200 Subject: [PATCH] test: Generalize fs resizing in vm.install This should work on RHEL as well. --- test/vm.install | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/vm.install b/test/vm.install index c6c01196..91bd188c 100644 --- a/test/vm.install +++ b/test/vm.install @@ -5,8 +5,9 @@ SRPM="$1" # Grow root partition to make room for images. This only works on Fedora right now. echo ", +" | sfdisk -N 2 -f /dev/vda partprobe -pvresize /dev/vda2 -lvresize fedora/root -l+100%FREE -r +pvs --noheadings -opv_name | xargs pvresize +rootlv=$(findmnt --noheadings -oSOURCE /) +lvresize $rootlv -l+100%FREE -r rm -rf build-results su builder -c "/usr/bin/mock --no-clean --resultdir build-results --rebuild $SRPM"