[RHCE] Re: autofs question - should automounted directory exist
or not?
Jeremy Portzer
rhce@trilug.org
15 Jan 2003 21:46:47 -0500
On Wed, 2003-01-15 at 21:22, Wolf Dreamer wrote:
> Please see below...
>
> Jeremy Portzer writes:
>
> > I assume technical questions are game on this list, as long as the
> > correspond to potential RHCE topics? If not, please ignore.
> >
> > ====
> >
> > Has anyone here used or played around with autofs / automountd?
> >
> > In the RHL 8.0 _Customization Guide_, there's a brief section:
> > http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/custom-guide/s1-nfs-mount.html
> >
> > Quoting from the bottom of this page:
> > "The first field in /etc/auto.misc is the name of the /misc
> > subdirectory. This directory is created dynamically by automount. It
> > should not actually exist on the client machine."
> >
> > But then the very next paragraph says:
> >
> > "Note
> >
> > "The directory /misc must exist on the local file system. There should
> > be no subdirectories in /misc on the local file system. "
> >
> > So which is correct? Does the automounted sub-directory, /misc need to
> > be created or not? Is this a documentation error or am I missing
> > something completely here?
>
> I would think having them on each client machine is the best way to make it
> work. I have that file on each machine. If you are using a information
> service like NIS, NIS+ or LDAP-it would only work if each machine were
> exactly the same-and that is not the case for me-even on the cluster.
I'm not sure you really answered my question, which was whether /misc
should pre-exist or not, but I probably didn't ask it too clearly,
sorry!
But I think I understand it now after reading the page again and
thinking back to a network I used years ago with that had auto-mounting.
The top-level directory, /misc in the example given, should exist ahead
of time, which is what the "Note" is referring to. The subdirectories
underneath /misc are listed individually in the /etc/auto.misc
configuration file. In the example given, this was "myproject" -- so
/misc/myproject would be automatically mounted. *myproject* is the
directory that shouldn't exist, but will be created/managed by the
automount daemon.
In a common configuration, the managed directory would be /home,
controlled by an "auto.home" configuration file. There are ways to get
auto.home from an NIS map, instead of a local file in /etc, so that you
don't have to maintain auto.home on every client. (The location of the
auto.* files, whether local or from NIS/NFS/whatever, is specified in
/etc/auto.master.)
I'm not sure what you mean by "if each machine were exactly the same".
The point of automounting home directories IS to make each machine get
things from the same place, right? So while no machine is identical,
they would likely have identical auto.home configuration files (pushing
this file out as an NIS map is a way to make sure they stay identical).
--Jeremy