Configuring partitions
Note
This feature will be available in Kairos version2.4.0
and in all future releases.Kairos configuration mechanism for partitions is based on the cloud-config file given during installation to override the default values set by the installer.
We allow certain flexibility in the sizes and filesystems used for the default install and allow to create extra partitions as well.
For example, the following cloud-config will make the oem
partition have a size of 512Mb and an ext4
filesystem,
recovery with a size of 10000Mb and a ext4
filesystem, while leaving the rest of the partitions to their default sizes and filesystems.
The partitions that can be configured are: oem
, recovery
, state
and persistent
.
And the following config will leave the default partitions as is, but create 2 new extra partitions with the given sizes, filesystems and labels:
Only one partition can expand to the rest of the disk. Either persistent or one of the extra-partitions. In case you want the latter, you need to specify the size of persistent to a fixed value.
An example of this would be as follows:
Note that there are some caveats in the extra partitions
setup:
- Only
size
,fs
,name
andlabel
are used for the partition creation, the name is currently used for the partition label. - If a partition has no fs set, the partition will be created, but it will not be formatted.
- No mounting of any type is done during installation to the extra partitions. That part should be done on the stages of the cloud-config manually, with something like the following step:
Manual partitioning
In some cases, it’s desired that the user has full control over the partitioning of the disk.
This can be achieved by setting the no-format
option to true
and making sure the disk
is prepared with the desired partitions before running the installer.
Here is an example config that instructs the installer to use the “second” disk (/dev/vdb) and makes sure the disk is prepared with the desired partitions:
For more information about the full config available for partitions and extra partitions see the full cloud-config page