Linux : nfs4_discover_server_trunking unhandled error -512. Exiting with error EIO

By | February 8, 2020

Experiencing the following behavior with RHEL/CentOS 7.2 and NFS?

NFS folder mount hang and the following output can be observed in logs and dmesg :

NFS: state manager: lease expired failed on NFSv4 server 0.0.0.0 with error 10082
NFS: nfs4_discover_server_trunking unhandled error -512. Exiting with error EIO
nfsd: last server has exited, flushing export cache
NFSD: starting 90-second grace period (net ffffffff81a26d80)

In this particular case, it turned out to be some sort of bug in the NFS software stack. The version of software running on the system were :

libnfsidmap-0.25-19.el7.x86_64
nfs-utils-1.3.0-0.65.el7.x86_64
nfs4-acl-tools-0.3.3-20.el7.x86_64

To work around this issue, I had to downgrade to an inferior version. In order to proceed, first uninstall the current packages :

yum remove libnfsidmap nfs-utils nfs4-acl-tools

And install the following :

yum install libnfsidmap-0.25-12.el7.x86_64 nfs-utils-1.3.0-0.21.el7_2.1.x86_64 nfs4-acl-tools-0.3.3-14.el7.x86_64

NOTE : This was attempted with both of these kernel versions :

kernel-3.10.0-327.el7.x86_64
kernel-3.10.0-327.36.2.el7.x86_64