Architecting Storage Resilience in Harvester HCI with Longhorn
Learn how Harvester uses KubeVirt and Longhorn to build a resilient HCI. This guide covers the 3-node minimum design, trust boundaries, and how to verify storage failover.
23 May 2026, 01:59 UTC

The Problem: Balancing Data Persistence with Node Failure
In a Hyper-Converged Infrastructure (HCI) like Harvester, the primary risk is the tight coupling of compute and storage. When a physical node fails, you lose both the CPU cycles running your Virtual Machines (VMs) and the local disks holding their data. Without a distributed storage strategy, a single hardware failure results in permanent data loss or extended downtime while restoring from backups.
The solution is the integration of Longhorn, a distributed block storage system that replicates VM disks across multiple nodes. This ensures that if Node A fails, the VM can be rescheduled to Node B, which already possesses a synchronized copy of the disk.
The Smallest Suitable Design
To achieve high availability (HA) and avoid the "split-brain" scenario—where two nodes both believe they own the same data—a minimum of three worker nodes is required. While a two-node cluster can function, it cannot maintain a reliable quorum for storage voting during a failure.
In this design, each VM disk is treated as a Longhorn Volume. The smallest resilient configuration uses a replication factor of 3. This means every write operation is synchronously mirrored to three different physical nodes before the write is acknowledged to the guest OS.
Trust and Data Boundaries
Harvester separates the management plane from the data plane to prevent guest VMs from impacting cluster stability:
- Management Plane: Controlled via Kubernetes RBAC (Role-Based Access Control). This layer handles the KubeVirt orchestration and Longhorn volume mapping.
- Data Plane: VM traffic is isolated using virtual networks. Longhorn replicates data over a dedicated storage network (or a tagged VLAN) to prevent storage synchronization traffic from saturating the VM's application network.
- Resource Boundary: KubeVirt wraps VMs in pods. By applying Kubernetes resource limits to these pods, you prevent a "noisy neighbor" VM from consuming all CPU/RAM on a node and crashing the Longhorn storage engine.
Operational Checks and Verification
To verify that your storage is actually resilient and not just "running," perform the following checks:
1. Volume Health Check
Access the Longhorn UI via the Harvester dashboard. Ensure all volumes show a Healthy status with 3/3 replicas. If a volume shows Degraded, it means one replica is missing or out of sync, and the system is one failure away from data loss.
2. Failover Validation
To test the architecture's resilience, perform a hard power-off of a single node. Run this check from a separate management machine:
# Check VM status via kubectl (requires admin permissions on the Harvester cluster)
kubectl get vms -n harvester-system
# Expected result: The VM on the failed node should transition to 'Scheduling'
# and then 'Running' on a healthy node within a few minutes.
3. I/O Performance Baseline
Because Longhorn uses synchronous replication, write latency is tied to the slowest network link between nodes. Use a tool like fio inside the guest VM to measure baseline latency. If latency spikes during a volume rebuild, it indicates the network is saturated.
Failure Modes and Limitations
| Failure Scenario | System Response | Risk/Limitation |
|---|---|---|
| Single Node Crash | VM rescheduled; Longhorn promotes a replica to primary. | Brief downtime during VM boot-up on new node. |
| Network Partition | Quorum voting prevents multiple nodes from writing to one volume. | VMs may enter a "Paused" state to prevent data corruption. |
| Disk Full on Node | Longhorn stops scheduling new replicas to that node. | Reduced redundancy until space is cleared. |
Conditions for Design Change
The three-node, synchronous replication model is suitable for general-purpose workloads. However, you should move to a different architecture if the following conditions are met:
- Extreme I/O Requirements: If the latency of synchronous replication across the network is too high for your database, you must move the workload to a node with local NVMe storage (disabling replication), accepting that the VM will not fail over automatically.
- Large Scale Expansion: As the cluster grows beyond 10-15 nodes, the overhead of managing a single large Longhorn cluster can increase. Consider splitting workloads into multiple smaller clusters or implementing strict storage classes to limit replication domains.
Rollback Procedure
If a storage configuration change (such as increasing the replication factor) causes system instability, revert the volume settings in the Longhorn UI. Longhorn will automatically begin syncing the extra replicas back down to the previous count. No data is deleted during this process, but I/O performance may dip during the synchronization phase.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.