Merge branch 'growpart-skip-non-partition' into 'main'

standard/growpart: Skip backing devices that are not partitions

See merge request fedora/bootc/base-images!725
This commit is contained in:
Colin Walters 2026-09-16 21:39:59 +00:00
commit 8bb5c4f624

View file

@ -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