misc/131995: Failure to mount NFSv4 server

Jeff Garzik jgarzik at pobox.com
Sun Feb 22 21:20:02 PST 2009


>Number:         131995
>Category:       misc
>Synopsis:       Failure to mount NFSv4 server
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 23 05:20:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Jeff Garzik
>Release:        7.1
>Organization:
Red Hat, Inc.
>Environment:
FreeBSD freebsd71.yyz.us 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan  1 08:58:24 UTC 2009     root at driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
I am the author of an NFSv4 userland server.  Linux and OpenSolaris NFSv4 clients successfully talk to my server, but FreeBSD 7.1 does not.

Problems observed:

1) The "-4" argument to mount_nfs does not automatically set the TCP (-T) and port 2049 (-o port=2049) options.  These are the defaults for NFSv4.  Quoting RFC3530:

   The registered port 2049 [RFC3232] for the NFS protocol
   should be the default configuration.  Using the registered port for
   NFS services means the NFS client will not need to use the RPC
   binding protocols as described in [RFC1833]

2) As quoted above in RFC3530, rpc bind/mount protocols are not needed for NFSv4, and should not be required to mount an NFSv4 filesystem.

3) When supplying the '-4', '-T' and -'o port=2049' options, FreeBSD's NFSv4 client successfully contacts my server... and tries to speak NFSv3!  RPC header from
     mount_nfs -4 -T -o port=2049 bd:/ /bd
yields
          RPC version: 2
          RPC program: 100003
          RPC program version: 3

FreeBSD 7.1 also has problems mounting a known-working-with-multiple-clients Linux NFSv4 server, but I'll leave that for a separate bug report.

>How-To-Repeat:
1. Install Linux
2. Install my NFSv4 server from git repository: http://linux.yyz.us/projects/nfsv4.html
3. Run my NFSv4 server under Linux (sorry, no fBSD support... yet).
4. Run tcpdump on client or server, watching the NFS and RPC traffic
5. Attempt to mount Linux NFSv4 userland server from FreeBSD NFSv4 client


>Fix:
1. Directly connect to port 2049 over TCP by default, for NFSv4.  No need to consult portmapper, rpcbind, mountd, etc.

2. Actually speak NFSv4 RPC protocol, once connected to an NFSv4 server (see problem #3, above).



>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list