Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-33208

cloud/virt: Root filesystem not expanded by default

    • None
    • Important
    • ZStream
    • rhel-sst-bootc
    • 13
    • None
    • QE ack
    • False
    • Hide

      None

      Show
      None
    • Yes
    • None
    • Approved Blocker
    • None
    • None
    • Known Issue
    • Hide
      .Root filesystem are not expanded by default

      When you use a base container image, that does not include `cloud-init` to create an AMI or QCOW2 container image by using `bootc-image-builder`, the root filesystem size is not expanded dynamically on boot to the full size of the provisioned virtual disk.

      To work around this issue, apply one of the following available options:

      * Include `cloud-init` in the image.
      * Include custom logic in the container image to expand the root filesystem, for example:
      ----
      /usr/bin/growpart /dev/vda 4
      unshare -m bin/sh -c 'mount -o remount,rw /sysroot && xfs_growfs /sysroot'
      ----

      * Include a custom logic to use the additional space for secondary filesystems, for example, `/var/lib/containers`.

      NOTE: By default, the physical root storage is mounted at the `/sysroot` partition.
      Show
      .Root filesystem are not expanded by default When you use a base container image, that does not include `cloud-init` to create an AMI or QCOW2 container image by using `bootc-image-builder`, the root filesystem size is not expanded dynamically on boot to the full size of the provisioned virtual disk. To work around this issue, apply one of the following available options: * Include `cloud-init` in the image. * Include custom logic in the container image to expand the root filesystem, for example: ---- /usr/bin/growpart /dev/vda 4 unshare -m bin/sh -c 'mount -o remount,rw /sysroot && xfs_growfs /sysroot' ---- * Include a custom logic to use the additional space for secondary filesystems, for example, `/var/lib/containers`. NOTE: By default, the physical root storage is mounted at the `/sysroot` partition.
    • Done
    • None

      When creating an AMI or qcow2 using bootc-image-builder from the base container image (without including cloud-init), the root filesystem size is not expanded dynamically on boot to the full size of the provisioned virtual disk.

      Upstream tracker: https://github.com/CentOS/centos-bootc/issues/394

      Workarounds:

      • Include custom logic in the container image to expand the root
      • Include custom logic to use the additional space for secondary filesystems (e.g. `/var/lib/containers`)

      Note also that cloud-init (if added to an image) will not grow the root: https://issues.redhat.com/browse/RHEL-34859

      Note that by default, the physical root storage is mounted at /sysroot.

      Example custom logic to expand root:

      /usr/bin/growpart /dev/vda 4
      unshare -m /bin/sh -c 'mount -o remount,rw /sysroot && xfs_growfs /sysroot'
      

              walters@redhat.com Colin Walters
              walters@redhat.com Colin Walters
              Colin Walters Colin Walters
              Wei Shi Wei Shi
              Gabriela Necasova Gabriela Necasova
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: