From owner-freebsd-stable@FreeBSD.ORG Wed Jan 5 01:09:36 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 D0C24106566B for ; Wed, 5 Jan 2011 01:09:36 +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 905BF8FC08 for ; Wed, 5 Jan 2011 01:09:36 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAFxOI02DaFvO/2dsb2JhbACDd6EprluOGYEggzZ0BIRohh8 X-IronPort-AV: E=Sophos;i="4.60,275,1291611600"; d="scan'208";a="104291481" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 04 Jan 2011 20:09:35 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id BFBCAB3F23; Tue, 4 Jan 2011 20:09:35 -0500 (EST) Date: Tue, 4 Jan 2011 20:09:35 -0500 (EST) From: Rick Macklem To: Marek Salwerowicz Message-ID: <241056373.111669.1294189775780.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.201] 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 01:09:36 -0000 > Hi, > > so it slowly starts working: > > nfs4-server# cat /etc/exports > V4: / > / -maproot=root -network 192.168.183.0 -mask 255.255.255.0 > nfs4-server# > > nfs4-server# ps aux | grep mountd > root 857 0.0 0.6 3348 1520 ?? Is 11:53PM 0:00.01 > /usr/sbin/mountd -e -r > nfs4-server# ps aux | grep nfsd > root 1303 0.0 0.5 3288 1324 ?? Is 12:04AM 0:00.03 nfsd: master > (nfsd) > root 1304 0.0 0.5 3288 1260 ?? S 12:04AM 0:00.02 nfsd: server > (nfsd) > nfs4-server# > > > I am able to mount the root '/' from nfs4-server: > > nfs4-client# mount_nfs -o nfsv4 192.168.183.131:/ /marek_nfs4/ > nfs4-client# ls /marek_nfs4/ > .cshrc cdrom home proc usr > .profile compat lib rescue var > .snap dev libexec root > COPYRIGHT dist media sbin > bin entropy mnt sys > boot etc plik tmp > nfs4-client# mount > /dev/ad0s1a on / (ufs, local) > devfs on /dev (devfs, local, multilabel) > /dev/ad0s1e on /tmp (ufs, local, soft-updates) > /dev/ad0s1f on /usr (ufs, local, soft-updates) > /dev/ad0s1d on /var (ufs, local, soft-updates) > 192.168.183.131:/ on /marek_nfs4 (newnfs) > nfs4-client# > > it works also on different partition: > > nfs4-server# cat /etc/exports > V4: /usr > /usr/home -maproot=root -network 192.168.183.0 -mask 255.255.255.0 > nfs4-server# > > > nfs4-client# mount_nfs -o nfsv4 192.168.183.131:/home /marek_nfs4/ > nfs4-client# ls /marek_nfs4/ > marek > nfs4-client# > 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.