Re: [nfsv4] FYI: Readdir not allowed on NFS pseudo root

"Haynes, Tom" <thomas@netapp.com> Mon, 17 May 2004 21:16 UTC

Received: from optimus.ietf.org (iesg.org [132.151.1.19]) by ietf.org (8.9.1a/8.9.1a) with ESMTP id RAA29166 for <nfsv4-archive@odin.ietf.org>; Mon, 17 May 2004 17:16:15 -0400 (EDT)
Received: from localhost.localdomain ([127.0.0.1] helo=www1.ietf.org) by optimus.ietf.org with esmtp (Exim 4.20) id 1BPoVW-0000LI-Gi for nfsv4-archive@odin.ietf.org; Mon, 17 May 2004 16:14:44 -0400
Received: (from exim@localhost) by www1.ietf.org (8.12.8/8.12.8/Submit) id i4HKEgY7001293 for nfsv4-archive@odin.ietf.org; Mon, 17 May 2004 16:14:42 -0400
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org) by optimus.ietf.org with esmtp (Exim 4.20) id 1BPo7r-0008Hq-C5 for nfsv4-web-archive@optimus.ietf.org; Mon, 17 May 2004 15:50:15 -0400
Received: from ietf-mx (ietf-mx.ietf.org [132.151.6.1]) by ietf.org (8.9.1a/8.9.1a) with ESMTP id PAA19779 for <nfsv4-web-archive@ietf.org>; Mon, 17 May 2004 15:50:13 -0400 (EDT)
Received: from ietf-mx.ietf.org ([132.151.6.1] helo=ietf-mx) by ietf-mx with esmtp (Exim 4.32) id 1BPo7p-0000HL-NN for nfsv4-web-archive@ietf.org; Mon, 17 May 2004 15:50:13 -0400
Received: from exim by ietf-mx with spam-scanned (Exim 4.12) id 1BPo6X-0007a0-00 for nfsv4-web-archive@ietf.org; Mon, 17 May 2004 15:48:53 -0400
Received: from optimus.ietf.org ([132.151.1.19]) by ietf-mx with esmtp (Exim 4.12) id 1BPo5D-00077n-00 for nfsv4-web-archive@ietf.org; Mon, 17 May 2004 15:47:32 -0400
Received: from localhost.localdomain ([127.0.0.1] helo=www1.ietf.org) by optimus.ietf.org with esmtp (Exim 4.20) id 1BPnqE-0002d9-II; Mon, 17 May 2004 15:32:02 -0400
Received: from odin.ietf.org ([132.151.1.176] helo=ietf.org) by optimus.ietf.org with esmtp (Exim 4.20) id 1BPnVK-00025b-5B for nfsv4@optimus.ietf.org; Mon, 17 May 2004 15:10:26 -0400
Received: from ietf-mx (ietf-mx.ietf.org [132.151.6.1]) by ietf.org (8.9.1a/8.9.1a) with ESMTP id PAA15869 for <nfsv4@ietf.org>; Mon, 17 May 2004 15:10:23 -0400 (EDT)
Received: from ietf-mx.ietf.org ([132.151.6.1] helo=ietf-mx) by ietf-mx with esmtp (Exim 4.32) id 1BPnVH-0001ZA-4Q for nfsv4@ietf.org; Mon, 17 May 2004 15:10:23 -0400
Received: from exim by ietf-mx with spam-scanned (Exim 4.12) id 1BPnUH-0001Cp-00 for nfsv4@ietf.org; Mon, 17 May 2004 15:09:22 -0400
Received: from mx01.netapp.com ([198.95.226.53]) by ietf-mx with esmtp (Exim 4.12) id 1BPnTN-0000Wu-00; Mon, 17 May 2004 15:08:25 -0400
Received: from hawk.corp.netapp.com (hawk [10.57.156.122]) by mx01.netapp.com (8.12.10/8.12.10/NTAP-1.4) with ESMTP id i4HJ7tZh010149; Mon, 17 May 2004 12:07:55 -0700 (PDT)
Received: from vineland.eng.netapp.com (vineland-fe.eng.netapp.com [10.56.10.196]) by hawk.corp.netapp.com (8.12.9/8.12.9/NTAP-1.5) with ESMTP id i4HJ7sh9008695; Mon, 17 May 2004 12:07:54 -0700 (PDT)
Received: (from thomas@localhost) by vineland.eng.netapp.com (8.11.7p1+Sun/8.11.6) id i4HJ7sv00437; Mon, 17 May 2004 12:07:54 -0700 (PDT)
From: "Haynes, Tom" <thomas@netapp.com>
Message-Id: <200405171907.i4HJ7sv00437@vineland.eng.netapp.com>
Subject: Re: [nfsv4] FYI: Readdir not allowed on NFS pseudo root
In-Reply-To: <OF4DEF69D8.7FFF9C9F-ON87256E97.00603C0C-88256E97.0061522A@us.ibm.com> from Stevan Steve Allen at "May 17, 4 10:43:05 am"
To: scallen@us.ibm.com
Cc: thomas@netapp.com, nfsv4@ietf.org, nfsv4-admin@ietf.org, rees@umich.edu
X-Mailer: ELM [version 2.4ME++ PL40 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Content-Transfer-Encoding: 7bit
Sender: nfsv4-admin@ietf.org
Errors-To: nfsv4-admin@ietf.org
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.0.12
Precedence: bulk
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=unsubscribe>
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
List-Post: <mailto:nfsv4@ietf.org>
List-Help: <mailto:nfsv4-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=subscribe>
List-Archive: <https://www1.ietf.org/mail-archive/working-groups/nfsv4/>
X-Original-Date: Mon, 17 May 2004 12:07:54 -0700 (PDT)
Date: Mon, 17 May 2004 12:07:54 -0700
X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on ietf-mx.ietf.org
X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.60
Content-Transfer-Encoding: 7bit
Content-Transfer-Encoding: 7bit

I was assuming that USER1 and USER2 were exportable.

You have some means of exporting objects in FS1.   In the example you
gave, that was:
USER1, USER2, and PROJECTS/PROD

You can take your list of exports, which I assume is in something
like /etc/exports, and construct your pseudo-fs:

                           /   (p)
                  / -------+-------------\
                FS1 (p)                  FS2 (p)
           /----+------\                  |
        USER1  USER2   PROJECTS (p)      HFS (p)
                           |              |
                           |             ETC
                           |
                           |
                          PROD2

Here I've stripped out the ones in FS1 which are real but your
server has no way to query: PROJECTS/PROD1 and PROJECTS/ETC.

The point is that you can weave together a name space out of the
set of exports presented for v3.



> Tom,  In your example, the NFS server has no way to query the kernel to 
> obtain {USER1, USER2, PROJECTS}.  The limit to the number of entries under 
> FS1 is Approx 0.5 trillion.
> 
> Thanks,
> Stevan C. Allen
> 
> "Haynes, Tom"  wrote:
> 
> Why can't you just stich together the parts which are available with
> pseudo entries?
> 
>                            /   (p)
>                   / -------+-------------\
>                 FS1 (p)                  FS2 (p)
>            /----+------\                  |
>         USER1  USER2   PROJECTS (p)      HFS (p)
>                            |              |
>                            |             ETC
>                            |
>                   /--------+-----\
>                PROD1 (p)  PROD2   ETC (p)
> 
> 
> We have a disjoint FS space as well, and our root is really pseudo:
> 
>                           / (p)
>                           |
>                          vol (p)
>                           |
>                  +--------+-----------+
>                  |        |           |
>                 vol0    vol1        smitty (p)
>                                       |
>                                     xavier
> 
> The point is that your pseudo-fs need not mimic the fs on your disks.
> It just needs to present a gateway to all of your entry points.  Also,
> even if a node corresponds to a physical directory, you do not need
> report the attributes of that directory entry.  I.e., fudge the results.
> 
> > I also suspect ACCESS is the only available READDIR response, and our 
> > design doc should be updated.
> > 
> > For NFSv3 we do not allow a mount on the flat fs root.  Mounting 
> siblings, 
> > in effect, creates "disconnected" tree structures described below. Mount 
> 
> > and lookup provided the server a starting point (i.e. USER1).
> > 
> > The problem is due to the mentioned kernel restriction.  Where the 
> server 
> > can not obtain all the parent dirs (USER1, USER2..) shown in the FSYS1 
> > sample below.
> > 
> > ---- FSYS1 ----
> > /USER1  <-v3 mountpoint
> >         |- PROJ
> >         |- SETUP
> >         '- ETC
> > 
> > /USER2  <-v3 mountpoint
> >         |- PROJ
> >         |- SETUP
> >         '- ETC
> > 
> > /PROJECTS
> >         |- PROD1
> >         |- PROD2  <-v3 mountpoint
> >         '- ETC
> > 
> > ---- FSYS2 ----
> > /HFS
> >         '- ETC  <-v3 mountpoint
> > 
> > Our current decision is to make the new v4 root to be the restrictive 
> flat 
> > fs root (this discussion).  Where '/HFS' represents crossing a mount 
> > point. 
> > 
> > The idea of returning an empty dir list for the v4 root is interesting, 
> if 
> > clients update their cached name space from lookups and mounts. 
> > 
> > 
> > Jim Rees Wrote:
> > 
> >   Seems like the server would return an "empty" response for READDIR
> >   on this special server.
> > 
> > But that would be wrong too.  That would imply the directory is empty. I
> > can imagine a client that would get very confused by this.  Suppose, for
> > example, the client caches directory contents after a successful 
> READDIR,
> > and uses the cached copy for subsequent lookups.  I think NFS4ERR_ACCESS 
> 
> > is
> > the only acceptable response.
> > 
> >   This also implies that clients must use LOOKUP to traverse the
> >   server's namespace on things like traditional mount operations that
> >   a client would do.
> > 
> > Yes.  The client must be prepared for this anyway.  In fact, the client
> > probably can't tell and doesn't care whether it's in a pseudo-fs or a 
> real
> > one.
> > 
> > _______________________________________________
> > nfsv4 mailing list
> > nfsv4@ietf.org
> > https://www1.ietf.org/mailman/listinfo/nfsv4
> > 
> 
> 
> -- 
> Tom Haynes, ex-cfb
> thomas@netapp.com
> 


-- 
Tom Haynes, ex-cfb
thomas@netapp.com

_______________________________________________
nfsv4 mailing list
nfsv4@ietf.org
https://www1.ietf.org/mailman/listinfo/nfsv4