Skip to main content
Talos Linux provides sophisticated block storage configuration through dedicated document types. These replace the deprecated machine.disks and machine.systemDiskEncryption fields from v1alpha1.

UserVolumeConfig

The UserVolumeConfig document defines user-managed volumes that are automatically provisioned and mounted under /var/mnt/<name>.

Document Structure

kind: UserVolumeConfig
apiVersion: v1alpha1
metadata:
  name: volume-name

Volume Configuration

name
string
required
Name of the volume (1-34 characters). Can contain lowercase/uppercase ASCII letters, digits, and hyphens.The partition label is automatically generated as u-<name>.
volumeType
string
default:"partition"
Type of volume to create.Available types:
  • partition - Create a partition on a disk (default)
  • disk - Use an entire disk
  • directory - Create a directory in the system partition
volumeType: partition

Provisioning Configuration

provisioning
object
Describes how the volume is provisioned (not applicable for directory type).

Filesystem Configuration

filesystem
object
Describes how the volume is formatted.

Encryption Configuration

encryption
object
Describes how the volume is encrypted.

Mount Configuration

mount
object
Additional mount options for the volume.

Complete Examples

kind: UserVolumeConfig
apiVersion: v1alpha1
name: local-data
volumeType: partition
provisioning:
  diskSelector:
    match: 'disk.transport == "nvme"'
  maxSize: 50GiB
filesystem:
  type: xfs
encryption:
  provider: luks2
  keys:
    - slot: 0
      tpm: {}
    - slot: 1
      static:
        passphrase: topsecret

ExistingVolumeConfig

The ExistingVolumeConfig document mounts existing volumes that were created outside of Talos.
kind: ExistingVolumeConfig
apiVersion: v1alpha1
name: data
volumeLocator:
  partitionLabel: DATA
mountpoint: /var/mnt/data

RawVolumeConfig

The RawVolumeConfig document provides raw (unformatted) volume access.
kind: RawVolumeConfig
apiVersion: v1alpha1
name: raw-storage
volumeType: partition
provisioning:
  diskSelector:
    match: 'disk.size >= 100u * GB'

SwapVolumeConfig

The SwapVolumeConfig document configures swap space.
kind: SwapVolumeConfig
apiVersion: v1alpha1
provisioning:
  diskSelector:
    match: 'disk.transport == "nvme"'
  minSize: 8GiB

VolumeConfig

The VolumeConfig document configures system volumes (EPHEMERAL, STATE, etc.).
kind: VolumeConfig
apiVersion: v1alpha1
name: EPHEMERAL
provisioning:
  grow: true
encryption:
  provider: luks2
  keys:
    - slot: 0
      tpm: {}

Disk Selector Expressions

Disk selectors use CEL (Common Expression Language) for flexible disk matching. Available disk properties:
  • disk.size - Disk size in bytes (use * GB or * GiB multipliers)
  • disk.transport - Transport type (nvme, sata, usb, etc.)
  • disk.type - Disk type (ssd, hdd)
  • disk.model - Disk model string
  • disk.serial - Disk serial number
  • disk.wwid - World-wide identifier
  • disk.rotational - Boolean indicating rotational media

Example Expressions

# NVMe drives only
match: 'disk.transport == "nvme"'

# SSDs larger than 500GB
match: 'disk.size >= 500u * GB && disk.type == "ssd"'

# Non-rotational drives
match: '!disk.rotational'

# Specific model
match: 'disk.model.contains("Samsung")'

# Multiple conditions
match: 'disk.transport == "nvme" && disk.size >= 1u * TB && disk.type == "ssd"'

Encryption Key Management

Key Slot Strategy

LUKS2 supports up to 8 key slots (0-7). Use multiple slots for key rotation and recovery:
  • Slot 0: Primary key (TPM-based for production)
  • Slot 1: Recovery key (static passphrase)
  • Slot 2: KMS-managed key (for centralized management)

TPM-Based Encryption

TPM encryption binds the key to the machine’s hardware and boot state:
encryption:
  provider: luks2
  keys:
    - slot: 0
      tpm:
        options:
          pcrs: [7]  # Secure Boot state
        checkSecurebootStatusOnEnroll: true
    - slot: 1
      static:
        passphrase: recovery-key
      lockToState: true

KMS Integration

Use external Key Management Service for centralized key management:
encryption:
  provider: luks2
  keys:
    - slot: 0
      kms:
        endpoint: https://kms.example.com:4443

Best Practices

Include at least one static passphrase key in addition to TPM keys for recovery scenarios.
keys:
  - slot: 0
    tpm: {}
  - slot: 1
    static:
      passphrase: secure-recovery-key
  • Use partition for most cases
  • Use disk when you need an entire dedicated disk
  • Use directory for lightweight storage without partitioning
Set maxSize to prevent volumes from consuming all available space. Use grow: true when you want the volume to expand.
For non-STATE volumes with TPM encryption, enable lockToState for additional security.

Migration from Deprecated Fields

The following deprecated v1alpha1 fields are replaced by the new volume configuration documents:
Deprecated FieldNew Document Type
machine.disksUserVolumeConfig
machine.systemDiskEncryptionVolumeConfig

Machine Configuration

See machine-level configuration options

Network Configuration

Configure network interfaces

Build docs developers (and LLMs) love