Re: aggregate NFS export



phil-news-nospam@xxxxxxxx wrote:
Is there any way in Linux to create an NFS export that appears to clients
as a single export, but contains more than one actual filesystem (export
a directory and other filesystems are mounted on subdirectories and are
seen in the export)? How about if those filesystems are mounted _after_
an NFS client has mounted this? An ordinary userspace file server (e.g.
FTP server, web server, RSYNC server) can see mounts on subdirectories
that happen even after they start running. Maybe some userland form of
NFS daemon?


Use the automounter and an indirect automount (perhaps... you'll see
multiple mounts as needed, but it hides the work.. maybe ok for you??)

e.g.
File auto.master:
/home auto.home -bg,intr

File auto.home:
nis01 hostnis01:/export/nis01
nis02 hostnis02:/export/nis02

Thus when I go into /home/nis01 (from a client with the above
automount files setup and the automounter running) the directory
off of the host hostnis01 gets mounted there and when I go to
/home/nis02 the directory off of host hostnis02 gets
mounted at that location.

By placing mounts under the automounter, they'll mount when
used and unmount when not in use (can be tuned).

You can even use wildcards, consider:

File auto.home:
* &:/export/home

This would allow you to access /home/whatever-machine and
that will attempt to nfs mount whatever-machine:/export/home
at that point.

Perhaps this helps... might not be exactly what you are looking
for.

You can push the automount info out via NIS or LDAP too. If you
want to control all of this from a central point. Doing this with
NIS is more portable to broad variety of *ix variants and the
plethora of version levels. Only do LDAP if you know you
can support it. You'll need to tweak /etc/nsswitch.conf to let
it know to pull the automount data from NIS or LDAP on the clients.

The software based NFS server does allow you to do some of
the kind of trickery you mentioned... however it has a PLETHORA
of limitations and will probably frustrate you eventually.
.



Relevant Pages

  • Odd NFS issues
    ... I basically mounting some filesystems off another Debian box (also ... The mounts have myteriously turned into hyphons and I cannot access them ... with the same options on the server side. ... Interestingly, I have several clients all mounting the same stuff, and ...
    (Debian-User)
  • Re: NFS client , automount and protection problem
    ... Since you're having problems with non-root automount, ... This creates the "disk2" alias in the root. ... WORKS PERFECTLY (aka lists the files on the remote server). ... bother asking the remote server to mount it. ...
    (comp.sys.mac.system)
  • Re: [PATCH] NFS: Replace null dentries that appear in readdirs list [try #2]
    ... because of the nesting of mounts which also ... implicit recursive unmounting of xdev submounts. ... This should now be left to the NFS client. ... not my problem if I treat fsid filesets as the automount unit. ...
    (Linux-Kernel)
  • Re: File::Find on Solaris v8-10
    ... > The problem I've encountered is when scanning automount based NFS ... The easiest is to execute the script from the server that is providing ... Another approach would be to extract the home directory names from the ...
    (comp.lang.perl.modules)
  • Re: udevd: get_netlink_msg: no ACTION in payload found
    ... >> I see it on mounts caused by automount. ... It was not the kernel upgrade, that happened on Oct 11 (previously I was ... "One disk to rule them all, ...
    (Debian-User)