ZFS filesystem: export for more than one subnet
koitsu at FreeBSD.org
Sun Sep 7 22:17:07 UTC 2008
On Sun, Sep 07, 2008 at 06:39:11PM +0400, Dmitry Morozovsky wrote:
> Dear colleagues,
> is there any way so one can export ZFS file system to more than one net?
> in classic NFS I would use more than one line in /etc/exports -- how can I
> express such behaviour in zfs properties?
Didn't you inadvertently ask this same question 6 months ago? :-)
I believe if 'sharenfs=off' (the default), you can manage NFS mounts via
/etc/exports like normal. Ideally, you should (?) be able to use
multiple "-network xxx/netmask" entries on the same export line.
If you absolutely must do it via the 'zfs' command, according to pjd@'s
EuroBSDCon presentation, this should work:
# /etc/rc.d/mountd start
# zfs set sharenfs="ro,network=x.x.x.x,mask=y.y.y.y" some_fs
# /etc/rc.d/mountd reload
/etc/rc.d/mountd is already configured to read /etc/exports and
/etc/zfs/exports, so all you should have to do is mountd_enable="yes" in
You can also use CIDR syntax in network=xx/yy, which should decrease the
pjd@'s paper is here -- see page 18, "NFS is easy":
However, I'd advocate you consider running pf on the machine running
mountd instead, and use an actual firewall to block who can talk to
mountd on the machine exporting the shares.
| Jeremy Chadwick jdc at parodius.com |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |
More information about the freebsd-fs