From 82a11c4a4511f42edcfd63d769d1917034a7b658 Mon Sep 17 00:00:00 2001 From: Quentin JOLY Date: Wed, 16 Sep 2026 21:39:59 +0000 Subject: [PATCH] standard/growpart: Skip backing devices that are not partitions --- standard/bootc-generic-growpart | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/standard/bootc-generic-growpart b/standard/bootc-generic-growpart index cc620514..2a7b43e1 100755 --- a/standard/bootc-generic-growpart +++ b/standard/bootc-generic-growpart @@ -14,9 +14,14 @@ if ! test -d "${syspath}"; then echo "failed to find backing device ${syspath}"; exit 1 fi - - -# Note that we expect that the rootfs is on a partition +# Only partitions have a "partition" attribute in sysfs. A rootfs on an +# mdraid array, on a device-mapper node, or directly on a whole disk has +# nothing here for us to grow, and growing those is a different +# operation. Skip rather than fail, so that the unit does not leave an +# otherwise healthy system "degraded". +if ! test -f "${syspath}"/partition; then + echo "Not growing ${backing_device}: not a partition"; exit 0 +fi partition=$(cat "${syspath}"/partition) # Walk up to find the parent blockdev