Subject: Re: nfs - export file
To: Grant Beattie <grant@grunta.com>
From: Andrew Gillham <gillham@vaultron.com>
List: port-i386
Date: 09/24/2001 22:11:19
On Tue, Sep 25, 2001 at 02:42:31PM +1000, Grant Beattie wrote:
> 
> Hmm, if the only choices are:
> 
> 	* export one directory
> 	* export all directories
> 
> then I think the behaviour is particularly broken (and the error
> mentioned didn't even come close to describing the real problem or
> cause, which doesn't help).

While I agree the restriction is not ideal, it is not as bad as you're
thinking.

> There are countless situations where it is necessary to export more
> than one directory, but not appropriate to export the whole file
> system. This is a reasonable fundamental requirement of an NFS server,
> and the fact it isn't possible seems rather bizarre.

You basically must have the same _options_ for each exported directory
that shares a common file system on the server. 
e.g.:
  /home/export/root -maproot=0 host1 host2
  /home/export/swap -maproot=0 host3

This should work fine, sinces the options are matching.

> or did I misinterpret?

Only slightly, and it is non-obvious I will agree.  One other major flaw
in our mountd is that if a non-existent host is listed in /etc/exports, mountd
will invalidate the entire exported file system!  If "host1" has can't be
resolved in my example above, /home/export/root is _not_ exported, even though
host2 exists.  Imagine if you have 10 machines listed on the exports line and
make a change to a server that has been up for weeks.  Oops!  Forgot that host
xyzzy no longer exists and I just ran /etc/rc.d/mountd reload and screwed my
remote clients!

-Andrew