From owner-freebsd-stable@FreeBSD.ORG Wed Jan 5 13:13:21 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 6967D1065693 for ; Wed, 5 Jan 2011 13:13:21 +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 271138FC19 for ; Wed, 5 Jan 2011 13:13:20 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEALL8I02DaFvO/2dsb2JhbACDeKEisQGOE4Ehgzd0BIRohiI X-IronPort-AV: E=Sophos;i="4.60,278,1291611600"; d="scan'208";a="104327835" 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:13:20 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 2DF81B41AF; Wed, 5 Jan 2011 08:13:20 -0500 (EST) Date: Wed, 5 Jan 2011 08:13:20 -0500 (EST) From: Rick Macklem To: Marek Salwerowicz Message-ID: <1103592228.118408.1294233200171.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.200] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE8 (Win)/6.0.10_GA_2692) Cc: freebsd-stable@freebsd.org, Maciej Milewski , Jean-Yves Avenard 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:13:21 -0000 > > You can also do the following: > > For /etc/exports > > V4: / > > /usr/home -maproot=root -network 192.168.183.0 -mask 255.255.255.0 > > Not in my configuration - '/' and '/usr' are different partitions > (both UFS) > Hmm. Since entire volumes are exported for NFSv4, I can't remember if exporting a subtree of the volume works (I think it does, but??). However, I do know that if you change the /etc/exports for the above to: (note I also moved the V4: line to the end because at one time it was required to be at the end and I can't remember if that restriction is still enforced. Always check /var/log/messages after starting mountd with a modified /etc/exports and look for any messages related to problems with /etc/exports.) In other words, export the volume's mount point and put the V4: line at the end are changes that "might be required?". If you take a look at mountd.c, you'll understand why I have trouble remembering exactly what works and what doesn't.:-) /usr -maproot=root -network 192.168.183.0 -mask 255.255.255.0 V4: / then for the above situation: # mount -t nfs -o nfsv4 server:/ /mnt - will fail because "/" isn't exported however # mount -t nfs -o nfsv4 server:/usr /mnt - should work. If it doesn't work, it is not because /etc/exports are wrong. A small number of NFSv4 ops are allowed on non-exported UFS partitions so that "mount" can traverse the tree down to the mount point, but that mount point must be exported. When I did this I did not realize that ZFS did its own exporting and, as such, traveral of non-exported ZFS volumes doesn't work, because ZFS doesn't allow any operations on the non-exported volumes to work. At some point, there needs to be a debate w.r.t. inconsistent behaviour. The easiest fix is to disable the capability of traversal of non-exported UFS volumes. The downside of this is that it is harder to configure the single (sub)tree on the server that is needed for NFSv4. Have fun with it, rick