Talos Linux Support
You must meet the following requirements before installing Longhorn on a Talos Linux cluster.
Some Longhorn-dependent binary executables are not present in the default Talos root filesystem. To have access to these binaries, Talos offers system extension mechanism to extend the installation.
siderolabs/iscsi-tools
: this extension enables iscsid daemon and iscsiadm to be available to all nodes for the Kubernetes persistent volumes operations.siderolabs/util-linux-tools
: this extension enables linux tool to be available to all nodes. For example, the fstrim
binary is used for Longhorn volume trimming.The most straightforward method is patching the extensions onto existing Talos Linux nodes.
customization:
systemExtensions:
officialExtensions:
- siderolabs/iscsi-tools
- siderolabs/util-linux-tools
For detailed instructions, see the Talos documentation on System Extensions and Boot Assets.
Longhorn requires pod security enforce: "privileged"
.
By default, Talos Linux applies a baseline
pod security profile across namespaces, except for the kube-system namespace. This default setting restricts Longhorn’s ability to manage and access system resources. For more information, see Root and Privileged Permission.
For detailed instructions, see Pod Security Policies Disabled & Pod Security Admission Introduction and the Talos documentation on Pod Security.
You need provide additional data path mounts to be accessible to the Kubernetes Kubelet container.
These mounts are necessary to provide access to the host directories, and attach volumes required by Longhorn components.
machine:
kubelet:
extraMounts:
- destination: /var/lib/longhorn
type: bind
source: /var/lib/longhorn
options:
- bind
- rshared
- rw
For detailed instructions, see the Talos documentation on Editing Machine Configuration.
To use V2 volumes, all nodes must meet the V2 Data Engine prerequisites.
machine:
sysctls:
vm.nr_hugepages: "1024"
kernel:
modules:
- name: nvme_tcp
- name: vfio_pci
# - name: uio_pci_generic
Note: Talos Linux v1.7.x and earlier versions do not include the
uio_pci_generic
kernel module. If your system device supportsvfio_pci
, which is the preferred kernel module for SPDK application deployment, you are not required to install and enable theuio_pci_generic
kernel driver. For more information, see System Configuration User Guide in the SPDK documentation.You can use
uio_pci_generic
ifvfio_pci
is incompatible with your system or specific hardware. Future versions of Talos Linux are expected to include native support foruio_pci_generic
. For more information, see Issue #9236. Since 1.8.0uio_pci_generic
is now supported.
When upgrading a Talos Linux node, always include the --preserve
option in the command. This option explicitly tells Talos to keep ephemeral data intact.
Example:
talosctl upgrade --nodes 10.20.30.40 --image ghcr.io/siderolabs/installer:v1.7.6 --preserve
Caution: If you do not include the
--preserve
option, Talos wipes/var/lib/longhorn
, destroying all replicas stored on that node.
If you were unable to include the --preserve
option in the upgrade command, perform the following steps:
On the Longhorn UI, go to the Nodes page.
Select the upgraded node, and then select Edit node and disks in the Operation menu.
On the Edit Node and Disks page, set Scheduling to Disable, delete the disk, and then click Save.
Select the upgraded node again, and then select Edit node and disks in the Operation menu.
On the Edit Node and Disks page, add a disk and configure the following settings:
/var/lib/longhorn/
.Click Save.
Longhorn synchronizes the replicas based on the configured settings.
The --preserve
is no longer required. The flag is automatically set for talosctl upgrade
command here.
Because Talos Linux deprecated .machine.disks
we recommend using UserVolumeConfig
to mount a disk for Longhorn. See the What’s new in Talos v1.10 for more details.
You can optionally create also a VolumeConfig
to specify the size of Talos System volumes, which is recommended, like this we avoid the set defaultSettings.storageReservedPercentageForDefaultDisk
.
More options of disk configuration can be found in the Talos documentation.
You need provide additional data path mounts to be accessible to the Kubernetes Kubelet container.
These mounts are necessary to provide access to the host directories, and attach volumes required by Longhorn components.
machine:
kubelet:
extraMounts:
- destination: /var/mnt/longhorn
type: bind
source: /var/mnt/longhorn
options:
- bind
- rshared
- rw
You need to create a UserVolumeConfig
to mount the disk for Longhorn, which will be automatically mounted to /var/mnt/longhorn
on the configured node.
apiVersion: v1alpha1
kind: UserVolumeConfig
name: longhorn # name is used to identify the volume /var/mnt/<name>
provisioning:
diskSelector:
match: disk.transport == "nvme"
grow: false
maxSize: 1700GB
For detailed instructions on UserVolumeConfig
and VolumeConfig
, see the Talos documentation on Block configuration
© 2019-2025 Longhorn Authors | Documentation Distributed under CC-BY-4.0
© 2025 The Linux Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.