Help!

aggregate NFS export

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> System Development RSS
Next:  Terminology about Pthread (Pthread lib, pthread-c..  
Author Message
phil-news-nospam
External


Since: Nov 16, 2006
Posts: 329



PostPosted: Mon Jul 16, 2007 8:40 pm    Post subject: aggregate NFS export
Archived from groups: comp>os>linux>development>system (more info?)

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?

--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below |
| first name lower case at ipal.net / spamtrap-2007-07-16-1537 RemoveThis @ipal.net |
|------------------------------------/-------------------------------------|
Back to top
Måns_Rullgård
External


Since: Jul 29, 2004
Posts: 952



PostPosted: Mon Jul 16, 2007 9:49 pm    Post subject: Re: aggregate NFS export [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

phil-news-nospam.RemoveThis@ipal.net writes:

> 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?

It sounds like you're looking for the 'nohide' export option. Be sure
to read the warnings in the man page though.

--
Måns Rullgård
mans.RemoveThis@mansr.com
Back to top
phil-news-nospam
External


Since: Nov 16, 2006
Posts: 329



PostPosted: Mon Jul 16, 2007 9:49 pm    Post subject: Re: aggregate NFS export [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mon, 16 Jul 2007 21:49:13 +0100 M?ns Rullg?rd <mans RemoveThis @mansr.com> wrote:
| phil-news-nospam RemoveThis @ipal.net writes:
|
|> 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?
|
| It sounds like you're looking for the 'nohide' export option. Be sure
| to read the warnings in the man page though.

That could possibly be. If the export is mounted by a client first and the
subdirectory mounted on after the fact, will it be seen by the client at
that time? I'll have to test this out and see.

--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below |
| first name lower case at ipal.net / spamtrap-2007-07-16-1612 RemoveThis @ipal.net |
|------------------------------------/-------------------------------------|
Back to top
Chris Cox
External


Since: Apr 05, 2004
Posts: 408



PostPosted: Tue Jul 24, 2007 11:09 am    Post subject: Re: aggregate NFS export [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

phil-news-nospam DeleteThis @ipal.net 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.
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> System Development All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum