Listing Disks
To obtain a list of all available block devices (disks) on the machine, you can use the following command:Discovered Volumes
Talos Linux monitors all block devices and partitions on the machine. Details about these devices, including their type, can be found in theDiscoveredVolume
resource.
bluestore
(Ceph)ext2
,ext3
,ext4
iso9660
luks
(LUKS encrypted partition)lvm2
squashfs
swap
talosmeta
(Talos Linux META partition)vfat
xfs
zfs
Disk Layout
The default disk layout for Talos installation is as follows: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.
Single Disk Layout
EPHEMERAL
partition was limited to 200GB, and two additional partitions were created for ceph-data
and local-storage
.
Multiple Disk Layout
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.
Volume Management
Talos Linux implements disk management through the concept of volumes. A volume represents a provisioned, located, mounted, or unmounted entity, such as a disk, partition, or a directory/overlay mount. Talos Linux provides volume configuration using the following machine configuration documents:VolumeConfig
: used to configure system volumes (override default values)UserVolumeConfig
: used to configure user volumes (extra volumes created by the user)
System Volume Configuration
EPHEMERAL
Volume
Note: 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
Volume
This system volume is not provisioned by default, and it only gets created if the Image Cache feature is enabled.
See Image Cache configuration for more details.
User Volumes
User Volumes allow to treat available disk space as a pool of allocatable resource, which can be dynamically allocated to different applications. The user volumes are supposed to be used mostly forhostPath
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.
Creating User Volumes
To create a user volume, append the following document to the machine configuration: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:
Removing User Volumes
Before removing a user volume, ensure that it is not mounted in any Kubernetes pod. In order to remove a user volume, first remove the configuration document from the machine configuration. TheVolumeStatus
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.
Common Configuration
Disk Selector
ThediskSelector
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 evaluated
Note: 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 withdeadbeef
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 symlink
Minimum, Maximum and Grow
TheminSize
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.
The grow
flag controls what happens when the volume already exists:
- On initial creation:
grow
is ignored. The new volume is created betweenminSize
andmaxSize
(or full disk ifmaxSize
is unset). - On subsequent boots (when the volume already exists):
- If
grow: false
, the existing volume size is never changed. - If
grow: true
, and the current volume is smaller thanmaxSize
(ormaxSize
is unset), Talos will expand the volume to fill available space after it.
- If
Resources
The configuration of volumes is defined using theVolumeConfig
resource, while the current state of volumes is stored in the VolumeStatus
resource.
Configuration
The volume configuration is managed by Talos Linux based on machine configuration. To see configured volumes, use the following command: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:
Status
Current volume status can be obtained using 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