SUMMARY:: Smarty-Pants Automtr w/nis+ attempt

From: Mike Adamski (mike@mneme.sed.stel.com)
Date: Wed Sep 13 1995 - 09:01:40 CDT


My Original Post::
---------------------------------------------------------------------------------

>
> OK Folks, here's a hot one:
>
> I wanted to be cute, and have the whole world in my hands.....but no,
> 'twas not 2 be. My goal? To have a centralized automounting map that
> would allow me to control how & where my client machines were cross mounting
> my apps from. Now, I also have duplicate copies of my apps, (on different
> servers) to distribute load, Isolate 'databases', etc., etc., so I wanted
> to get really cute. I wanted to use the "precidence" capabilities of
> the automounter, looking at local /etc/auto_... entries first, and only
> afterward going to the nis+ map. Alas, this didn't succeed.
>
> Confused? Me too. Here's an example:
>
>
> /etc/auto_master:
>
> # Master map for automounter
> #
> /net -hosts -nosuid
> /home auto_home
> /- auto_direct ****Here's my boy!****
>
>
> Now Ladies & Gents, according to the manual (and an impressively
> well written one....I was pleasantly surprised that they handled so
> complex a topic so well!) since the auto_direct is not preceeded
> by a '/' automounter won't default to the /etc/auto_direct, and
> since the auto_direct is not preceeded by a '+' it won't default
> to the nis+ map....instead, automounter will look to /etc/nsswitch.conf
> for precidence. There he finds:
>
> automount: files nisplus
>
> which tells him to go to /etc/auto_direct first, then if he doesn't find
> what he's a lookin' fer, head on over to nis+'s auto_direct map. So here's
> an example of how I'm attempting to exploit this:
>
>
> Local /etc/auto_master, repeated for clarity:
>
> # Master map for automounter
> #
> /net -hosts -nosuid
> /home auto_home
> /- auto_direct
>
>
>
>
> Local /etc/auto_direct:
>
> /opt/OV josey:/export/opt/OV
>
>
>
>
> and my nis+ auto_direct map:
>
>
> /opt/SUNWleo pussycats:/export/opt/SUNWleo
> /opt/SUNWtvc pussycats:/export/opt/SUNWtvc
> /opt/SUNWtcx pussycats:/export/opt/SUNWtcx
> /opt/eventix pussycats:/export/opt/eventix
> /opt/ar pussycats:/export/opt/ar
> /opt/oracle pussycats:/export/opt/oracle
> /opt/OV pussycats:/export/opt/OV *******AH HAH!********
>
>
>
> See what I'm trying to do? On this partic'lar machine, (the one where
> this /etc/auto_direct resides) I'm a tryin' to superscede the nis+ map
> listing that sayz get OV from pussycats. According to RTFM, Automounter
> should go to /etc/auto_master, then go to /etc/auto_direct, find my
> josey reference for /opt/OV, and mount it from josey. But guess what....
>
>
> It dinna work!
>
> Neither of those suckers works. (strange, huh?) And WORSE, none of
> those other mounts in nis+'s auto_direct can be accomplished. Why?
> I'm guessing that the fail over isn't happening like I've described
> (duh?!!) Anybody got some insight?
>
>
> I worked around this thing by creating 2 distinct auto_direct maps,
> one with 'josey' and one with 'pussycats' for /opt/OV, and this seems
> to work. I just call out the different map from the local /etc/auto_master.
> This is ok for a quick fix, but it takes away the localization of custom
> mapping...i.e., what if I want this one machine to mount this one app from
> somewhere else, just for a few weeks while we beta it? I gotsa create yet
> another nis+map 'youst for dis silly guy!
-------------------------------------------------------------------------------

The overwhelming response from the net was to add +auto_direct to
 /etc/auto_direct. Unfortunately, this doesn't necessarily solve the
problem. The reason it doesn't is because there is no guarantee within the
auto_mounter maps that stuff appearing in a preceeding map or a parent
map, or within the map, will be absorbed in order of appearance. I talked
to a sun dude who said there was no guarantee of any precidence anywhere
within the maps, because stuff gets re-ordered based on length of the mount
string (RTFM....it is in there). Though it appears to work with 1 test case,
It seems to fail with multiple mounts. The supposition made by most folks
was that where you put the +auto_direct within the file /etc/auto_direct
has signifigance....it apparently does not.

Until Sun works out a series of precidence rules for automounter map
resolution, I'm afraid I'll have to stick with making multiple maps in NIS+
and changing local /etc/auto_master's to reference them appropriately.

The sun guy alluded to forthcoming precidence rules....so I'm hopefull!

Mike

mike@sed.stel.com



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:33 CDT