nfsd: last server has exited, flushing export cache

5,566

If my understanding is correct, the issue itself is not with NFS but rather Finder. Windows and Linux clients did not display performance issues when connecting to the NFS mounts.

These are the steps I took to resolve the performance issue on Finder:

  1. Stopped rpcbind service
  2. Stopped nfslock service
  3. Executed command rm -rf /var/lib/nfs/statd/sm/*
  4. Executed command rm -rf /var/lib/nfs/statd/sm.bak/*
  5. Started rpcbind service
  6. Started nfslock service
  7. Restarted nfs service

Afterwards Finder was able to open and list directories with ease. I'm not exactly sure why this worked but the effect was significant.

Lastly, I did try to add symlinks at /var/lib/rpcbind to /var/cache/rpcbind but this made no difference (of course I restarted all the appropriate services) so I defaulted back to the original setup.

EDIT: The main culprit was hidden files, millions of them. Finder had a terrible time handling all these files. Removing them fixed the performance better than anything else I've tried.

Share:
5,566

Related videos on Youtube

Aren Tahmasian
Author by

Aren Tahmasian

Updated on September 18, 2022

Comments

  • Aren Tahmasian
    Aren Tahmasian over 1 year

    Brief Summary on the issue:

    NFS share on a CentOS6.9 system properly mounts and displays the directory when mounted on a Windows or Linux system but has trouble displaying the directory when mounted on Mac OS systems. After mounting the NFS share on a Mac OS system, Finder pinwheels as it attempts to load the contents of the directory.

    Error message from /var/log/messages:

    kernel: nfsd: last server has exited, flushing export cache
    kernel: Installing knfsd (copyright (C) 1996 [email protected])
    kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
    

    Output of cat /etc/passwd | grep rpc

    rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin
    rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
    

    I'm having a really hard time understanding the error message in /var/log/messages, what is wrong with nfs? I found a few other posts online that pointed to the path in /etc/passwd being incorrect, even though others in that post stated it should be fine.

    I double checked the path listed in /etc/passwd and found there is no such rpcbind folder in /var/lib, but there is one in /var/cache which the person in that post stated is the correct path. Is that path possibly causing the issue?

    The next steps I plan on taking is restarting nfs and rpcbind services and if that fails, then reinstalling with yum reinstall nfs-util rpcbind. If both of these methods fail then I'll consider changing the path from /var/lib to /var/cache.

    Has anyone ever come across this issue before?

    Bug Zilla Post

    centos.org forum post