Data partition is not expanded

I have followed the instructions to install Mender to my Beaglebone Black. The only difference is that I specified a different config to prepare the image for internal eMMC rather than SD card.
I booted the device from SD card with the official image and flashed the prepared Mender image to the eMMC.
The device boots up and is visible in the dashboard. However, the data partition is not expanded, whereas it is said in the instructions that it should be expanded on the first boot. How can I troubleshoot this?

My partitions sizes:
P1 - 40M
P2 - 660M
P3 - currently not mounted, but I assume it to be equal to P2, 660M
P4 - 108M

The full size of Beaglebone Black eMMC is around 4G.

Can you check that the /etc/fstab contains x-systemd.growfs for the data partition, and that systemd is at least version 236?

It does, and systemd is version 241.
Could it be that data partition resizing was tested on SD card, which is visible under /dev/mmcblk0, and I’m running off eMMC, which is visible under /dev/mmcblk1?

sudo systemctl status systemd-growfs@data.service says, among other things: code=exited, status=0/success.

Searching in /var/log/daemon.log brings up the following string: Successfully resized "/data" to 128.0M bytes (32768 blocks of 4096 bytes).

Here are two excertps from mender-convert log file:

2021-10-12 13:28:08 [INFO] [mender-convert-package] Using configuration file: configs/mender_convert_config
2021-10-12 13:28:08 [INFO] [mender-convert-package] Using configuration file: ./work/override_compression_config
2021-10-12 13:28:08 [INFO] [mender-convert-package] Using configuration file: configs/beaglebone_black_debian_emmc_config
2021-10-12 13:28:08 [INFO] [mender-convert-package] Rootfs filesystem size will be 1100 MiB


2021-10-12 13:29:05 [INFO] [mender-convert-package] Creating Mender compatible disk-image
2021-10-12 13:29:05 [INFO] [mender-convert-package] Total disk size: 3648 MiB
2021-10-12 13:29:05 [INFO] [mender-convert-package]   Boot partition    40 MiB
2021-10-12 13:29:05 [INFO] [mender-convert-package]   RootFS partitions 1728 MiB x 2
2021-10-12 13:29:05 [INFO] [mender-convert-package]   Data partition    128 MiB

If data partition is at the end of the memory, it is understandable it can’t expand. But why mender-convert is determining rootfs filesystem size as 1100 MiB, and then setting RootFS partitions to 1728 MiB?
In the booted image, df -h displays rootfs partition as 1.1G:

debian@beaglebone:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            215M     0  215M   0% /dev
tmpfs            49M  264K   49M   1% /run
/dev/mmcblk1p3  1.1G  743M  238M  76% /
tmpfs           243M     0  243M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           243M     0  243M   0% /sys/fs/cgroup
/dev/mmcblk1p1   40M  6.7M   34M  17% /boot/efi
/dev/mmcblk1p4  108M  160K   99M   1% /data
tmpfs            49M     0   49M   0% /run/user/1000

in my experience x-systemd.growfs grows the file system but will not grow the partition table.

At around systemd 245/246 they added a repart service for growing partition tables, however my systems are older than that, which meant that i needed to add my own repart systemd service for my mender projects.

I believe that mender has a systemd grow partition service, which i think is only part of the meta-mender yocto layer, however there is an example of one being added in in the raspberry pi mender-convert config using a hook which you could pinch