Kubernetes NFS PV, Lock Questions

10/19/2019

I didn't set mountOptions.nolock.Use this pv after,then my mount file No locks available. I tried to set mount to - local_lock=all or - lock.

This is pv.yaml

apiVersion: v1
kind: PersistentVolume
metadata:
  name: pv3
spec:
  storageClassName: pv
  capacity:
    storage: 200M
  accessModes:
    - ReadWriteMany
  nfs:
    path: /redis-pv3
    server: 192.168.0.103

I'm sure pod is bind pvc,pvc is bind pv. I get into pod and use mount, can see this content.

192.168.0.103:/redis-pv3 on /data type nfs (rw,relatime,vers=3,rsize=8192,wsize=8192,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.
0.103,mountvers=3,mountport=1058,mountproto=udp,local_lock=none,addr=192.168.0.103)

The local_lock is none, and my redis cluster can't get the file lock. Error log:

Impossible to lock nodes.conf: No locks available

My NFS server is use hanneWIN in windows 10 I have settings Network Lock Manager on Port, is 4045. And my firewall Inbound rules is allow all port,Include 4045.

I want to see to kubernetes mount command logs,How can I see?

How can I setting up pv or kubernetes or NFS?

Thank you for you help!

-- Jianpan Chen
kubernetes
kubernetes-pvc
nfs

0 Answers