Subject: Server "Mount" Questions

From: Eric Kadison <[email-masked]>
Date: Thu, 12 Jul 2001 17:47:32 -0700

Gents,

As a newbie to NFS V4, I have a few questions regarding a server's behavior
in substitution for the old mount protocol.  These questions relate to
LOOKUP and READDIR performance in sharing directories and in crossing mount
points.  Permissions are not the issue -- assume they are all ok.  The
scenario:

hosta (an NFS V4 Server) has a file system that includes:

     (root) 
      /  \
     /    \
   fsa1   group
    /      /  \
   a1     /    \
        fsa2   fsa3

hosta exports "fsa1", "fsa2" and "fsa3" with rw permission to all clients.

hostb (an NFS V4 Server and client) file system includes:

     (root) 
      /  \
     /    \
   fsb4   mnt
          /  \
         /    \
        b5    b6

The supervisor on hostb wants to find hosta's exported file systems, so
brings up a file manager that issues to hosta: PUTROOTFH, READDIR.  

1.  Will the READDIR result be: "fsa1", "fsa2", "fsa3"?  I expect it will be
since hostb should not be able to see directory "group" on hosta as it is
not exported.  So hosta presents a pseudo-file system showing just the
exported directories.

Next, hostb mounts "fsa1" under "b5".  (To do this, it does a PUTROOTFH,
LOOKUP "fsa1", GETFH, and saves the file handle).  Directory "mnt" is
exported by hostb.

2.  Can hostb then export "fsa1" so that a third host, hostc, can see it?
(This question is related to the requirement for LOOKUP to span mounted file
systems.)  Variations:

2a. First try: hostc issues to hostb: PUTROOTFH, LOOKUP "mnt" "b5" "a1",
GETFH. Will this obtain the valid filehandle for the "a1" directory on
hosta?

2b. Second try:  hostc issues to hostb: PUTROOTFH, LOOKUP "mnt" "b5", GETFH,
READDIR.  Will the READDIR result in "a1"?

Thanks,
Eric Kadison
Broadband Storage, Inc.
(949) 515-1490 x 475
[email-masked] <mailto:[email-masked]>

---

From: "Kendrick M. Smith" <[email-masked]>
Date: Thu, 12 Jul 2001 22:15:35 -0400 (EDT)

> not exported.  So hosta presents a pseudo-file system showing just the

My understanding is that this is not specified in RFC3010; different
server implementations are free to wrap pseudo file systems around their
individual exports however they see fit, as long as all the exports are
reachable from the root without advance knowledge of the filenames.  On
our Linux server, we have chosen to make the namespaces of the exports and
the pseudofs completely independent, and under the control of the
administrator.  In other words, the administrator could choose to
present the pseudofs:

                      (root)
                      /  |  \
                     /   |   \
                 fsa1   fsa2  fsa3

or the pseudofs:

                      (root)
                       /  \
                      /    \
                   fsa1   group
                           /  \
                          /    \
                       fsa2   fsa3

or even:

                     (root)
                     /    \
                   pub    home
                   /       /  \
                  /       /    \
                fsa2    fsa1   fsa3

to its clients.

> READDIR.  Will the READDIR result in "a1"?

I'm not sure what you are asking here.  If hostb is re-exporting fsa1, it
shouldn't matter whether it's a local file system on hostb, or an NFSv4
filesystem mounted from another server.  As far as hostb's clients are
concerned, hosta isn't involved at all.  In (2a), it sounds like you're
asking whether hostb's hosts can obtain a filehandle which would be valid
on hosta.  If I'm interpreting correctly, then the answer is no: they
would obtain a filehandle which is valid on hostb, which hostb knows how
to translate into a filehandle which is valid on hosta.  In (2b), the answer
had better be "yes"; otherwise hostb can't claim that it's correctly
re-exporting fsa1!

Kendrick

---

From: Brent Callaghan <[email-masked]>
Date: Thu, 12 Jul 2001 22:17:07 -0700

> not exported.  So hosta presents a pseudo-file system showing just the

What Kendrick said: a client will see just the directories it needs to
reach
the server's exported filesystems.

> READDIR.  Will the READDIR result in "a1"?

Not quite sure what you're looking for here.  Any POSIX compliant client
of
a NFSv4 server will have to mirror the mounts it encounters on the
server, i.e.
whenever a client crosses a server mountpoint, it'll have to do a mount
in
its own namespace.  That'll also apply to crossings from a server's
pseudo
filesystem into a real exported filesystem.

The biggest problem with re-exporting filesystems in NFSv4 is the server
in
the middle cannot just re-use the filehandles it got from the original
server,
since it cannot guarantee that they're unique.  To guarantee uniqueness,
the
server could add a uniquifier to the re-exported filehandles, making
them a
bit longer.  Alternatively, the server could create new filehandles that
map
back to the original ones - these mapped filehandles would have to be
volatile.

	Brent

---

From: Som <[email-masked]>
Date: Sun, 15 Jul 2001 21:51:38 -0700 (PDT)

> not exported.  So hosta presents a pseudo-file

After reading section 4.1.2 of Public File handle
definition, I thought client should do PUTPUBFH in
this case( instead of PUTROOTFH). Is that not correct?

BTW, how does client decide when to do PUTROOTFH or
PUTPUBFH to start with?

thanks, som.

=====
"Chess holds its master in its own bonds,
shackling the mind and brain so that the 
inner freedom of the very strongest must 
suffer"-Albert Einstein

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/