From 8d3df35a357082a57be4395faf650d7292a263a8 Mon Sep 17 00:00:00 2001 From: Hristo Marinov Date: Nov 02 2023 14:21:11 +0000 Subject: [PATCH 1/3] Fix resizing underlying filesystem together with the LV --- diff --git a/arm-image-installer b/arm-image-installer index 0054e87..e165f68 100755 --- a/arm-image-installer +++ b/arm-image-installer @@ -467,7 +467,7 @@ if [ "$RESIZEFS" != "" ]; then if [ "$LVM_NAME" != "" ]; then vgchange -a y $LVM_NAME > /dev/null 2>&1 pvresize "$ROOTPART" - lvextend -l +100%FREE /dev/$LVM_NAME/root + lvextend -l +100%FREE -ry /dev/$LVM_NAME/root ROOTPART="/dev/$LVM_NAME/root" fi fi From 454cd576185f32b51913c5f538d02850353813e8 Mon Sep 17 00:00:00 2001 From: Hristo Marinov Date: Nov 02 2023 21:54:44 +0000 Subject: [PATCH 2/3] Clean up XFS file system resizing conditional statement --- diff --git a/arm-image-installer b/arm-image-installer index e165f68..6fe0c1d 100755 --- a/arm-image-installer +++ b/arm-image-installer @@ -472,7 +472,7 @@ if [ "$RESIZEFS" != "" ]; then fi fi - if [ "$FS_TYPE" = "xfs" ] && [ "$LVM_NAME" != "" ]; then + if [ "$FS_TYPE" = "xfs" ]; then mkdir /tmp/root > /dev/null 2>&1 mount "$ROOTPART" /tmp/root > /dev/null 2>&1 xfs_growfs /tmp/root From eb43a3bde2ff97a5df79adfe962739098f0d6693 Mon Sep 17 00:00:00 2001 From: Hristo Marinov Date: Nov 03 2023 12:04:55 +0000 Subject: [PATCH 3/3] Clean up redundant XFS filesystem resizing --- diff --git a/arm-image-installer b/arm-image-installer index 6fe0c1d..e47ce9b 100755 --- a/arm-image-installer +++ b/arm-image-installer @@ -472,11 +472,7 @@ if [ "$RESIZEFS" != "" ]; then fi fi - if [ "$FS_TYPE" = "xfs" ]; then - mkdir /tmp/root > /dev/null 2>&1 - mount "$ROOTPART" /tmp/root > /dev/null 2>&1 - xfs_growfs /tmp/root - elif [ "$FS_TYPE" = "btrfs" ]; then + if [ "$FS_TYPE" = "btrfs" ]; then mkdir /tmp/root > /dev/null 2>&1 mount "$ROOTPART" /tmp/root > /dev/null 2>&1 btrfs filesystem resize max /tmp/root