It turns out that this is really respected: "parted" actually shows the right size, but when mounting the partition, "df -h ." reveals that the size is much less.
This is because the partition is properly created, but the filesystem inside the partition is not filling the partition.
A workaround for this is running these commands on the partition:
When the size of the system data partition is specified in the gadget snap, like in:
https:/ /github. com/alfonsosanc hezbeato/ pc-amd64- gadget- cpc/blob/ master/ gadget. yaml
It turns out that this is really respected: "parted" actually shows the right size, but when mounting the partition, "df -h ." reveals that the size is much less.
This is because the partition is properly created, but the filesystem inside the partition is not filling the partition.
A workaround for this is running these commands on the partition:
# e2fsck -fy <part>
# resize2fs <part>
But this should not be necessary indeed.