NIS, automounting, Solaris and headaches
Derek D. Martin
ddm+gnhlug at pizzashack.org
Mon Sep 9 12:28:32 EDT 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
At some point hitherto, Mark Komarinski hath spake thusly:
> Is anyone successfully using NIS and automounting to distribute shares
> from an NIS server to clients? I did it a few years ago, but the
> spiders and rocks seem to have taken up residence in that part
> of my brain.
We did this at MCL. I'm a bit fuzzy about the details, so Paul may be
able to fill in where I fumble. Also, our configuration was a bit
more wierd than yours is likely to be. We had multiple shares where
people's home directories could come from. IIRC:
- -=-=-=-=-
# auto.master
/homes yp:auto.home
- -=-=-=-=-
# auto.home
usera -rw,intr,wsize=8192,rsize=8192 server:/home1/usera
userb -rw,intr,wsize=8192,rsize=8192 server:/home2/userb
userc -rw,intr,wsize=8192,rsize=8192 server:/home1/userc
userd -rw,intr,wsize=8192,rsize=8192 server:/home2/userd
...
- -=-=-=-=-
If you only have one filesystem that you're mounting from, you can
simplify this greatly to:
- -=-=-=-=-
# auto.home
* -rw,intr,wsize=8192,rsize=8192 server:/home/&
- -=-=-=-=-
Here, the '*' says, "match all directories under the mount point;" and
the & says, "replace me with the current iteration of *."
We also had some other wierdness to deal with nfs mounts that
contained software for multiple architectures. On the server, we had
a structure that looked something like this:
/nfs/i386/
/nfs/alpha
/nfs/ia64
Through some shell scripting magic, the relevant directory structure
for a given architecture got mounted on /nfs on each machine. I
believe what we did was mount the whole server:/nfs structure on
/auto, and create symlinks from /auto/<arch> to /nfs. None of this is
relevant to your problem, of course. :)
The part that is though, is that we had a shell script that I worked
up that would automatically figure out what architecture the system
was, and ere everything goes, and set up mount points, symlinks, and
maps appropriately. This doesn't HAVE to be a lot of work, if you
script it right. When a new client is built, just scp the script to
the host and run it, and you're done.
> The best I've been able to find now, to be fair, is a big 'ol
> kludge. The automounter uses /- as a base, then creates symlinks
> to the locations that users expect the directories to be at.
Er, I don't remember having to deal with anything like this... Paul?
> So, a map that looks like:
>
> /nmr/people -rw foobar:/nmr/people
What *IS* this? Or more accurately I guess, *where* is it? I think
you're missing a layer of abstraction, which may be part of your
problem. This looks like it wants to be a direct map, which at least
when we were doing this, was not supported by linux. The proper way
is/was to define your mount point in auto.master, and specify a map to
get the keys from that will go under that mount point. Then list the
keys that get mounted in that map file, followed by the options, and
followed finally by the location to mount from. This is what I did
with auto.master and auto.home above.
HTH.
- --
Derek Martin ddm at pizzashack.org
- ---------------------------------------------
I prefer mail encrypted with PGP/GPG!
GnuPG Key ID: 0x81CFE75D
Retrieve my public key at http://pgp.mit.edu
Learn more about it at http://www.gnupg.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9fMwvdjdlQoHP510RAuyxAKC2eeWbyzi0V827AEG041HymDI8kQCfb/08
guc9MyYgUCi1rVf2oBa8pO0=
=5hE1
-----END PGP SIGNATURE-----
More information about the gnhlug-discuss
mailing list