Add NFSv3 tree root to mountd

Rick Macklem rmacklem at uoguelph.ca
Sat Apr 23 11:51:47 UTC 2016


Brian Mueller wrote:
> Similar to mountd's ability to specify the NFSv4 tree root via the V4: line
> in the exports file, I would like to add the ability to specify a NFSv3 tree
> root.  The goal to have the same exported path for both the V3 and V4.  If
> you have exports file like the following:
> 
> /foo/bar
> V3: /foo/bar
> V4: /foo/bar
> 
> NFS clients would mount /foo/bar by running
> 
> mount -t nfs -o ver=3 server:/ /mnt/v3
> mount -t nfs -o ver=4 server:/ /mnt/v4
> 
> Without the change, the NFS client would need to specify different paths for
> v3 and v4
> 
> mount -t nfs -o ver=3 server:/foo/bar /mnt/v3
> mount -t nfs -o ver=4 server:/ /mnt/v4
> 
> Feedback appreciated.  If there aren't any objections with incorporating this
> change into FreeBSD, I will start working on the changes to mountd.
> 
Basically I assume you are planning on using the V3 "/foo/bar" as a prefix that
is prepended to the path when a Mount RPC request arrives. I, personally, don't
see a problem with this, assuming that things still work the same when the "V3"
line isn't in /etc/exports.
A couple of comments:
- Since NFSv3 doesn't follow server mounts, the results of a V3 mount will still
  be different than NFSv4 unless there is only one file system under "/foo/bar".
  --> Maybe adding this will just add to the confusion already present w.r.t. the
      differences between NFSv3 and NFSv4? (Falsely giving the impression that
      adding the "V3" line somehow makes them the same?)
- In case you haven't looked at it, mountd.c is a beast. You'll have fun adding
  this change to it.

rick

> Brian
> 
> Brian Mueller
> Panasas Inc.
> _______________________________________________
> freebsd-fs at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"
> 


More information about the freebsd-fs mailing list