openebs-archive / dynamic-nfs-provisioner

Operator for dynamically provisioning an NFS server on any Kubernetes Persistent Volume. Also creates an NFS volume on the dynamically provisioned server for enabling Kubernetes RWX volumes.
Apache License 2.0
168 stars 58 forks source link

nfs server start failed #149

Closed nAnderYang closed 12 months ago

nAnderYang commented 1 year ago

i change nfsd.sh in nfs-server-alpine:0.9.0 image. add line ulimit -HSn 1048576 to nfsd.sh fix the problem.

    echo "Starting Mountd in the background..."These
    ulimit -HSn 1048576 #add line
    /usr/sbin/rpc.mountd --debug all --no-udp --no-nfs-version 2 --no-nfs-version 3

create rwx pvc the nfs pod loop error:

Displaying /etc/exports contents:
/nfsshare *(rw,fsid=0,async,no_subtree_check,no_auth_nlm,insecure,no_root_squash)

Starting rpcbind...
rpcbind: another rpcbind is already running. Aborting
Displaying rpcbind status...
   program version netid     address                service    owner
    100000    4    tcp6      ::.0.111               -          superuser
    100000    3    tcp6      ::.0.111               -          superuser
    100000    4    udp6      ::.0.111               -          superuser
    100000    3    udp6      ::.0.111               -          superuser
    100000    4    tcp       0.0.0.0.0.111          -          superuser
    100000    3    tcp       0.0.0.0.0.111          -          superuser
    100000    2    tcp       0.0.0.0.0.111          -          superuser
    100000    4    udp       0.0.0.0.0.111          -          superuser
    100000    3    udp       0.0.0.0.0.111          -          superuser
    100000    2    udp       0.0.0.0.0.111          -          superuser
    100000    4    local     /var/run/rpcbind.sock  -          superuser
    100000    3    local     /var/run/rpcbind.sock  -          superuser
    100003    4    tcp       0.0.0.0.8.1            -          superuser
    100003    4    tcp6      ::.8.1                 -          superuser
Starting NFS in the background...
rpc.nfsd: knfsd is currently up
Exporting File System...
exporting *:/nfsshare
/nfsshare       <world>
Starting Mountd in the background...These
rpc.mountd: setrlimit (RLIMIT_NOFILE) failed: Operation not permitted
Startup of NFS failed, sleeping for 2s, then retrying...

Environment details:

dsharma-dc commented 12 months ago

This looks like a platform difference in the file descriptor limits. What was the default ulimit -n value before changing it fixed the mountd startup issue?

nAnderYang commented 12 months ago

That test environment has been destroy long time ago. I can't get the value. This issue only reporting the information.

dsharma-dc commented 12 months ago

Thank you for responding. I understand this has been open for quite a long time. I'd be closing this issue now as this looks specific to the OS platform default configuration. Please feel free to revert back and reopen if there is a need.