# Mender-convert no space left on device in original rootfs

**URL:** <https://hub.mender.io/t/mender-convert-no-space-left-on-device-in-original-rootfs/4088>\
**Category:** General Discussions\
**Created:** [September 16, 2021, 10:54pm UTC](https://hub.mender.io/t/mender-convert-no-space-left-on-device-in-original-rootfs/4088 "2021-09-16T22:54:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mho](https://avatars.discourse-cdn.com/v4/letter/m/a183cd/32.png) [@mho](https://hub.mender.io/u/mho)\
**Post date:** [September 16, 2021, 10:54pm UTC](https://hub.mender.io/t/mender-convert-no-space-left-on-device-in-original-rootfs/4088/1 "2021-09-16T22:54:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![thienandangthanh](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/thienandangthanh/32/1740_2.png) [@thienandangthanh](https://hub.mender.io/u/thienandangthanh)\
**Post date:** [November 11, 2022, 7:31am UTC](https://hub.mender.io/t/mender-convert-no-space-left-on-device-in-original-rootfs/4088/2 "2022-11-11T07:31:44Z")

</div>

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:

```auto
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:

```auto
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
```

---

<div class="post-metadata">

**Author:** ![mho](https://avatars.discourse-cdn.com/v4/letter/m/a183cd/32.png) [@mho](https://hub.mender.io/u/mho)\
**Post date:** [November 11, 2022, 1:54pm UTC](https://hub.mender.io/t/mender-convert-no-space-left-on-device-in-original-rootfs/4088/3 "2022-11-11T13:54:29Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![thienandangthanh](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/thienandangthanh/32/1740_2.png) [@thienandangthanh](https://hub.mender.io/u/thienandangthanh)\
**Post date:** [November 12, 2022, 4:44am UTC](https://hub.mender.io/t/mender-convert-no-space-left-on-device-in-original-rootfs/4088/4 "2022-11-12T04:44:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![thienandangthanh](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/thienandangthanh/32/1740_2.png) [@thienandangthanh](https://hub.mender.io/u/thienandangthanh)\
**Post date:** [November 13, 2022, 2:56am UTC](https://hub.mender.io/t/mender-convert-no-space-left-on-device-in-original-rootfs/4088/5 "2022-11-13T02:56:39Z")

</div>

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`

```auto
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"

```

---

<div class="post-metadata">

**Author:** ![mho](https://avatars.discourse-cdn.com/v4/letter/m/a183cd/32.png) [@mho](https://hub.mender.io/u/mho)\
**Post date:** [November 28, 2022, 3:02pm UTC](https://hub.mender.io/t/mender-convert-no-space-left-on-device-in-original-rootfs/4088/6 "2022-11-28T15:02:12Z")

</div>

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