Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Feb 2009 05:17:40 GMT
From:      Jeff Garzik <jgarzik@pobox.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/131995: Failure to mount NFSv4 server
Message-ID:  <200902230517.n1N5HeO9019439@www.freebsd.org>
Resent-Message-ID: <200902230520.n1N5K11O058653@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902230517.n1N5HeO9019439>