Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Oct 2001 10:28:27 +0200
From:      Peter Cornelius <pcc@gmx.net>
To:        freebsd-questions@freebsd.org, pcc@gmx.net
Subject:   Another one chokes with /etc/exports ...
Message-ID:  <20011007102827.A7475@akk3.akk.org>

next in thread | raw e-mail | index | archive | help
Hi community,

... I seem to continiously trick myself trying to rewrite my /etc/exports.
Done this before. Can't be that hard. I thought. Have dealt with a diskless
client a few times. I'm a crack. I thought. As it seems, it has always been
a single nfs client, so I never got my toes trodden on. And much of this has
been before Release 3. However, I don't like my feet feeling flat, and now
I wanna know.

When I get stuck like this, I usually consult the archives and do a little
bit of looking about. So I do know that http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/networking.html#EXPORTS-ERRORS exists, and I have read quite
some mails. However, I persistently seem to miss the point.

What I intended to do is to consider the i[3-6]86 as separate architectures
(I don't want to discuss this in particular) and share as many directories
(i. e. the same export on the server) among the machines of a particular
architecture. Obviously, /usr/src, /usr/ports and /home (which actually is
/usr/home here) should be one exported directory on the server which is
used for all clients.

The server currently runs 4.3-STABLE (FreeBSD fileserv 4.3-STABLE FreeBSD 4.3-STABLE #0: Sun May  6 16:33:59 CEST 2001     root@:/usr/src/sys/compile/FILESERV  i386, cvsup'ed just before the build started). It has a large vinum-made
/usr but no much else of excitement:

# mount
/dev/ad0s1a on / (ufs, local)
/dev/vinum/usr on /usr (ufs, NFS exported, local)
/dev/ad2s1e on /R (ufs, local)
procfs on /proc (procfs, local)
# 

(more frequent kernel updates are a little bit of a pain and a risk because
of vinum). So my first approach was about the following which resulted in the
usual errors (mark&paste, sorry):

---------- SNIP SNIP ----------
# This would allow mounts anywhere in /usr, unconditionally.
#/usr   -alldirs        petra luis router nosbox
#
# I like this a little better since it's sligthly more restrictive.
# Admittedly, path names are a bit lengthy...
#  These are common to all clients.
#   Until we know better, allow uid root access to ports and src.
/usr/src /usr/ports     -maproot=0:0    router petra luis
#   Users are evil, so try without maproot=0:0 for the time being.
/usr/home               router petra luis
#  root filesystems are read-only. These are a product of cpdup(1).
#   (a) i386 type machines
/usr/dfs/nfs/root/mach/nosbox -maproot=0:0,ro nosbox
#   (b) i486 type machines
/usr/dfs/nfs/root/mach/luis     -maproot=0:0 -ro        luis
#/usr/dfs/nfs/root/mach/router  -maproot=0:0,ro router
#   (c) i586 type machines
/usr/dfs/nfs/root/mach/petra    -maproot=0:0,ro petra
#  /usr/obj directories are supposed to be shared on per-architecture basis.
#   Do need maproot=0:0 here...
/usr/dfs/nfs/root/mach/shared/usr/obj386        -maproot=0:0    nosbox
#/usr/dfs/nfs/root/mach/shared/usr/obj486       -maproot=0:0    router luis
/usr/dfs/nfs/root/mach/shared/usr/obj586        -maproot=0:0    petra
#  As are /usr/X11R6 dirs. However, currently there may be problems:
#   Where to put temprary files?
#   How to manage the ports db? Also share?
/usr/dfs/nfs/root/mach/shared/usr/X386  -maproot=0:0,ro nosbox
/usr/dfs/nfs/root/mach/shared/usr/X486  -maproot=0:0,ro router luis
/usr/dfs/nfs/root/mach/shared/usr/X586  -maproot=0:0,ro petra
#
#   rw access for admin hosts only. Normally, use the above!
/usr/dfs/nfs/root/arch/i386     -maproot=0:0    petra
/usr/dfs/nfs/root/arch/i486     -maproot=0:0    petra
/usr/dfs/nfs/root/arch/i586     -maproot=0:0    petra
/usr/dfs/nfs/root/mach/shared/usr/X386  -maproot=0:0    petra
/usr/dfs/nfs/root/mach/shared/usr/X486  -maproot=0:0    petra
/usr/dfs/nfs/root/mach/shared/usr/X586  -maproot=0:0    petra
---------- SNIP SNIP ----------

Then, I reread some of the docs I mentioned above and decided that I would
have to have all exports for one client on a single line, so I made:

---------- SNIP SNIP ----------
# This now is a test.
# Exports for petra.
/usr/src /usr/ports /usr/home /usr/dfs/nfs/root/arch/i386 /usr/dfs/nfs/root/arch
/i486 /usr/dfs/nfs/root/arch/i586 /usr/dfs/nfs/root/mach/shared/usr/X386 /usr/df
s/nfs/root/mach/shared/usr/X486 /usr/dfs/nfs/root/mach/shared/usr/X586  -maproot
=0:0    petra
/usr/src /usr/ports     -maproot=0:0    router luis
#/usr/home              router petra luis
/usr/local/share/dfs/nfs/root/mach/nosbox -maproot=0:0,ro nosbox
# Seems this is my only resort -- implications??
#/usr   -alldirs        petra router luis nosbox
---------- SNIP SNIP ----------

Again, no luck. It's horribly messy and almost unmaintainable, anyways.

So... I'm stuck it seems. All docs and books I read don't seem to bring
enlightment. So, my questions are...

... why don't we support something like the first attempt? (Please don't
    answer that we can only export file systems which I know and does not
    help me much)
... what have people done in a similar situation, in particular, how did
    you manage to export the same dir with different options to different
    hosts while having other exports with the same ones to the same hosts?
    Could you provide me with an example?
... what are the implications of -alldirs? Particularly, how would I
    restrict write access to a few particular dirs, depending on the client?
... why can't I get my grips on this??? After all those years, I don't
    consider myself a bloody BSE-beginner...

Well. Thanks for reading this far.

Best regards,

Peter.

P. S.: Please do include my addres in replies, I seemingly am not allowed
       To fiddle with my email headers in this webmail... Thanks!

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011007102827.A7475>