kubernetes / examples

Kubernetes application example tutorials
Apache License 2.0
6.21k stars 4.54k forks source link

NFS folder root user #379

Closed rushins closed 4 years ago

rushins commented 4 years ago

hello team,

I have a weird issue . i use NetApp storage as NFS volume in my container as /data using complete NFS volume and IP address of target in my docker host/container for example: /data using PV and PVC . My PV, PVC is active and bounded to my POD.

I see my container mounted the volume from PV,PVC to my pod and i see the /data, however the files under /data path ownership is not showing "root" and i expect to have "root" owner . I get this weird ownership "99" number and even if do "chown -R root:root file" the ownership is not getting updated.

From our netapp storage volume is having full permission to these hosts and i dont see any issue becuase i mounted on another docker host and i see the permissions as root , however in the kubernetes container side it is not showign "root" ownership

dr-xr-xr-x. 6 99 sapinst 4096 Apr 27 18:20 K8S

Does anyone come across this issue and what is the root cause and fix .

BR Rushi.

rushins commented 4 years ago

hi i am using NFS4 in my PV mount options like below , when i use NFS=3 i get errors because the container seems

apiVersion: v1 kind: PersistentVolume metadata: name: pv0003 spec: capacity: storage: 5Gi volumeMode: Filesystem accessModes:


error using NFS3 , i get this error.

ount.nfs: parsing error on 'nfsvers=' option Warning FailedMount 8s kubelet, node4 MountVolume.SetUp failed for volume "vacik8snfs" : mount failed: exit status 32

Mounting command: systemd-run Mounting arguments: --description=Kubernetes transient mount for /var/lib/kubelet/pods/11fb184d-a440-44df-8e12-679edb04a18f/volumes/kubernetes.io~nfs/vacik8snfs --scope -- mount -t nfs -o hard,nfsvers=3.0 host:/vol1 0001 /var/lib/kubelet/pods/11fb184d-a440-44df-8e12-679edb04a18f/volumes/kubernetes.io~nfs/vacik8snfs Output: Running scope as unit run-17255.scope. mount.nfs: parsing error on 'nfsvers=' option


rushins commented 4 years ago

it turned out a NFS release issue .