It looks like the Linux way of dealing with this is for the server to automatically export child filesystems by using the crossmnt option in exports and a client that supports this.
Technically I think this could be explained further. The crossmnt option is a client helper thing. All it does on the server is generate some extra entries for the client when it requests the list of shares via rpc. For this work-around to function "seamlessly" the client needs to mount subshares "on the fly" if necessary:
The client examines the servers list of exports and selects extra entries to mount on top of the already mounted base nfs mount.
As such, it is in violation with it's own manpage (
https://linux.die.net/man/8/mount.nfs):
Code:
mount.nfs4 is used for mounting NFSv4 file system, ....
Note the singular "file system". The comparable FreeBSD command
mount_nfs(8) is extremely clear in what it does; it is a frontend to the nmount systemcall.
Code:
The mount_nfs utility calls the nmount(2) system call to prepare and graft a remote NFS file system
Is this a problem? Well, it can be. These programs are used internally by system scripts and the like. Side effects should be avoided - mount does a single mount, period.
For example, umount of such a tree needs to be done in reverse order, or it might fail (device busy).
Use of "fs boundary crossing symlinks" might present suprises.
The hidden submounts use the same mount-options as the basemount: think of /allprojects for which you might choose NFS3 anonymous access and some subdirs requiring nfs4 credentials.
In short, intergrating automatic subshare mounting in the clients mount_nfs will work only in the simplest of situations and blurs what is actually going on.
I say, confronted with the situation of multiple filesystems (aka nfs shares) deal with it in a part of the software stack that is designed for this - autofs.
BTW enjoyed your