Mender-convert no space left on device in original rootfs

I have a base disk image with a 30GB rootfs. I run mender-convert with MENDER_STORAGE_TOTAL_SIZE_MB=“131072”, expecting the A/B partitions to be about 64GB each. I also pass mender-convert an overlay with ~18GB of data.

I realized that mender-convert-modify writes the 18GB of data into the rootfs of the original image, which only has 30GB of total space, which is why it’s running out of space. Do you have any advice for making mender-convert support the case where the input image’s rootfs is much smaller than the output rootfs? Some ideas off the top of my head:

  • expand the original rootfs size to the calculated final rootfs size
  • Inject the overlays into rootfsA in mender-convert-package, and then dd rootfsA into rootfsB
1 Like

I’m having the similar situation:

  • Base image size: 1.8GB rootfs
  • Empty overlay
  • MENDER_STORAGE_TOTAL_SIZE_MB=16384
  • mender-convert version 3.0.1 with docker
    Invoked command:
MENDER_ARTIFACT_NAME=release-1 MENDER_STORAGE_TOTAL_SIZE_MB=16384 ./docker-mender-convert \
                       --disk-image input/debian-11.5-minimal-armhf-2022-10-31-21-07-00-2gb.img \
                       --config configs/beaglebone_black_debian_sdcard_config \
                       --overlay ./input/rootfs_overlay_demo

A portion of log:

Running mender-convert-package: --config ./work/override_compression_config --disk-image input/debian-11.5-minimal-armhf-2022-10-31-21-07-00-2gb.img --config configs/beaglebone_black_debian_sdcard_config --overlay ./input/rootfs_overlay_demo
2022-11-11 07:25:42 [INFO] [mender-convert-package] Using configuration file: configs/mender_convert_config
2022-11-11 07:25:42 [INFO] [mender-convert-package] Using configuration file: ./work/override_compression_config
2022-11-11 07:25:42 [INFO] [mender-convert-package] Using configuration file: configs/beaglebone_black_debian_sdcard_config
2022-11-11 07:25:43 [INFO] [mender-convert-package] Rootfs filesystem size will be 1364 MiB
2022-11-11 07:25:43 [INFO] [mender-convert-package] Creating a file-system image from: work/rootfs/data/
2022-11-11 07:25:43 [INFO] [mender-convert-package] Creating a file-system image from: work/rootfs/
mender-convert-package has finished. Cleaning up...
2022-11-11 07:25:50 [ERROR] [mender-convert] mender-convert failed
2022-11-11 07:25:49 [DEBUG] [mender-convert-package] When running: (modules/disk.sh:144): run_and_log_cmd():

	sudo rsync --archive --delete work/rootfs/ work/output/
	rsync: write failed on "/mender-convert/work/output/usr/share/doc/e2fsprogs/NEWS.gz": No space left on device (28)
rsync error: error in file IO (code 11) at receiver.c(374) [receiver=3.1.3]

2022-11-11 07:25:50 [ERROR] [mender-convert] mender-convert failed
2022-11-11 07:25:50 [ERROR] [mender-convert] mender-convert exit code: 11
rm: cannot remove 'work/output': Device or resource busy

@thienandangthanh I don’t know if this has been solved for mender-convert, but I ended up writing my own build tools that don’t have this problem. So I’m no longer using mender-convert.

@mho I’m glad that you replied.
Are your own build tools open-sourced?
Could I have a look?

I finally figured a way to make it build successfully.
I create a custom config file inherit from configs/beaglebone_black_base_config with 2 variable:

  • MENDER_STORAGE_TOTAL_SIZE_MB
  • IMAGE_ROOTFS_SIZE
source configs/beaglebone_black_base_config
MENDER_STORAGE_TOTAL_SIZE_MB="16384"
MENDER_DEVICE_TYPE="beaglebone-sdcard"
MENDER_STORAGE_DEVICE_BASE="/dev/mmcblk0p"
IMAGE_ROOTFS_SIZE="-1"

Sorry, what I’m working on isn’t open sourced. I’m glad you figured it out!

1 Like