Closed dnugmanov closed 3 weeks ago
The plugin only supports automatic allocation of free space at the end of the disk and there are no plans to support different scenarios in the short term. The implementation for this will be a bit complex and there is already the completely manual partitioning solution that can be used as a workaround.
Description:
When attempting to use the
layout
plugin to allocate a partition, the plugin only attempts to allocate from the end of the disk. If there is free space available elsewhere on the disk but not at the end, the plugin fails with a warning about insufficient unpartitioned space.Related code: https://github.com/mudler/yip/blob/3eeeb15bc6b921a977c1f44cf30e77c81dcd4dc6/pkg/plugins/layout.go#L619
Steps to Reproduce:
Prepare a disk (
/dev/sdb
in this case) with free space not at the end.Use the following
test.yaml
configuration:Run
yip
with the command:The output indicates a warning:
Additional Context:
The issue persists even though the free space on the disk is confirmed using
sgdisk
andparted
as shown below:Expected Behavior:
The
layout
plugin should be able to allocate partitions from any available free space on the disk, not just from the end.Actual Behavior:
The plugin fails to allocate the partition unless free space is available at the end of the disk.