A new feature, available for both 2.4 and 2.5 kernels but not yet integrated into the mainstream kernel at the time of this writing, is NFS over TCP. Using TCP has a distinct advantage and a distinct disadvantage over UDP. The advantage is that it works far better than UDP on lossy networks. When using TCP, a single dropped packet can be retransmitted, without the retransmission of the entire RPC request, resulting in better performance on lossy networks. In addition, TCP will handle network speed differences better than UDP, due to the underlying flow control at the network level.
Mounts inside NFS export. Crossmounts.
nohide, clients will only see the directory itself, not the contents of any subdirectories that are themselves mounted. nohide but specifically allows clients to navigate and access filesystems that are mounted within the exported directory. It ensures that the NFS client can “see through” the mount point and access the filesystems mounted beneath it. /srv * (sync,no_subtree_check,crossmnt,nohide)
On server /etc/exports:
On client /etc/fstab:
homeserver:/srv/downloads /srv/downloads nfs4 _netdev,x-systemd.after=network-online.target,x-systemd.device-timeout=0,noatime,nodiratime,nfsvers=4.2 0 0mountstats --nfs
Setup 3 identical VMs with Debian 11. On one of machine entering into NFGS directory is insanely slow.
/boot/config-5.10.0-33-amd64 5.10.226-1cat /proc/sys/sunrpc/nfs_debug 0x0000/boot/config-5.10.0-18-amd645.10.140-1cat /proc/sys/sunrpc/nfs_debug 0xFFFFReason - debug enabled:
rpcdebug -m nfs -s all
Disable it:
rpcdebug -m nfs -c all