# Systemd-growfs not growing data partition correctly, but growpart does: symptomatic of a larger issue?

**URL:** <https://hub.mender.io/t/systemd-growfs-not-growing-data-partition-correctly-but-growpart-does-symptomatic-of-a-larger-issue/6281>\
**Category:** General Discussions\
**Tags:** x86, growfs-data\
**Created:** [October 19, 2023, 9:04am UTC](https://hub.mender.io/t/systemd-growfs-not-growing-data-partition-correctly-but-growpart-does-symptomatic-of-a-larger-issue/6281 "2023-10-19T09:04:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trab40](https://avatars.discourse-cdn.com/v4/letter/t/90db22/32.png) [@Trab40](https://hub.mender.io/u/Trab40)\
**Post date:** [October 19, 2023, 9:04am UTC](https://hub.mender.io/t/systemd-growfs-not-growing-data-partition-correctly-but-growpart-does-symptomatic-of-a-larger-issue/6281/1 "2023-10-19T09:04:35Z")

</div>

Hello!

I have been able to get Mender to work with my x86 ubuntu 20.04 ROS2 system, and am excited to start using it in the field on our devices.

The simple config that i am using is:

```auto
MENDER_STORAGE_DEVICE_BASE=/dev/sda
MENDER_DEVICE_TYPE="x86_64"
MENDER_STORAGE_TOTAL_SIZE_MB=35000

# Nothing to copy
MENDER_COPY_BOOT_GAP="n"

function platform_modify() {
#
# Make sure /lib64 exists since the Mender binary requires it.
# Some systems put everything under /lib (ie Yocto) and a simple
# symlink is enough to find everything Mender needs.
#
if [! -e work/rootfs/lib64]; then
run_and_log_cmd "ln -s /lib work/rootfs/lib64"
fi
}

```

This is based off of `generic_x86-64_hdd_config`.

One thing that I noticed when starting the converted image for the first time is that the data partition is not being grown correctly using `systemd-growfs`

![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/0/060babdba9f077d2aa39091c866a48b78d2976cf.png)

Looking at the logs using

```auto
journalctl -u systemd-growfs@data.service

```

we can see the output being

```auto
Oct 18 11:21:35 adi-golden-image systemd[1]: Starting Grow File System on /data...
Oct 18 11:21:35 adi-golden-image systemd-growfs[628]: Successfully resized "/data" to 128.0M bytes.
Oct 18 11:21:35 adi-golden-image systemd[1]: Finished Grow File System on /data.
Oct 18 16:13:44 adi-golden-image systemd[1]: systemd-growfs@data.service: Succeeded.
Oct 18 16:13:44 adi-golden-image systemd[1]: Stopped Grow File System on /data.

```

Which is showing that the partition is being grown successfully to the default value [MENDER\_DATA\_PART\_SIZE\_MB](https://docs.mender.io/operating-system-updates-debian-family/variables#mender_data_part_size_mb) : Value: 128 (default)

This is not what i expected since the default value for [MENDER\_DATA\_PART\_GROWFS](https://docs.mender.io/operating-system-updates-debian-family/variables#mender_data_part_growfs) :Values: y(default)/n

On this forum there are multiple posts on the data partition not growing, but one that i found most relevant is [Large persistent data partition without large image file - General Discussions - Mender Hub](https://hub.mender.io/t/large-persistent-data-partition-without-large-image-file/4044)

The [last post](https://hub.mender.io/t/large-persistent-data-partition-without-large-image-file/4044/9) from @bajo gives a solution for data partition growing by running the following command

```auto
sudo growpart /dev/sda 4

```

This also worked in my case! @bajo then suggest using a custom PLATFORM\_MODIFY\_HOOK to implement this in a systemd service that is run before systemd-growfs@data.service

**Questions**

- While this may work, I am wondering whether the fact that systemd-growfs is not working may be symptomatic of an unknown issue?
- Is there something that i have not setup correctly ?
