NFSv4 - how to set up at FreeBSD 8.1 ?
rmacklem at uoguelph.ca
Wed Jan 5 13:57:13 UTC 2011
> On 5 January 2011 12:09, Rick Macklem <rmacklem at uoguelph.ca> wrote:
> > You can also do the following:
> > For /etc/exports
> > V4: /
> > /usr/home -maproot=root -network 192.168.183.0 -mask 255.255.255.0
> > Then mount:
> > # mount_nfs -o nfsv4 192.168.183.131:/usr/home /marek_nfs4/
> > (But only if the file system for "/" is ufs and not zfs and,
> > admittedly
> > there was a debate that has to be continued someday that might make
> > it
> > necessary to export "/" as well for ufs like zfs requires.)
> > rick
> > ps: And some NFSv4 clients can cross server mount points, unlike
> > NFSv2, 3.
> I've done that (exporting V4: /)
> but then when I mount a sub zfs filesystem (e.g. /pool/backup/sites/m)
> then it appears empty on the client.
> If I export /pool/backup/sites/m , then I see the content of the
> Most of the sub-directory in /pool are actually zfs file system
> It is something I expected with NFSv3 .. but not with nfs v4.
Yes, to access the file volumes via any version of NFS, they need to
be exported. (I don't think it would make sense to allow access to all
of the server's data without limitations for NFSv4?)
What is different (and makes it confusing for folks familiar with NFSv2,3)
is the fact that it is a single "mount tree" for NFSv4 that has to be rooted
Solaris10 - always roots it at "/" but somehow works around the ZFS case,
so any exported share can be mounted with the same path used
Linux - Last I looked (which was a couple of years ago), it exported a
single volume for NFSv4 and the rest of the server's volumes
could only be accessed via NFSv2,3. (I don't know if they've
changed this yet?)
So, I chose to allow a little more flexibility than Solaris10 and allow
/etc/exports to set the location of the "mount root". I didn't anticipate
the "glitch" that ZFS introduced (where all ZFS volumes in the mount path
must be exported for mount to work) because it does its own exporting.
(Obviously, the glitch/inconsistency needs to be resolved at some point.)
More information about the freebsd-stable