Guide on managing disks
DiscoveredVolume
resource.
bluestore
(Ceph)ext2
, ext3
, ext4
iso9660
luks
(LUKS encrypted partition)lvm2
squashfs
swap
talosmeta
(Talos Linux META partition)vfat
xfs
zfs
EFI
: the EFI partition used for booting the system.META
: the partition used for storing Talos metadata.STATE
: the partition used for storing the system state, including machine configuration.EPHEMERAL
: the partition used for storing container data, downloaded images, logs, etcd
data (for controlplane nodes) etc.EFI
, META
, and STATE
partitions.
The EPHEMERAL
partition by default consumes all unallocated space, but it can be created on another disk or resized.
The EPHEMERAL
partition is a catch-all location for storing data, while it might be desired to segregate the data into different partitions.
Talos supports creating additional user volumes to be used for different purposes: e.g. local storage for various applications, specific volumes per applications, etc.
EPHEMERAL
partition was limited to 200GB, and two additional partitions were created for ceph-data
and local-storage
.
EPHEMERAL
partition was limited to 500GB, and two additional partitions were created for ceph-data
and local-storage
,
and they were created on different disks.
VolumeConfig
: used to configure system volumes (override default values)UserVolumeConfig
: used to configure user volumes (extra volumes created by the user)EPHEMERAL
VolumeNote: The volume configuration in the machine configuration is only applied when the volume has not been provisioned yet. So applying changes after the initial provisioning will not have any effect.To configure the
EPHEMERAL
(/var
) volume, append the following document to the machine configuration:
VolumeConfig
resource is optional, and if a field is not specified, the default value is used.
The default built-in values are:
EPHEMERAL
volume is provisioned on the system disk, which is the disk where Talos Linux is installed.
It has a minimum size of 2 GiB and automatically grows to utilize the maximum available space on the disk.
If you would like to keep the EPHEMERAL
volume on the system disk but limit its size to 40 GiB, you can set the maxSize
field to 40GiB
:
EPHEMERAL
on a different disk, you can set the diskSelector
field to select the desired disk:
Note: Currently, encryption forEPHEMERAL
andSTATE
volumes is configured using another config document.
IMAGECACHE
VolumehostPath
mounts in Kubernetes, but they can be used for other purposes as well.
When a user volume configuration is applied, Talos Linux will either locate an existing volume or provision a new one.
The volume will be created on the disk which satisfies the diskSelector
expression and has enough free space to satisfy the minSize
requirement.
The user volume is identified by a unique name, which is used both as a mount location and as a label for the volume.
The volume name must be unique across all user volumes, and it should be between 1 and 34 characters long, and can only contain ASCII letters, digits, and -
(dash) characters.
The volume label is derived from the volume name as u-<volume-name>
, and it is used to identify the volume on the disk after initial provisioning.
The volume mount location is /var/mnt/<volume-name>
, and it gets automatically propagated into the kubelet
container to provide additional features like subPath
mounts.
Disk encryption can be optionally enabled for user volumes.
ceph-data
is created on the first NVMe disk which has 100GB
of disk space available, and it will be created as maximum
of 200GB
if that space is available.
The status of the volume can be checked using the following command:
-o yaml
flag to get additional details.
The volume is immediately mounted to /var/mnt/ceph-data
:
hostPath
mount:
VolumeStatus
and MountStatus
resources will be removed automatically by Talos Linux.
Note: The actual disk data hasn’t been removed yet, so you can re-apply the user volume configuration back and it will be re-provisioned on the same disk.To wipe the disk data, and make it allocatable again, use the following command:
nvme0n1p2
is the partition name, and it can be obtained from the VolumeStatus
resource before the user volume is removed,
or from the DiscoveredVolume
resource any time later.
Note: If thewipe disk
command fails withblockdevice is in use by volume
, it means the user volume has not been removed from the machine configuration.
diskSelector
field is utilized to choose the disk where the volume will be provisioned.
It is a Common Expression Language (CEL) expression that evaluates against the available disks.
The volume will be provisioned on the first disk that matches the expression and has sufficient free space for the volume.
The expression is evaluated in the following context:
system_disk
(bool
) - indicates if the disk is the system diskdisk
(Disks.block.talos.dev
) - the disk resource being evaluatedNote: TheFor the disk resource, any field available in the resource specification can be used (usesystem_disk
variable is only populated after Talos installation, so you might see an error aboutsystem_disk
not being defined before installation finishes.
talosctl get disks -o yaml
to see the output for your machine):
KiB
, MiB
, GiB
, TiB
, PiB
, EiB
- binary size multipliers (1024)kB
, MB
, GB
, TB
, PB
, EB
- decimal size multipliers (1000)true
or false
.
If the expression returns true
, the disk is selected for provisioning.
Note: In CEL, signed and unsigned integers are not interchangeable. Disk sizes are represented as unsigned integers, so suffixExamples of disk selector expressions:u
should be used in constants to avoid type mismatch, e.g.disk.size > 10u * GiB
.
disk.transport == 'nvme'
: select the NVMe disks onlydisk.transport == 'scsi' && disk.size < 2u * TiB
: select SCSI disks smaller than 2 TiBdisk.serial.startsWith('deadbeef') && !cdrom
: select disks with serial number starting with deadbeef
and not of CD-ROM type'/dev/disk/by-path/pci-0000:00:1f.2-ata-1' in disk.symlinks
: select disks with a specific stable symlinkminSize
and maxSize
fields define the minimum and maximum size of the volume, respectively.
Talos Linux will always ensure that the volume is at least minSize
in size and will not exceed maxSize
.
If maxSize
is not set, the volume will grow to utilize the maximum available space on the disk.
If grow
is set to true
, the volume will automatically grow to utilize the maximum available space on the disk on each boot.
Setting minSize
might influence disk selection - if the disk does not have enough free space to satisfy the minimum size requirement, it will not be selected for provisioning.
VolumeConfig
resource, while the current state of volumes is stored in the VolumeStatus
resource.
EPHEMERAL
, META
, and STATE
are system volumes managed by Talos, while u-extra
, u-p1
and u-p2
are user configured volumes.
To get details about a specific volume configuration, use the following command:
waiting
: the volume is waiting to be provisionedmissing
: all disks have been discovered, but the volume cannot be foundlocated
: the volume is found without prior provisioningprovisioned
: the volume has been provisioned (e.g., partitioned, resized if necessary)prepared
: the encrypted volume is openready
: the volume is formatted and ready to be mountedclosed
: the encrypted volume is closed, and ready to be unmounted