The magic of ZFS and NFS (2nd try)

Rick Macklem rmacklem at uoguelph.ca
Fri Feb 27 23:02:31 UTC 2015


Christian Baer wrote:
> Martin Simmons wrote:
> 
> > According to exports(5), that reduces it to zero:
> > The third form has the string ``V4:'' followed by a single absolute
> > path
> > name,
> > to specify the NFSv4 tree root.  This line does not export any file
> > system,
> >                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > but simply marks where the root of the server's directory tree is
> > for
> > NFSv4
> > clients.  The exported file systems for NFSv4 are specified via the
> > other
> > lines in the exports file in the same way as for NFSv2 and NFSv3.
> 
> I see the part in the manpage you are referring to. The way nfs
> reacts
> doesn't seem to be that way though. I have changed the contents of
> /etc/exports to
> 
> /usr/archive/Shared    -alldirs -network 192.168.100/24
> 
You need both lines for an NFSv4 mount to work. For example:
V4: /usr/archive/Shared -network 192.168.100/24
/usr/archive/Shared    -alldirs -network 192.168.100/24

Then the client mount command would look like:
mount -t nfs -o nfsv4 <server>:/ /mnt
- Note that if the V4: line specifies /usr/archive/Shared as its root,
  then the client mounts that as "/".

If you want to mount the same dir as NFSv3, the mount would look like:
mount -t nfs -o nfsv3 <server>:/usr/archive/Shared /mnt

> I still cannot mount that share.
> 
> The V4: at the beginning of the line did not change anything I could
> notice.
It enables NFSv4 and tells the server where the client mount's "/" is.

> If I let the path point to a ZFS file system, I get permission
> denied, when
> it points to a path on UFS, it works fine.
> 
> Die directories in question have the correct owner and group. Is
> there some
> way that ZFS may have a different setting for this?
> 
Not that I am aware, but I am not a ZFS guy, rick

> Kind regards,
> Christian
> 
> _______________________________________________
> freebsd-fs at freebsd.org mailing list
> http://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