skiffos / SkiffOS

Any Linux distribution, anywhere.
https://skiffos.com
MIT License
702 stars 52 forks source link

skiff-init-resizefs: resizing persist partition not working correctly #202

Closed maxberger closed 2 years ago

maxberger commented 2 years ago

Hi,

on my build from this morning, the persist partition did not expand, and is thus already completely full. The SD card is a 32 GB card, so it should have plenty of space.

Is there any way to trigger the partition expansion manually?

Build: Welcome to SkiffOS 2022.02.1-175-g48750c7b! Arch: allwinner/nezha

root@skiff-48750c7b:~# df -h Filesystem Size Used Avail Use% Mounted on overlay 1.0G 48K 1.0G 1% / /dev/root 865M 849M 0 100% /mnt/persist devtmpfs 242M 0 242M 0% /dev tmpfs 243M 0 243M 0% /dev/shm tmpfs 98M 576K 97M 1% /run tmpfs 4.0M 0 4.0M 0% /sys/fs/cgroup tmpfs 243M 0 243M 0% /tmp overlay 865M 849M 0 100% /etc/NetworkManager/system-connections /dev/loop1 8.2M 8.2M 0 100% /usr/lib/modules

maxberger commented 2 years ago

related output from dmesg:

[ 2.780307] SkiffOS init: mounted devtmpfs to /dev [ 2.788930] SkiffOS resize2fs: resizing persist filesystem: /dev/mmcblk0p1 [ 2.881308] resize2fs 1.46.5 (30-Dec-2021) [ 4.268621] The filesystem is already 229376 (4k) blocks long. Nothing to do!

[ 4.278803] SkiffOS init: finding unused loop device... [ 4.284304] SkiffOS init: allocating loop device /dev/loop0... [ 4.291444] loop0: detected capacity change from 0 to 243840 [ 4.320574] SkiffOS init: mounting /boot/rootfs.squashfs on /dev/loop0 to /skiff-overlays/image... [ 4.340798] SkiffOS init: mounting tmpfs size=1G,uid=0,gid=0,mode=0755 to /skiff-overlays/system-tmp... [ 4.350745] SkiffOS init: mounting overlayfs lowerdir=/skiff-overlays/image,upperdir=/skiff-overlays/system-tmp/upper,workdir=/skiff-overlays/system-tmp/work to /skiff-overlays/system... [ 4.368248] SkiffOS init: mounting / to /skiff-overlays/system/mnt/persist... [ 4.385060] printk: skiff-init-squa: 4 output lines suppressed due to ratelimiting [ 5.725350] systemd[1]: System time before build time, advancing clock.

paralin commented 2 years ago

@maxberger Interesting, I think the resize2fs step the skiff-init-squashfs does needs to resize the actual partition. I will need to update it slightly to fix this.

On most devices, embiggen-disk is used to resize the partition and then call resize2fs.

I'll probably release a patch tomorrow that uses it the same way in skiff-init.

In the meantime, you can resize the partition with gparted - just drag the end of the partition out to the end of the disk.

maxberger commented 2 years ago

Thanks for the quick response! Since this is for an experimental system, I'll wait for your fix so that I can confirm that it works.

paralin commented 2 years ago

@maxberger Please try on master, 62a5d82a57dc0d087e11a7919379e6ce550384cd or newer.

You'll need to "make compile" then run the "install" step once more.

If it fails to resize, you'll find the logs in "journalctl -u skiff-init" - please send them here.

Thanks!

maxberger commented 2 years ago

I've rebuilt and rewritten the image to the SD card, and now my board doesn't boot up anymore, or at least not to the point where it would ask for an IP via DHCP. I will need to connect a serial console to find out more; I'll need a bit more time to set that up. I've also had bad SD cards in the past, so it may or may not be related to the latest changes.

paralin commented 2 years ago

@maxberger Indeed I see a kernel panic on nezha, working on debugging it:

207

paralin commented 2 years ago

@maxberger I traced it to a buggy commit on 5.18.x and reverted it in 971d13bbb7e0e302afd533446141409068e30af9 - could you please rebuild your kernel by pulling latest & "rm -rf ./workspaces/default/build/linux-custom" then "make configure compile" ? thanks

maxberger commented 2 years ago

Good news: The system boots again!

Bad news: Resize does not work, here is the output of journalctl:

Looks like -ignore-resize-partition is not a valid argument.

May 21 14:05:26 skiff-012cc133 mount-all.sh[136]: Sat May 21 14:05:15 UTC 2022
May 21 14:05:26 skiff-012cc133 mount-all.sh[109]: Persist drive is at /mnt/persist path /mnt/persist
May 21 14:05:26 skiff-012cc133 mount-all.sh[109]: Configuring systemd-journald to use /mnt/persist/skiff/journal
May 21 14:05:26 skiff-012cc133 mount-all.sh[109]: Rootfs drive is at /mnt/rootfs.
May 21 14:05:26 skiff-012cc133 mount-all.sh[109]: Building SSH key list...
May 21 14:05:27 skiff-012cc133 mount-all.sh[175]: /etc/NetworkManager/system-connections is not a mountpoint
May 21 14:05:27 skiff-012cc133 mount-all.sh[109]: Resizing /mnt/persist with embiggen-disk...
May 21 14:05:27 skiff-012cc133 mount-all.sh[199]: flag provided but not defined: -ignore-resize-partition
May 21 14:05:27 skiff-012cc133 mount-all.sh[199]: Usage of embiggen-disk:
May 21 14:05:27 skiff-012cc133 mount-all.sh[199]: # embiggen-disk [flags] <mount-point-to-enlarge>
May 21 14:05:27 skiff-012cc133 mount-all.sh[199]:   -dry-run
May 21 14:05:27 skiff-012cc133 mount-all.sh[199]:             don't make changes
May 21 14:05:27 skiff-012cc133 mount-all.sh[199]:   -verbose
May 21 14:05:27 skiff-012cc133 mount-all.sh[199]:             verbose output
May 21 14:05:27 skiff-012cc133 mount-all.sh[109]: Failed to resize via mountpoint, trying via /dev/mmcblk0p1...
May 21 14:05:27 skiff-012cc133 mount-all.sh[202]: flag provided but not defined: -ignore-resize-partition
May 21 14:05:27 skiff-012cc133 mount-all.sh[202]: Usage of embiggen-disk:
May 21 14:05:27 skiff-012cc133 mount-all.sh[202]: # embiggen-disk [flags] <mount-point-to-enlarge>
May 21 14:05:27 skiff-012cc133 mount-all.sh[202]:   -dry-run
May 21 14:05:27 skiff-012cc133 mount-all.sh[202]:             don't make changes
May 21 14:05:27 skiff-012cc133 mount-all.sh[202]:   -verbose
May 21 14:05:27 skiff-012cc133 mount-all.sh[202]:             verbose output
May 21 14:05:27 skiff-012cc133 mount-all.sh[109]: Failed to resize persist. Continuing anyway.
May 21 14:05:27 skiff-012cc133 mount-all.sh[205]: Configuring Docker to use /mnt/persist/skiff/docker
May 21 14:05:27 skiff-012cc133 mount-all.sh[205]: Configuring Docker to use systemd-journald
May 21 14:05:27 skiff-012cc133 mount-all.sh[205]: Configuring Docker to start with '/usr/bin/dockerd -H fd:// --data-rooMay 21 14:05:27 skiff-012cc133 mount-all.sh[216]: /usr/lib/modules is not a mountpoint
May 21 14:05:27 skiff-012cc133 mount-all.sh[215]: Mounting modules from squashfs...

Just to make sure the resizing works, I ran the commands manually (without the -ignore...):

root@skiff-012cc133:~# embiggen-disk /mnt/persist
Changes made:
  * partition /dev/mmcblk0p1: before: 1835008 sectors, after: 62069760 sectors
error: running /usr/sbin/resize2fs [resize2fs /dev/mmcblk0p1]: exit status 1, resize2fs 1.46.5 (30-Dec-2021)
resize2fs: Device or resource busy while trying to open /dev/mmcblk0p1
Couldn't find valid filesystem superblock.

then sync, reboot, and now I have space! So manual works, but automatic does not. As said, since this is an experimental system I am more than willing to test this again once you have a newer version.

Thank you for all you support and for this OS!

paralin commented 2 years ago

@maxberger it is a valid argument, but added recently-

Please run "git submodule update" and then rm -rf workspaces/*/build/embiggen-disk* to force rebuilding the embiggen disk tool, then "make compile"

That should fix that error.

maxberger commented 2 years ago

Unfortunately that still did not do the trick :(

I had to do a full make clean / rebuild, because updating gave me a strange error with glibc complaining about kernel header files. Once that was done, I was able to create the disk, and it booted -> Just to be stuck on a 1GB persist partition again.

log file for first new boot:

May 21 21:08:49 skiff-012cc133 mount-all.sh[107]: Build date of Sat May 21 23:08:33 CEST 2022 is newer than internal May 21 21:08:49 skiff-012cc133 mount-all.sh[130]: Sat May 21 21:08:33 UTC 2022
May 21 21:08:49 skiff-012cc133 mount-all.sh[107]: Persist drive is at /mnt/persist path /mnt/persist
May 21 21:08:49 skiff-012cc133 mount-all.sh[107]: Configuring systemd-journald to use /mnt/persist/skiff/journal
May 21 21:08:49 skiff-012cc133 mount-all.sh[107]: Rootfs drive is at /mnt/rootfs.
May 21 21:08:49 skiff-012cc133 mount-all.sh[107]: Building SSH key list...
May 21 21:08:50 skiff-012cc133 mount-all.sh[169]: /etc/NetworkManager/system-connections is not a mountpoint
May 21 21:08:50 skiff-012cc133 mount-all.sh[107]: Resizing /mnt/persist with embiggen-disk...
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: 2022/05/21 21:08:42 statFSFindmnt: running(/usr/bin/findmnt --noheaMay 21 21:08:50 skiff-012cc133 mount-all.sh[211]: 2022/05/21 21:08:42 getFileSystemResizer("/mnt/persist") = main.fsRMay 21 21:08:50 skiff-012cc133 mount-all.sh[211]: 2022/05/21 21:08:42 statFSFindmnt: running(/usr/bin/findmnt --noheaMay 21 21:08:50 skiff-012cc133 mount-all.sh[211]: 2022/05/21 21:08:42 fsResizer.DepResizer: returning partitionResizeMay 21 21:08:50 skiff-012cc133 mount-all.sh[211]: 2022/05/21 21:08:42 Resizing partition "/dev/mmcblk0p1" ...
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: 2022/05/21 21:08:42 Getting partition table for "/dev/mmcblk0" ...
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: 2022/05/21 21:08:42 Device "/dev/mmcblk0" has 1 partitions.
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: Current partition table:
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: label: dos
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: label-id: 0x458cced4
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: device: /dev/mmcblk0
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: unit: sectors
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: sector-size: 512
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: /dev/mmcblk0p1 : start=262144, size=1835008, type=83
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: Cur size: 62333952
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: Part start: 262144
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: Part size: 1835008
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: Part end: 2097152
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: Remaining after final partition: 60236800
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: Need to extend disk by 60234752 sectors (30840193024 bytes, 28.722
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: New partition table to write:
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: label: dos
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: label-id: 0x458cced4
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: device: /dev/mmcblk0
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: unit: sectors
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: sector-size: 512
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: /dev/mmcblk0p1 : start=262144, size=62069760, type=83
May 21 21:08:50 skiff-012cc133 mount-all.sh[211]: Setting new partition table...
May 21 21:08:52 skiff-012cc133 mount-all.sh[218]: Disk /dev/mmcblk0: 29.72 GiB, 31914983424 bytes, 62333952 sectors
May 21 21:08:52 skiff-012cc133 mount-all.sh[218]: Units: sectors of 1 * 512 = 512 bytes
May 21 21:08:52 skiff-012cc133 mount-all.sh[218]: Sector size (logical/physical): 512 bytes / 512 bytes
May 21 21:08:52 skiff-012cc133 mount-all.sh[218]: I/O size (minimum/optimal): 512 bytes / 512 bytes
May 21 21:08:52 skiff-012cc133 mount-all.sh[218]: Disklabel type: dos
May 21 21:08:52 skiff-012cc133 mount-all.sh[218]: Disk identifier: 0x458cced4
May 21 21:08:52 skiff-012cc133 mount-all.sh[218]: Old situation:
May 21 21:08:52 skiff-012cc133 mount-all.sh[218]: Device         Boot  Start     End Sectors  Size Id Type
May 21 21:08:52 skiff-012cc133 mount-all.sh[218]: /dev/mmcblk0p1      262144 2097151 1835008  896M 83 Linux
May 21 21:08:52 skiff-012cc133 mount-all.sh[218]: >>> Script header accepted.
May 21 21:08:52 skiff-012cc133 mount-all.sh[218]: >>> Script header accepted.
May 21 21:08:52 skiff-012cc133 mount-all.sh[218]: >>> Script header accepted.
May 21 21:08:52 skiff-012cc133 mount-all.sh[218]: >>> Script header accepted.
May 21 21:08:52 skiff-012cc133 mount-all.sh[218]: >>> Script header accepted.
May 21 21:08:52 skiff-012cc133 mount-all.sh[218]: >>> Created a new DOS disklabel with disk identifier 0x458cced4.

since the log looked correct, I rebooted (sync, reboot); this changed the log but the persist partition is still stuck at 1GB.

log file for 2nd boot (3rd boot has the same output):

May 21 21:08:49 skiff-012cc133 mount-all.sh[108]: Build date of Sat May 21 23:08:33 CEST 2022 is newer than internal clock of Fri Mar 11 07:33:35 UTC 2022. Bumping internal clock to build date.
May 21 21:08:49 skiff-012cc133 mount-all.sh[131]: Sat May 21 21:08:33 UTC 2022
May 21 21:08:49 skiff-012cc133 mount-all.sh[108]: Persist drive is at /mnt/persist path /mnt/persist
May 21 21:08:49 skiff-012cc133 mount-all.sh[108]: Configuring systemd-journald to use /mnt/persist/skiff/journal
May 21 21:08:49 skiff-012cc133 mount-all.sh[108]: Rootfs drive is at /mnt/rootfs.
May 21 21:08:49 skiff-012cc133 mount-all.sh[108]: Building SSH key list...
May 21 21:08:49 skiff-012cc133 mount-all.sh[108]: /opt/skiff/scripts/mount-all.sh: line 119: echo: write error: No space left on device
May 21 21:08:49 skiff-012cc133 mount-all.sh[167]: /etc/NetworkManager/system-connections is not a mountpoint
May 21 21:08:49 skiff-012cc133 mount-all.sh[183]: sending incremental file list
May 21 21:08:49 skiff-012cc133 mount-all.sh[183]: ./
May 21 21:08:49 skiff-012cc133 mount-all.sh[183]: sent 54 bytes  received 19 bytes  146.00 bytes/sec
May 21 21:08:49 skiff-012cc133 mount-all.sh[183]: total size is 0  speedup is 0.00
May 21 21:08:49 skiff-012cc133 mount-all.sh[108]: Resizing /mnt/persist with embiggen-disk...
May 21 21:08:49 skiff-012cc133 mount-all.sh[213]: 2022/05/21 21:08:42 statFSFindmnt: running(/usr/bin/findmnt --noheadings --output FSTYPE,SOURCE -J /mnt/persist)
May 21 21:08:49 skiff-012cc133 mount-all.sh[213]: 2022/05/21 21:08:42 getFileSystemResizer("/mnt/persist") = main.fsResizer{fs:main.fsStat{mnt:"/mnt/persist", dev:"/dev/mmcblk0p1", fstype:"ext4", statfs:unix.Statfs_t{Type:0, Bsize:0, Blocks:0x0, Bfree:0x0, Bavail:0x0, Files:0x0, Ffree:0x0, Fsid:unix.Fsid{Val:[2]int32{0, 0}}, Namelen:0, Frsize:0, Flags:0, Spare:[4]int64{0, 0,
May 21 21:08:49 skiff-012cc133 mount-all.sh[213]: 2022/05/21 21:08:42 statFSFindmnt: running(/usr/bin/findmnt --noheadings --output FSTYPE,SOURCE -J /mnt/persist)
May 21 21:08:49 skiff-012cc133 mount-all.sh[213]: 2022/05/21 21:08:43 fsResizer.DepResizer: returning partitionResizer("/dev/mmcblk0p1")
May 21 21:08:49 skiff-012cc133 mount-all.sh[213]: 2022/05/21 21:08:43 Resizing partition "/dev/mmcblk0p1" ...
May 21 21:08:49 skiff-012cc133 mount-all.sh[213]: 2022/05/21 21:08:43 Getting partition table for "/dev/mmcblk0" ...
May 21 21:08:49 skiff-012cc133 mount-all.sh[213]: 2022/05/21 21:08:43 Device "/dev/mmcblk0" has 1 partitions.
May 21 21:08:49 skiff-012cc133 mount-all.sh[213]: Current partition table:
May 21 21:08:49 skiff-012cc133 mount-all.sh[213]: label: dos
May 21 21:08:49 skiff-012cc133 mount-all.sh[213]: label-id: 0x458cced4
May 21 21:08:49 skiff-012cc133 mount-all.sh[213]: device: /dev/mmcblk0
May 21 21:08:49 skiff-012cc133 mount-all.sh[213]: unit: sectors
May 21 21:08:49 skiff-012cc133 mount-all.sh[213]: sector-size: 512
May 21 21:08:49 skiff-012cc133 mount-all.sh[213]: /dev/mmcblk0p1 : start=262144, size=62069760, type=83
May 21 21:08:49 skiff-012cc133 mount-all.sh[213]: Cur size: 62333952
May 21 21:08:49 skiff-012cc133 mount-all.sh[213]: Part start: 262144
May 21 21:08:49 skiff-012cc133 mount-all.sh[213]: Part size: 62069760
May 21 21:08:49 skiff-012cc133 mount-all.sh[213]: Part end: 62331904
May 21 21:08:49 skiff-012cc133 mount-all.sh[213]: Remaining after final partition: 2048
May 21 21:08:49 skiff-012cc133 mount-all.sh[213]: error: running /usr/sbin/resize2fs [resize2fs /dev/mmcblk0p1]: exit status 1, resize2fs 1.46.5 (30-Dec-2021)
May 21 21:08:49 skiff-012cc133 mount-all.sh[213]: resize2fs: Device or resource busy while trying to open /dev/mmcblk0p1
May 21 21:08:49 skiff-012cc133 mount-all.sh[213]: Couldn't find valid filesystem superblock.
May 21 21:08:50 skiff-012cc133 mount-all.sh[108]: Failed to resize via mountpoint, trying via /dev/mmcblk0p1...
May 21 21:08:50 skiff-012cc133 mount-all.sh[221]: 2022/05/21 21:08:43 statFSFindmnt: running(/usr/bin/findmnt --noheadings --output FSTYPE,SOURCE -J /dev/mmcblk0p1)
May 21 21:08:50 skiff-012cc133 mount-all.sh[221]: 2022/05/21 21:08:43 getFileSystemResizer("/dev/mmcblk0p1") = main.fsResizer{fs:main.fsStat{mnt:"/dev/mmcblk0p1", dev:"/dev/mmcblk0p1", fstype:"ext4", statfs:unix.Statfs_t{Type:0, Bsize:0, Blocks:0x0, Bfree:0x0, Bavail:0x0, Files:0x0, Ffree:0x0, Fsid:unix.Fsid{Val:[2]int32{0, 0}}, Namelen:0, Frsize:0, Flags:0, Spare:[4]int64{0,
May 21 21:08:50 skiff-012cc133 mount-all.sh[221]: 2022/05/21 21:08:43 statFSFindmnt: running(/usr/bin/findmnt --noheadings --output FSTYPE,SOURCE -J /dev/mmcblk0p1)
May 21 21:08:50 skiff-012cc133 mount-all.sh[221]: 2022/05/21 21:08:43 fsResizer.DepResizer: returning partitionResizer("/dev/mmcblk0p1")
May 21 21:08:50 skiff-012cc133 mount-all.sh[221]: 2022/05/21 21:08:43 Resizing partition "/dev/mmcblk0p1" ...
May 21 21:08:50 skiff-012cc133 mount-all.sh[221]: 2022/05/21 21:08:43 Getting partition table for "/dev/mmcblk0" ...
May 21 21:08:50 skiff-012cc133 mount-all.sh[221]: 2022/05/21 21:08:43 Device "/dev/mmcblk0" has 1 partitions.
May 21 21:08:50 skiff-012cc133 mount-all.sh[221]: Current partition table:
May 21 21:08:50 skiff-012cc133 mount-all.sh[221]: label: dos
May 21 21:08:50 skiff-012cc133 mount-all.sh[221]: label-id: 0x458cced4
May 21 21:08:50 skiff-012cc133 mount-all.sh[221]: device: /dev/mmcblk0
May 21 21:08:50 skiff-012cc133 mount-all.sh[221]: unit: sectors
May 21 21:08:50 skiff-012cc133 mount-all.sh[221]: sector-size: 512
May 21 21:08:50 skiff-012cc133 mount-all.sh[221]: /dev/mmcblk0p1 : start=262144, size=62069760, type=83
May 21 21:08:50 skiff-012cc133 mount-all.sh[221]: Cur size: 62333952
May 21 21:08:50 skiff-012cc133 mount-all.sh[221]: Part start: 262144
May 21 21:08:50 skiff-012cc133 mount-all.sh[221]: Part size: 62069760
May 21 21:08:50 skiff-012cc133 mount-all.sh[221]: Part end: 62331904
May 21 21:08:50 skiff-012cc133 mount-all.sh[221]: Remaining after final partition: 2048
May 21 21:08:50 skiff-012cc133 mount-all.sh[221]: error: running /usr/sbin/resize2fs [resize2fs /dev/mmcblk0p1]: exit status 1, resize2fs 1.46.5 (30-Dec-2021)
May 21 21:08:50 skiff-012cc133 mount-all.sh[221]: resize2fs: Device or resource busy while trying to open /dev/mmcblk0p1
May 21 21:08:50 skiff-012cc133 mount-all.sh[221]: Couldn't find valid filesystem superblock.
May 21 21:08:50 skiff-012cc133 mount-all.sh[108]: Failed to resize persist. Continuing anyway.
May 21 21:08:50 skiff-012cc133 mount-all.sh[230]: /usr/lib/modules is not a mountpoint
May 21 21:08:50 skiff-012cc133 mount-all.sh[229]: Mounting modules from squashfs...
paralin commented 2 years ago

To summarize the issue:

So to fix this, a workaround is to mount /dev/mmcblk0p1 to a different location so that resize2fs understands it is mounted, and tries to do the online resize instead.

paralin commented 2 years ago

Fixed in 961b4fc - tested with nezha - resizes the fs properly.

        # Sometimes the path does not appear in the mounts list.
        #
        # Workaround: temporarily mount it so resize2fs realizes it needs to
        # do an online resize. Otherwise returns an error.
        ROOT_MOUNT_SOURCE=$(findmnt --target / --first-only -n -o "SOURCE")
        if [ -n "${FORCE_RESIZE_PERSIST_MOUNT}" ] || \
               [[ "${ROOT_MOUNT_SOURCE}" != "${PERSIST_DEVICE}" ]] || \
               ! findmnt --source ${PERSIST_DEVICE} --first-only; then
            echo "Temporarily mounting ${PERSIST_DEVICE} to force online resize..."
            RESIZE_DISK_MTPT=/mnt/.persist-resize
            mkdir -p ${RESIZE_DISK_MTPT}
            mount ${PERSIST_DEVICE} ${RESIZE_DISK_MTPT} || true
        fi
        echo "Resizing with embiggen-disk via ${PERSIST_DEVICE}..."
        if ${RESIZE_DISK[@]} ${PERSIST_DEVICE}; then
            PERSIST_RESIZED="true"
        fi
        if [ -n "${RESIZE_DISK_MTPT}" ]; then
            echo "Unmounting ${RESIZE_DISK_MTPT}..."
            umount ${RESIZE_DISK_MTPT} || true
        fi
maxberger commented 2 years ago

I can confirm it worked, thank you so much!