I’m trying to use a volume to a mounted NFS share.
- I’ve added a disk to each node pointing to a mounted NFS path on the node
- I’ve added the volume and the PVC
All of the above works fine, however when i try to spin up a pod that uses the volume I immediately get an error, “Not ready for workload. Volume Faulted”.
Am I missing some settings? Any help would be much appreciated.
If I’m understanding you correctly. You have mounted an NFS share on each node in the cluster for use by Longhorn for its backend.
If that is correct, then that is your problem. Longhorn needs an independent block device on each node with a filesystem that supports fallocate (ext4 or xfs). This is because Longhorn creates a disk image on the filesystem (called a replica) using fallocate so it’s space efficient. Then repeats that process on two other nodes at which point it presents each replica (3 is the default) as iSCSI devices to a manager which basically creates a RAID1 device (3-member mirror) but in Go Lang which we call a volume. Finally, we present that volume as an iSCSI target to the rest of the cluster then whatever node needs to mount that volume can then use the OS’s iSCSI initiator software to mount the SCSI device.
Now for RWX volumes, there is an extra step in the fact that Longhorn mounted that block device to a pod called the share manager which is running an NFS server which in turn exports that volume then the nodes can mount it using their NFS client.