From owner-freebsd-stable@FreeBSD.ORG Wed Jan 5 01:41:57 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 677BB106564A for ; Wed, 5 Jan 2011 01:41:57 +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 2763E8FC08 for ; Wed, 5 Jan 2011 01:41:56 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAFxOI02DaFvO/2dsb2JhbACDd6EprluOGYEggzZ0BIRohh+GEg X-IronPort-AV: E=Sophos;i="4.60,275,1291611600"; d="scan'208";a="104293329" 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:41:56 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 3D00FB3F2A; Tue, 4 Jan 2011 20:41:56 -0500 (EST) Date: Tue, 4 Jan 2011 20:41:56 -0500 (EST) From: Rick Macklem To: Freddie Cash Message-ID: <1248031564.112426.1294191716178.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [172.17.91.202] 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 , 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:41:57 -0000 > On Tue, Jan 4, 2011 at 3:42 AM, Jean-Yves Avenard > wrote: > > On 4 January 2011 10:50, Rick Macklem wrote: > > After reading this thread, I tried NFSv4 today.. > > > > Whenever I tried to mount from a linux client, I get: > > =C2=A0mount -o vers=3D4 server4:/pool/backup/sites/m /mnt > > NFS compound failed for server server4: error 7 (RPC: Authentication > > error) > > NFS compound failed for server server4: error 7 (RPC: Authentication > > error) > > NFS compound failed for server server4: error 7 (RPC: Authentication > > error) > > NFS compound failed for server server4: error 7 (RPC: Authentication > > error) > > NFS compound failed for server server4: error 7 (RPC: Authentication > > error) > > NFS compound failed for server server4: error 7 (RPC: Authentication > > error) > > nfs mount: mount: /mnt: Permission denied > > > > with NFS v3 it mounts just fine > > > > any ideas? >=20 > NFSv4 mounts are relative to the filesystem being exported. NFSv3 > mounts are absolute paths on the server. >=20 Well, they are actually relative to where the NFSv4 root is specified in the V4: line. For ZFS, the entire server file tree from that point down must be exported (each volume requiring at least one line in /etc/expo= rts). For UFS, it can traverse down to the exported volume, but only by specifying the path to the exported volume in the mount command. (This may someday change, since it is questionable that it should have different behaviour than ZFS and could be argued a security risk.) Since there can only be one root point specified by the "V4:" line, you can get to multiple volumes, but they must be within the subtree. For example, if the following three directories are roots of mounted volumes on the server: /usr /usr/home /usr/sub1 and the exports file looks like: /usr -maproot=3Droot -network 131.104.48.0 -mask 255.255.255.0 /usr/home -maproot=3Droot -network 131.104.48.0 -mask 255.255.255.0 /usr/sub1 -maproot=3Droot -network 131.104.48.0 -mask 255.255.255.0 V4: /usr Then anywhere within /usr, /usr/home and /usr/sub1 can be mounted, but the client specifies a path relative to /usr, such as: # mount -t nfs -o nfsv4 server:/home /home to mount /usr/home on the client. By using: V4: / you can make the client mount paths look like what would be done for NFSv3, but if the "/" file system isn't UFS, you must export it as well as all the others or it can't be traversed. rick > IOW, if you export /pool/backup/sites/m/ on the server, then the mount > line on the client is just: > mount -o vers=3D4 server4:/ /mnt >=20 > If you export / on the server, then the mount line on the client would > be: > mount -o vers=3D4 server4:/pool/backup/sites/m/ /mnt >=20 > This tripped me up when I tried converting my NFSv3 setup at home to > NFSv4. >=20 Just trying to clarify what was good useful information, rick