From owner-freebsd-stable@FreeBSD.ORG Wed Jan 5 13:57:13 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49162106566C for ; Wed, 5 Jan 2011 13:57:13 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 0923E8FC17 for ; Wed, 5 Jan 2011 13:57:12 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAEkHJE2DaFvO/2dsb2JhbACDeKEjsQSOE4Ehgzd0BIRohiI X-IronPort-AV: E=Sophos;i="4.60,278,1291611600"; d="scan'208";a="104331360" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 05 Jan 2011 08:57:11 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 3A6F6B3F3B; Wed, 5 Jan 2011 08:57:12 -0500 (EST) Date: Wed, 5 Jan 2011 08:57:12 -0500 (EST) From: Rick Macklem To: Jean-Yves Avenard Message-ID: <641784536.120801.1294235832169.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.199] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE8 (Win)/6.0.10_GA_2692) Cc: Marek Salwerowicz , freebsd-stable@freebsd.org, Maciej Milewski Subject: Re: NFSv4 - how to set up at FreeBSD 8.1 ? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jan 2011 13:57:13 -0000 > Hi > > On 5 January 2011 12:09, Rick Macklem wrote: > > > You can also do the following: > > For /etc/exports > > V4: / > > /usr/home -maproot=root -network 192.168.183.0 -mask 255.255.255.0 > > > > Then mount: > > # mount_nfs -o nfsv4 192.168.183.131:/usr/home /marek_nfs4/ > > (But only if the file system for "/" is ufs and not zfs and, > > admittedly > > there was a debate that has to be continued someday that might make > > it > > necessary to export "/" as well for ufs like zfs requires.) > > > > rick > > ps: And some NFSv4 clients can cross server mount points, unlike > > NFSv2, 3. > > > > I've done that (exporting V4: /) > > but then when I mount a sub zfs filesystem (e.g. /pool/backup/sites/m) > then it appears empty on the client. > > If I export /pool/backup/sites/m , then I see the content of the > directory. > > Most of the sub-directory in /pool are actually zfs file system > mounted. > > It is something I expected with NFSv3 .. but not with nfs v4. > Yes, to access the file volumes via any version of NFS, they need to be exported. (I don't think it would make sense to allow access to all of the server's data without limitations for NFSv4?) What is different (and makes it confusing for folks familiar with NFSv2,3) is the fact that it is a single "mount tree" for NFSv4 that has to be rooted somewhere. Solaris10 - always roots it at "/" but somehow works around the ZFS case, so any exported share can be mounted with the same path used by NFSv2,3. Linux - Last I looked (which was a couple of years ago), it exported a single volume for NFSv4 and the rest of the server's volumes could only be accessed via NFSv2,3. (I don't know if they've changed this yet?) So, I chose to allow a little more flexibility than Solaris10 and allow /etc/exports to set the location of the "mount root". I didn't anticipate the "glitch" that ZFS introduced (where all ZFS volumes in the mount path must be exported for mount to work) because it does its own exporting. (Obviously, the glitch/inconsistency needs to be resolved at some point.) rick