I have 1 nfs-server(10.192.244.109) & 2 nfs-client there.
On one client, both ok to mount the nfs-server directory with v3 & v4, while on another client, it's only ok to mount the nfs-server directory with v4, the client reports connection timeout if use v3.
- Client 1 ok for v3 and v4:
root@shubuntu1:~# mount -t nfs -o nfsvers=3 10.192.244.109:/var/lib/lava/dispatcher/tmp delete root@shubuntu1:~# umount delete root@shubuntu1:~# mount -t nfs -o nfsvers=4 10.192.244.109:/var/lib/lava/dispatcher/tmp delete root@shubuntu1:~# umount delete - Client 2 just ok for v4 but not ok for v3:
root@LAVA-Debug:~# mount -t nfs -o nfsvers=4 10.192.244.109:/var/lib/lava/dispatcher/tmp delete root@LAVA-Debug:~# umount delete root@LAVA-Debug:~# time mount -t nfs -o nfsvers=3 10.192.244.109:/var/lib/lava/dispatcher/tmp delete mount.nfs: Connection timed out real 2m5.713s user 0m0.079s sys 0m0.061s Additional info if helps:
shubuntu1@shubuntu1:~$ mount.nfs -V mount.nfs: (linux nfs-utils 1.3.3) root@LAVA-Debug:~# mount.nfs -V mount.nfs: (linux nfs-utils 1.3.3) What could be the possible reason here? Where I can go to take a look?
1 Answer
Where I can go to take a look?
Use a packet capture tool (e.g. tcpdump/tshark, Wireshark/termshark) to see the connection attempts, i.e. network packets being sent from the client to the server. Look for those that are re-sent several times but never get replied to.
You might also try enabling verbose RPC call logging on the client machine's kernel (the messages will go to dmesg) using the sysctl sunrpc.rpc_debug=0xFFFF command.
What could be the possible reason here?
For NFSv3, it is likely that this will be a connection attempt either to the portmapper (rpcbind service), or to one of the dynamic ports (for NFS itself or its auxiliary mountd/statd services). NFSv4 does not have this problem because it uses only a single TCP connection.