kairos: :bug: resizefs on boot doesn't work

Kairos version: 2.0.2

CPU architecture, OS, and Version: amd64

Describe the bug After increasing the disk size, COS_PERSISTENT stayed with the same size

To Reproduce

Expected behavior Due to https://github.com/kairos-io/kairos/blob/3d32a21ea42357fc65787330dab93718002430cf/overlay/files/system/oem/11_persistency.yaml#LL92C6-L92C75, I’d have expected to grow it on the next boot automatically (as it used to work with ARM)

Logs

Additional context Workaround:

Create a dummy config file:

> cat /oem/11_persistency.yaml 
name: "Configure persistent dirs bind-mounts"
stages:
  resizefs:
    - name: "Grow persistent"
      layout:
        device:
          label: COS_PERSISTENT
        expand_partition:
          # Size 0 is required to specify all remaining space
          size: 0

Run it in recovery mode:

elemental run-stage resizefs

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 29 (29 by maintainers)

Commits related to this issue

Most upvoted comments

After the Patch linke was merged, and bumped on kairos to use that newer version, I cna confirm that partition was extended:

time="2023-04-06T12:00:14Z" level=info msg="Processing stage step 'Grow persistent'. ( commands: 0, files: 0, ... )"
time="2023-04-06T12:00:16Z" level=info msg="Extending last partition to max space"



Disk /dev/sda: 58.59 GiB, 62914560000 bytes, 122880000 sectors
Disk model: PHILIPS         
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: F6358B22-2755-D446-960D-252904FBB1AE

Device        Start       End   Sectors  Size Type
/dev/sda1      8192    204799    196608   96M Microsoft basic data
/dev/sda2    204800  12902399  12697600  6.1G Linux filesystem
/dev/sda3  12902400  21635071   8732672  4.2G Linux LVM
/dev/sda4  21635072 122877952 101242881 48.3G Linux filesystem

this is ok for me

Alos I added a pr for osbuilder to make sure we create real gpt images: https://github.com/kairos-io/osbuilder/pull/66

blergh, cant even get it too boot, my usb is broken. @mauromorales will you be able to test this with me?

did a quick test with v2.3.0: the volume did not get expanded, after boot… used kairos-opensuse-leap-arm-rpi:v2.3.0-k3sv1.26.6-k3s1… don’t have time to look deeper into it…