Ben Whaley wrote:

> Thank you, Rick, for taking the time to reply.
>
> In an NFSv4 server, is it possible to have multiple exports on the same
> filesystem but not under the same tree without exposing the top level
> directory?
No. The same is actually true for NFSv3, except that the Mount command won't
translate the path to an FH for the mount. (Or, the NFSv3 client must find it 
via
a Lookup on "..", which clients won't  normally do.)
>
> E.g. if you wanted to export the following without also exporting /
>
> /path/to/export1
> /anotherpath/to/export2
>
> Assuming export1 and export2 are both on the same server filesystem, could
> they both be exported without exporting / as the NFSv4 root?
Again, no.

> Also, exports(5) says:
>
> > The third form has the string ``V4:’’ followed by a single absolute path
> name, to specify the NFSv4 tree root.  > This line does not export any file
> system, but simply marks where the root of the server’s directory tree is
> for > NFSv4 clients.
>
> Yet the V4 root seems to behave like a “normal” export with the -alldirs
> option. A V4 client can mount the V4 root and any subdirectory under it,
> whether the subdir was exported or not. Am I misunderstanding what the man
> page says?
No,  if you created a /etc/exports with only a "V4:" line, no file system would 
be
exported. (You might be able to mount, but you wouldn't be able to do much of
anything with it. I don't think even a Readdir/ls works. It just allows Lookup 
and
a few other Ops, so that the mount can work without all the parent files systems
being exported.)

It is the line that exports any path in the file system that exports that file 
system.
ie. It is the
/path/to/export
that exports everything in that file system.
--> So, yes, it is like all export lines except the "V4:" line have "-alldirs" 
on them.

rick

_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[email protected]"

Reply via email to