[systemd-devel] Strange partition layout from systemd-repart

Tobias Hunger tobias.hunger at gmail.com
Thu Jun 4 14:58:13 UTC 2020


Poking around a bit more: I have 4096 unused sectors before the first
partiton instead of just 2048. Systemd-repart then tries to put all my
new partitions into the sectors 2048-4095 and completely ignores the
GBs of free space that is available elsewhere.

So this can be considered a user error. I'll fix the image generation.

Maybe there is some way to improve the reporting done by
systemd-repart in such a case?

Best Regards,
Tobias

On Thu, Jun 4, 2020 at 4:42 PM Tobias Hunger <tobias.hunger at gmail.com> wrote:
>
> Hello!
>
> I have a 32GB USB stick and used dd to put a ~2.5GB image onto it. The
> image contains three partitions (ESP, root, root-verity). I would like
> to make the remaining space on the USB stick available to users.
>
> So I created a set of files for systemd-repart:
>
> 00_esp.conf:
> [Partition]
> Type=esp
>
> 10_root.conf
> [Partition]
> Type=root
>
> 20_vrty.conf
> [Partition]
> Type=root-verity
>
> 30_data.conf
> [Partition]
> Type=home
>
> I had expected that the three existing partitions stay as they are and
> a new partition of Type home would be created, taking the remaining
> space.
>
> But systemd-repart wants to do something else:
>
> It wants to keep the esp and root at the size they have already. That
> is expected.
>
> The verity partition is supposed to get assigned (almost) all the
> remaining space, resizing that from 20MB to about 27GB.
>
> The new home partition is then pressed into the remaining space and gets 1MB.
>
> The actual output is this:
>
> ------------------------------------------------------------------------------------------------
> TYPE               LABEL               UUID                FILE
>       NODE SIZE          PADDING
> esp                EFI System Partiti… a755fc66-70f7-994d… 00_esp.conf
>  /dev/sdb1 59.0M         0B
> root-x86-64        clrm_20200604.1554  308e3eb0-84b4-f6e0…
> 10_root.conf /dev/sdb2 2.3G          0B
> root-x86-64-verity vrty_20200604.1554  eb01acbc-0dde-cc9b…
> 20_vrty.conf /dev/sdb3 20.0M → 27.4G 27.3G → 0B
> home               home                7f4c8a40-c486-4b2b…
> 30_data.conf /dev/sdb4 → 1.0M        → 0B
>
>            Σ = 29.8G     Σ = 0B
> ------------------------------------------------------------------------------------------------
>
> I tried adding Weights and such, but to no avail.
>
> Any ideas what I can do to get the desired behavior?
>
> Best Regards,
> Tobias


More information about the systemd-devel mailing list