Listing Disks
To obtain a list of all available block devices (disks) on the machine, you can use the following command:Discovering 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
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, ortmpfs
filesystem.
The configuration of volumes is defined using the VolumeConfig
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 the remaining volumes are based on the machine configuration for machine.disks
.
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
Machine Configuration
Note: OnlyTo configure theEPHEMERAL
andIMAGECACHE
system volume configuration can be managed through the machine configuration. 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.
EPHEMERAL
(/var
) volume, add 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.
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
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
Minimum and Maximum Size
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.
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.