The magic of ZFS and NFS (2nd try)

Freddie Cash fjwcash at gmail.com
Mon Feb 23 16:27:28 UTC 2015


On Mon, Feb 23, 2015 at 4:30 AM, Christian Baer <
christian.baer at uni-dortmund.de> wrote:

> Rainer Duffner wrote:
>
> > These lines get written into /etc/zfs/exports
> >
> > I like it that way because if a filesystem is destroyed, I don’t have to
> > remember removing it from /etc/exports.
> >
> > I also admit I’m heavily influenced by Solaris on this particular
> setting…
>
> I didn't come from Solaris and I wasn't a big fan of it during my time at
> university. It wasn't the really a problem with the OS itself but with the
> userland which really sucked rocks at the time. We are talking SunOS 5.8
> here.
>
> I am guessing that in the future, ZFS will be far more important and UFS
> will become more and more exotic. Then it would be fine to config
> everything
> the ZFS-way. But currently, it seems pretty dumb to have to go through a
> case list like:
>
>
​You don't.  All NFS-related configuration stuff goes into /etc/exports by
default. Including ZFS stuff.  Just treat ZFS like any other filesystem
when it comes to NFS, and configure it just like any other filesystem.

If, and only if, you want to play with the ZFS property "sharenfs", then
you can.  You aren't required to (and probably shouldn't as the syntax will
be different for every OS and may cause issues with replication to other
pools).  If you do, then anything you put into that property will be
automatically copied into /etc/zfs/exports.

You should never be manually editing /etc/zfs/exports, as any manual
changes you make will be lost the next time you edit any "sharenfs"
property on any ZFS filesystem.

-- 
Freddie Cash
fjwcash at gmail.com


More information about the freebsd-fs mailing list