wiki:NfsTroubleshooting
Last modified 6 years ago Last modified on 01/31/12 15:08:17

If NFS mounting is really slow, make sure your machine has portmap running.


If automount doesn't work, try mounting manually with something like mount -t nfs axon:/home/detwiler /mnt and investigate error messages.

  • If it's a permission problem, edit /etc/exports on the NFS server and restart nfs and open-nfs-ports. You can get a list with ldapsearch -vvv -xLLL |grep automountI.
  • If a home directory location changed recently, restart nscd, automount, and portmap:
    /etc/init.d/nscd restart
    /etc/init.d/autofs restart
    /etc/init.d/portmap restart
    

If an NFS directory (/usr/local/data or /home/someuser) hangs on a machine, here are some steps to follow:

Symptom: "/nfs/someuser: Stale NFS file handle"
Symptom: "umount: /nfs/someuser: device is busy"

/!\ In many cases, it's simplest to reboot the client machine rather than all the steps below.

  1. Search for all open files on NFS mounts
  2. Stop services and/or kill processes using these files
  3. Manually umount
  4. Restart the nscd and autofs services.
  5. Remount and restart services

The Stale NFS file handle message means the NFS server has restarted since the last read, you need to manually unmount the automounted directory. However, any processes trying to read from the directory will block the unmount. Try lsof |grep '/nfs/' to see what's trying to use the files (hint java is often tomcat). Note all those processes, stop or kill them, and then manually unmount with umount /nfs/someuser. Last, to make sure that you have all the latest LDAP changes, restart nscd and autofs. Now ls /home/someuser should work fine.