The magic of ZFS and NFS (2nd try)
Christian Baer
christian.baer at uni-dortmund.de
Sat Feb 21 17:40:08 UTC 2015
Rainer Duffner wrote:
> You must use the syntax of exports(5) also with zfs set sharenfs=
> AFAIK, you shouldn’t use /etc/exports to do zfs exports but the above
> command
But why shouldn't I use /etc/exports? I have read people writing this (don't
use /etc/exports) in forums when searching for answers, however the current
manpage for zfs says this:
sharenfs=on | off | opts
Controls whether the file system is shared via NFS, and what options
are used. A file system with a sharenfs property of off is managed
the traditional way via exports(5). Otherwise, the file system is
automatically shared and unshared with the "zfs share" and "zfs
unshare" commands. If the property is set to on no NFS export options
are used. Otherwise, NFS export options are equivalent to the con-
tents of this property. The export options may be comma-separated.
See exports(5) for a list of valid options.
To me this looks like I can choose whether I want to use the exports file
or if I wish to set the sharenfs flag. I don't really *that* much, although
I don't really think this is something that a file system should decide, but
should be set from the NFS server.
> If your hosts you export to are in your nfs-server’s /etc/hosts, you will
> need to use the names they resolve to also in the exports-statement.
> (Though that might be wrong - it was the case with Solaris, though).
I used IPs. See other post.
> uids/gids should match, too, of course.
They do. There aren't so many users so it's not too hard to keep up with
that. :-) But I just checked again to make sure.
Regards,
Chris
More information about the freebsd-fs
mailing list