Documentation and debugging for NFSv4

Greg Veldman freebsd at
Fri May 22 16:29:44 UTC 2020

On Fri, May 22, 2020 at 03:15:01PM +0100, Norman Gray wrote:
> I'm having difficulty finding consistent documentation and debugging 
> tools for NFSv4.  Is there some handbook-like source that I'm missing?  
> Or some layer of documentation for configuration or debugging that I've 
> failed to find?
> I've never had major problems with NFS and the associated RPC services, 
> but I currently find myself in a situation where some combination of v4 
> exports from FreeBSD servers (11.3 and 12.1) and heterogeneous Linux 
> clients is behaving in a rather inconsistent way (in a context where I 
> can't just reboot everything in sight, which often sorts out NFS 
> problems...), and I'm having great difficulty diagnosing the current 
> service status: is server A offering what I think it is? is client B 
> asking for what I think it is?  Normally some combination of netstat and 
> tcpdump would make some headway, but SunRPC is blacker magic than that.

What symptoms are you seeing?  Does it mount at all?  If not
does it give you an error message?  Does it mount but is it
not usable?  Does NFSv3 work or is any version broken?

FYI NFS problems in general usually come down to either firewall
settings or MTU mismatches.  If there are any firewalls between
the client or server you may wish to temporarily disable them to
test (or add an allow all rule).  Also check that the MTU is
the same for the whole path.

NFSv4 introduces a couple of new things that can also be issues.
The first is the v4 tree root, and the second is the concept
of ID mapping to avoid the need to sync UID/GID numbers.  If
you can make it work with v3 but not v4, I'd start looking there.
Specifically make sure you have a "V4" line in /etc/exports on
the FreeBSD server, and make sure nfsuserd is running and
configured with the same domain name as in /etc/idmapd.conf on
the Linux side (and make sure rpc.idmapd is running on Linux).

Greg Veldman
freebsd at

More information about the freebsd-questions mailing list