1

Both nfs client and server are redhat enterprise linux. there is not firewall between the servers.

The nfs server has the right shares and data in /etc/exports. all the services are up and running. portmap rpcbind, nfsd. when attempting to mount the nfs share nothing happens. I have tried to sniff the traffic with tcpdump and i get data when executing from client:

showmounts -e < nfs server> 
rpcinfo -p <nfs server> 

this is the output of rpcinfo -p <nfs_server>

   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp  52430  status
    100024    1   tcp  37923  status
    100005    1   udp  20048  mountd
    100005    1   tcp  20048  mountd
    100005    2   udp  20048  mountd
    100005    2   tcp  20048  mountd
    100005    3   udp  20048  mountd
    100005    3   tcp  20048  mountd
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100227    3   tcp   2049  nfs_acl
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100227    3   udp   2049  nfs_acl
    100021    1   udp  49706  nlockmgr
    100021    3   udp  49706  nlockmgr
    100021    4   udp  49706  nlockmgr
    100021    1   tcp  38046  nlockmgr
    100021    3   tcp  38046  nlockmgr
    100021    4   tcp  38046  nlockmgr

I can see the shares in the showmount -e output.

telnet port 111 and 2049 work fine connection is possible.

but when attempting to mount there is nothing going in the network.. zero packages are transmitted

mount -t nfs  example:/share /app/shared -o _netdev,rw,async,vers=4 -vvvv
danidar
  • 53
  • 1
  • 6

1 Answers1

0

This problem is caused by using lazy umount.

umount -l

Once a NFS share is lazy unmounted then it's not possible to remount same NFS share again as lazy unmount does not detach filesystem completely as some existing active processes are still holding on

it can be verified using this:

 cat proc/fs/nfsfs/servers
 NV SERVER   PORT USE HOSTNAME
 v4 ac1a4c0a  801  16 nfssrv.example.com. 

Here We can see that there were 16 stale entries for NFS server

the only solution to solve the mount issue is to reboot the NFS client as it is specified in the man page:

-l, --lazy
              Lazy unmount.  Detach the filesystem from the file hierarchy now, and clean up all references to this filesystem as soon as it is not busy anymore.

              A system reboot would be expected in near future if you're going to use this option for network filesystem or local filesystem with submounts.  The recommended use-case for umount -l is to prevent hangs on  shut‐
              down due to an unreachable network share where a normal umount will hang due to a downed server or a network partition. Remounts of the share will not be possible.
danidar
  • 53
  • 1
  • 6