bootc-generic-growpart.service

This systemd unit is included in the base image and operates as a generic fallback for expanding the root filesystem, targeted primarily for virtualized scenarios where the system is booted from a generic disk image (via e.g. bootc-image-builder), and the virtualization system configures a larger block device dynamically.

Interaction with cloud-init

There is known bug where cloud-init does not grow the root filesystem; see this RHEL issue.

The cloud-init project includes and defaults to enabling a growpart module which grows the root filesystem to the underlying size of the provisioned root block device; per above, this does not yet function on a Fedora/CentOS bootc system.

By default, the bootc-generic-growpart.service included in the base image will grow the root instead.

Interaction with Anaconda

The bootc-generic-growpart.service uses ConditionVirtualization=vm, and will not run if the system is provisioned outside of a virtualized environment.

Interaction with LVM and device-mapper

The bootc-generic-growpart.service does nothing on device-mapper based systems such as LVM.

Disabling the builtin service

Instead of expanding the physical root to the full size of the underlying provisioned block device, you may wish to use some of the storage space for other partitions. The service can be disabled as part of a derived container via e.g.:

Containerfile
RUN rm -v /usr/lib/systemd/system/local-fs.target.wants/bootc-generic-growpart.service