From owner-freebsd-fs@FreeBSD.ORG Mon Sep 8 09:10:54 2008 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC691106564A for ; Mon, 8 Sep 2008 09:10:54 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA10.westchester.pa.mail.comcast.net (qmta10.westchester.pa.mail.comcast.net [76.96.62.17]) by mx1.freebsd.org (Postfix) with ESMTP id 72EFB8FC16 for ; Mon, 8 Sep 2008 09:10:54 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA01.westchester.pa.mail.comcast.net ([76.96.62.11]) by QMTA10.westchester.pa.mail.comcast.net with comcast id C99M1a00C0EZKEL5A9AtTQ; Mon, 08 Sep 2008 09:10:53 +0000 Received: from koitsu.dyndns.org ([67.180.253.227]) by OMTA01.westchester.pa.mail.comcast.net with comcast id C9As1a0094v8bD73M9As0F; Mon, 08 Sep 2008 09:10:53 +0000 X-Authority-Analysis: v=1.0 c=1 a=_xSQw29cvt0A:10 a=mtup3TuceYcA:10 a=QycZ5dHgAAAA:8 a=E6XkfY6GvsLPn7CQ8QAA:9 a=056YzYvocAdRLlX4QHUA:7 a=Ib-uEk1cSQ-Z7Ijpw3IxwAZ1CXUA:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id 238AC17B84F; Mon, 8 Sep 2008 02:10:52 -0700 (PDT) Date: Mon, 8 Sep 2008 02:10:52 -0700 From: Jeremy Chadwick To: Dmitry Morozovsky Message-ID: <20080908091052.GA63182@icarus.home.lan> References: <20080907220104.GA26094@icarus.home.lan> <20080907233637.GA51889@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-fs@freebsd.org, Pawel Jakub Dawidek Subject: Re: ZFS filesystem: export for more than one subnet X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2008 09:10:54 -0000 On Mon, Sep 08, 2008 at 11:21:48AM +0400, Dmitry Morozovsky wrote: > On Sun, 7 Sep 2008, Jeremy Chadwick wrote: > JC> That said, what happens if you edit /etc/zfs/exports by hand, then run > JC> "zfs list -o sharenfs"? Does it show the changes you put in place? If > JC> so, then great -- it means there's two ways a person can edit the > JC> NFS-exported ZFS shares (by editing the file directly, or using "zfs"). > > Nope, ZFS does not track /etc/zfs/export, hence "Do not edit!" comment in it. Understood. Then using "zfs" is the only option. > JC> If not (e.g. mountd rejects it, or only the first network is used), then > JC> this would indicate a problem with the exports file syntax / problem > JC> with mountd, and not with ZFS. > > It is of course FreeBSD' mountd problem (more than it does not understand CIDR > slashed notation): > > marck@beaver:~# cat /etc/zfs/exports > # !!! DO NOT EDIT THIS FILE MANUALLY !!! > > /FreeBSD -ro -alldirs -network 195.54.192.0 -mask 255.255.255.192 > 255.255.255.192 > marck@beaver:~# zfs get sharenfs bv/FreeBSD > NAME PROPERTY VALUE SOURCE > bv/FreeBSD sharenfs -ro -alldirs -network 195.54.192.0 -mask 255.255.255.192 local > marck@beaver:~# zfs set sharenfs="ro,alldirs,network=195.54.192.0/26,192.168.39.0/24" bv/FreeBSD > marck@beaver:~# zfs get sharenfs bv/FreeBSD > NAME PROPERTY VALUE SOURCE > bv/FreeBSD sharenfs ro,alldirs,network=195.54.192.0/26,192.168.39.0/24 local > > Sep 8 11:18:18 beaver mountd[25992]: can't get address info for host 192.168.39.0/24 > Sep 8 11:18:18 beaver mountd[25992]: bad host 192.168.39.0/24, skipping > Sep 8 11:18:18 beaver mountd[25992]: network/host conflict > Sep 8 11:18:18 beaver mountd[25992]: bad exports list line /FreeBSD -ro -alldirs -network It does support CIDR, and the output mountd gave you even shows that it does (look closely at what "bad host" it's giving you -- that isn't the first host in the exports list!). You changed the syntax of what I gave you as an example. Look closely: # zfs set sharenfs="ro,network=aaa/xx,network=bbb/yy,network=ccc/zz" some_fs Here's what you typed in: # zfs set sharenfs="ro,alldirs,network=195.54.192.0/26,192.168.39.0/24" bv/FreeBSD -- | 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 |