NFS Server Not Responding

(Reproduce Series)

1 Overview

According to NFS manual, the NFS client can specify the mount options with the below parameters.

nfs_client$ mount -t nfs -o recovery_method,timeo=n,retrans=n server:path path

“NFS server not responding” occurs when the NFS client cannot complete a RPC function within the timeout. Common reasons:

To quickly reproduce “NFS server not responding”, we use small timeo, retrans values and simulate the above conditions.

2 Prepare Lab

vm1$ exportfs -v
/srv/nfs 192.0.0.0/24(sync,wdelay,hide,no_subtree_check,\
sec=sys,rw,root_squash,no_all_squash)

vm1:~# ss -an | grep :2049
tcp   LISTEN 0      64                   0.0.0.0:2049          0.0.0.0:*
tcp   ESTAB  0      0                 192.0.0.10:2049       192.0.0.20:693
tcp   LISTEN 0      64                      [::]:2049             [::]:*
vm2$ mount -t nfs -o timeo=100,retrans=2 192.0.0.10:/srv/nfs /mnt/nfs

vm2$ mount -v
192.0.0.10:/srv/nfs on /mnt/nfs type nfs4 (rw,relatime,vers=4.2,\
rsize=131072,wsize=131072,namlen=255,\
hard,fatal_neterrors=none,proto=tcp,timeo=100,retrans=2,sec=sys,client)
  
  

3 Reproduce

3.1 Firewall Blocks NFS

vm1$ apk add iptables
vm1$ iptables --append INPUT --source 192.0.0.20 -p tcp --dport 2049 -j DROP
vm1$ iptables --append INPUT --source 192.0.0.20 -p udp --dport 2049 -j DROP

vm1$ iptables -nvL --line-numbers
Chain INPUT (policy ACCEPT 435 packets, 35580 bytes)
num   pkts bytes target     prot opt in     out     source               destination
1      163 10860 DROP       tcp  --  *      *       192.0.0.20           0.0.0.0/0            tcp dpt:2049
2        0     0 DROP       udp  --  *      *       192.0.0.20           0.0.0.0/0            udp dpt:2049

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
num   pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
num   pkts bytes target     prot opt in     out     source               destination
vm2$ dmesg -wT
[Tue Oct  6 06:16:53 2026] nfs: server 192.0.0.10 not responding, still trying
[Tue Oct  6 06:19:15 2026] nfs: server 192.0.0.10 not responding, timed out
[Tue Oct  6 06:19:35 2026] nfs: server 192.0.0.10 not responding, timed out
[Tue Oct  6 06:20:35 2026] nfs: server 192.0.0.10 not responding, timed out
[Tue Oct  6 06:21:35 2026] nfs: server 192.0.0.10 not responding, timed out
vm1$ iptables --delete INPUT 2
vm1$ iptables --delete INPUT 1

3.2 Traffic Control Drops NFS

vm1$ tc qdisc add dev eth2 root netem loss 100%

vm1$ tc qdisc show dev eth2
qdisc netem 8001: root refcnt 2 limit 1000 loss 100% seed 13627998538068838059
vm2$ dmesg -wT
[Tue Oct  6 06:32:13 2026] nfs: server 192.0.0.10 not responding, still trying
[Tue Oct  6 06:33:48 2026] nfs: server 192.0.0.10 not responding, timed out
[Tue Oct  6 06:34:48 2026] nfs: server 192.0.0.10 not responding, timed out
[Tue Oct  6 06:35:48 2026] nfs: server 192.0.0.10 not responding, timed out
vm1$ tc qdisc del dev eth2 root netem

vm1$ tc qdisc show dev eth2
qdisc pfifo_fast 0: root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1

4 References