Open robgardien opened 4 months ago
The error message you're seeing indicates that there might be an issue with the NFS configuration or the environment in which the NFS subdir
external provisioner is running.
It would be helpful if you could provide some steps to reproduce this issue.
HI! I'm facing the same issue after going through the guide on https://www.itwonderlab.com/kubernetes-nfs/
`stenzing@deb-test-1:~$ kubectl describe pod nfs-subdir-external-provisioner-d64f95ffd-jdcdc -n nfs
Name: nfs-subdir-external-provisioner-d64f95ffd-jdcdc
Namespace: nfs
Priority: 0
Service Account: nfs-subdir-external-provisioner
Node: w01.localcluster/192.168.1.230
Start Time: Sun, 21 Jul 2024 10:17:51 -0500
Labels: app=nfs-subdir-external-provisioner
pod-template-hash=d64f95ffd
release=nfs-subdir-external-provisioner
Annotations:
Normal Scheduled 20s default-scheduler Successfully assigned nfs/nfs-subdir-external-provisioner-d64f95ffd-jdcdc to w01.localcluster Warning FailedMount 4s (x6 over 20s) kubelet MountVolume.SetUp failed for volume "pv-nfs-subdir-external-provisioner" : mount failed: exit status 32 Mounting command: mount Mounting arguments: -t nfs -o hard=,nfsvers=4.1,noresvport=,retrans=2,rsize=1048576,timeo=600,wsize=1048576 192.168.1.202:/nfsdata /var/lib/kubelet/pods/3561da6b-bf9a-4c08-a370-0d4c39af419b/volumes/kubernetes.io~nfs/pv-nfs-subdir-external-provisioner Output: mount.nfs: an incorrect mount option was specified ` the nfs-common is installed on all nodes.
Then I checked on the nfs client documentation those arguments for the -o, and that was the issue on my side. after that I only had to set the storageclass as default and started working.
As we can observe, you're experiencing a FailedMount
error due to incorrect NFS mount options.
The error message indicates that there's an issue with the mount options used (hard=,nfsvers=4.1,noresvport=,retrans=2,rsize=1048576,timeo=600,wsize=1048576). Make sure these options are correctly specified according to your NFS server's configuration and capabilities.
I changed the NFS StorageClass of the "nfs-subdir-external-provisioner" to be the default storage class. then the PVC of the MongoDB bound successfully. otherwise it never bound.
When using NFS subdir external provisioner I receive the following error:
MountVolume.SetUp failed for volume "pvc-bee16797-fef3-4baa-b79f-5addf4455af1" : mount failed: exit status 32 Mounting command: mount Mounting arguments: -t nfs 192.168.2.173:/volume1/rancher/transmission-transmission-config-pvc-bee16797-fef3-4baa-b79f-5addf4455af1 /var/snap/microk8s/common/var/lib/kubelet/pods/485b6ad3-8e01-4cc6-8ebf-5d0945fd08d0/volumes/kubernetes.io~nfs/pvc-bee16797-fef3-4baa-b79f-5addf4455af1
Output: mount: /var/snap/microk8s/common/var/lib/kubelet/pods/485b6ad3-8e01-4cc6-8ebf-5d0945fd08d0/volumes/kubernetes.io~nfs/pvc-bee16797-fef3-4baa-b79f-5addf4455af1: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount. helper program.
I can confirm I have installed mount.nfs (apt install nfs-common) so I don't know how to solve this error. Thank you for your help