Skip to main content
Longhorn is a distributed block storage system for Kubernetes that provisions persistent volumes from the local disks of your nodes. It ships with two data engines, and this guide covers installing both on a Talos Linux cluster.
  • V1 Data Engine: the mature, production-ready default. It builds replicated volumes on a Longhorn-native iSCSI stack and runs on any node that has the required system extensions.
  • V2 Data Engine: a newer, SPDK-based engine that delivers higher throughput and lower latency at the cost of extra node configuration. It additionally requires huge pages and a few kernel modules.
Pick the tab for the engine you want to deploy. Both paths cover the required system extensions, disk provisioning with UserVolumeConfig or RawVolumeConfig, pod security configuration, and the final Helm installation.

Prerequisites

Before you begin, ensure that you have the following:
  • talosctl configured and authenticated against your cluster
  • kubectl configured to access the same cluster
  • Helm 3 installed
  • At least one dedicated disk per storage node (NVMe recommended)
Longhorn also requires two Talos system extensions on every node:
  • siderolabs/iscsi-tools — provides iscsid and iscsiadm for persistent volume operations
  • siderolabs/util-linux-tools — provides fstrim for filesystem trimming
The schematic ID 613e1592b2da41ae5e265e8789429f22e121aab91cb4deb6bc3c0b6262961245 corresponds to exactly the four extensions listed above.
If you are provisioning new nodes, add these extensions when building your Talos image using the Talos Image Factory UI or during the Download installation media step when creating machines with Omni.
The V1 Data Engine is Longhorn’s mature, production-ready default. It builds replicated volumes on a Longhorn-native iSCSI stack and runs on any node that has the required system extensions, so each storage node needs nothing more than a dedicated disk.

Step 1: Provision a dedicated disk with UserVolumeConfig

Talos Linux v1.10 introduced UserVolumeConfig, which replaces the deprecated machine.disks API.This resource automatically mounts selected disks under /var/mnt/<name>. In this guide, the volume is named longhorn which mounts at /var/mnt/longhorn.

1.1: Inspect available disks

Inspect the disks available on each storage node.
Use this output to determine which disks should be used for Longhorn storage.

1.2: Create the UserVolumeConfig

Create a UserVolumeConfig document to tell Talos which disk to provision for Longhorn. Talos will automatically mount the volume at /var/mnt/longhorn.Adjust based on your hardware and the disk you want to use. The example below uses the first NVMe disk that is not a system disk.
The diskSelector.match field accepts Common Expression Language (CEL) expressions. You can target disks more precisely using expressions such as disk.size > 50GB or disk.model == "Samsung SSD 980". Run talosctl get disks to see the available fields for your hardware. For more information, refer to the Disk Management documentation.

1.3: Apply the UserVolumeConfig configuration to storage nodes

Define the IP addresses of the worker nodes that will provide storage to Longhorn.Add one entry per worker node that will provide storage to Longhorn:
Then apply the UserVolumeConfig patch to each node:

1.4: Reboot the nodes

Reboot each worker node to apply the configuration changes:

Step 2: Enable privileged pod security

Longhorn requires privileged containers to manage disks and mount volumes.Talos enables the Pod Security Admission Policies by default, which blocks the privileged containers.Create the longhorn-system namespace and label it to allow privileged workloads:

Step 3: Install Longhorn with Helm

Add the Longhorn Helm repository:
Install Longhorn:
This configures Longhorn to store replicas at /var/mnt/longhorn, which matches the disk path created in Step 1.Wait for the deployment to complete:

Step 4: Verify the installation

Check that the Longhorn nodes are registered:
You should see one entry per storage node, similar to:
Each storage node should appear with SCHEDULABLE set to true and at least one disk detected.

Step 5: Create a test persistent volume

Create a test PersistentVolumeClaim.
Check its status:
The PVC should reach the Bound state within a few seconds, confirming that Longhorn can provision volumes. Once you have confirmed it works, remove the test claim: