I’m trying using the csi-driver-nfs.
It seems Controller and Node are successfully installed.
But I’m facing an issue Name or Service not known when try using volume…
I have listed the IP address of the NFS server in the volume.hcl and have confirmed that it mounts fine(v3 and v4) on the Nomad node.
node log
I0722 12:49:06.559263 1 utils.go:87] GRPC request: {"target_path":"/csi/per-alloc/21750709-c4a7-9c3b-ffd3-36656f86a8fa/nfs-500gb/rw-file-system-multi-node-multi-writer","volume_capability":{"AccessType":{"Mount":{}},"access_mode":{"mode":5}},"volume_id":"nfs-500gb"}
I0722 12:49:06.559447 1 nodeserver.go:77] NodePublishVolume: volumeID(nfs-500gb) source(:) targetPath(/csi/per-alloc/21750709-c4a7-9c3b-ffd3-36656f86a8fa/nfs-500gb/rw-file-system-multi-node-multi-writer) mountflags([])
I0722 12:49:06.559457 1 mount_linux.go:175] Mounting cmd (mount) with arguments (-t nfs : /csi/per-alloc/21750709-c4a7-9c3b-ffd3-36656f86a8fa/nfs-500gb/rw-file-system-multi-node-multi-writer)
E0722 12:49:06.563291 1 mount_linux.go:179] Mount failed: exit status 32
Mounting command: mount
Mounting arguments: -t nfs : /csi/per-alloc/21750709-c4a7-9c3b-ffd3-36656f86a8fa/nfs-500gb/rw-file-system-multi-node-multi-writer
Output: mount.nfs: Failed to resolve server : Name or service not known
volume
$ nomad volume status nfs-500gb
ID = nfs-500gb
Name = nfs-500gb
External ID = nfs-500gb
Plugin ID = nfs-500gb
Provider = nfs.csi.k8s.io
Version = 3.0.0
Schedulable = true
Controllers Healthy = 1
Controllers Expected = 1
Nodes Healthy = 3
Nodes Expected = 3
Access Mode = <none>
Attachment Mode = <none>
Mount Options = <none>
Namespace = default
Allocations
No allocations placed
volume.hcl
id = "nfs-500gb"
name = "nfs-500gb"
type = "csi"
external_id = "nfs-500gb"
plugin_id = "nfs-500gb"
capability {
access_mode = "single-node-writer"
attachment_mode = "file-system"
}
parameters {
server = "192.168.20.111"
share = "/mnt/data"
}
job(using volume)
volume "nfs-500gb" {
type = "csi"
source = "nfs-500gb"
attachment_mode = "file-system"
access_mode = "multi-node-multi-writer"
read_only = false
}
job event
failed to setup alloc: pre-run hook "csi_hook" failed: node plugin returned an internal error, check the plugin allocation logs for more information: rpc error: code = Internal desc = mount failed: exit status 32 Mounting command: mount Mounting arguments: -t nfs : /csi/per-alloc/c7104663-0916-dab6-dc27-ab5039468cad/nfs-500gb/rw-file-system-multi-node-multi-writer Output: mount.nfs: Failed to resolve server : Name or service not known
nomad: 1.1.2
csi-driver-nfs: master(2021/07/22)