Is there a CSI configuration that will let me mount an NFS share on my three hosts, and use it for VM storage? I’m guessing that I would need to set the copies to 1 since the NAS would be handling redundancy. Also that dataLocality=best-effort might need to be set.
I know Harvester is set up as HCI, but thinking there might be a way to do this, and I’d like to try it. Shares are served from Truenas Scale. I could try iSCSI too.
Yes, Harvester 1.7.1 supports using an NFS share for VM storage via an external CSI driver. This is officially supported since v1.5.0 (see the official Harvester docs: Advanced > Third-Party Storage Support).
NFS CSI Driver — How to set it up:
The validated NFS CSI driver is nfs.csi.k8s.io. Steps from the official docs:
Prerequisites: Your NFS server (TrueNAS Scale) must already be running. Make sure to disable root squashing (no_root_squash or no_all_squash) — KubeVirt requires the QEMU UID/GID to sync volumes correctly.
Install the driver via Helm using the csi-driver-nfs chart (v4.10.0), available from the kubernetes-csi GitHub repo.
Create a StorageClass pointing to your NFS server and share, using provisioner nfs.csi.k8s.io, with allowVolumeExpansion: true and nfsvers=4.2 in mountOptions.
Configure Harvester: Go to Advanced > Settings > csi-driver-config and set the provisioner to nfs.csi.k8s.io.
Regarding your specific assumptions:
Replica count: You do NOT need to set it to 1 in Longhorn. NFS volumes bypass Longhorn entirely — provisioned directly by the NFS CSI driver. TrueNAS Scale handles its own redundancy.
dataLocality=best-effort: This is a Longhorn-specific parameter and does NOT apply to the NFS CSI driver. You don’t need it.
NFS CSI capabilities in Harvester 1.7 (official compatibility table):
Supported: VM Image, VM Root Disk, VM Data Disk, Volume Export to VM Image, VM Template generation.
NOT supported: VM Live Migration, VM Backup (backup is currently limited to Longhorn volumes only).
iSCSI: Not listed as a validated CSI driver in the v1.7 official docs. NFS is the better-documented path for TrueNAS Scale at this time.
Thanks! For some reason I was thinking nfs was only supported for backup. Too bad no live migration, but I’ll need to get this installed and work with it a bit. I think I may be getting CPU bound on my little lab, speeds over Longhorn are not great, running 10gbps, waiting for new modules to hopefully step up to 25gbps and see if I’m happier. The DAC cables I have don’t seem to be compatible with switch or card, only seeing auto negotiate to 10g manually setting to 25 only gives 10g speeds.