SUMMARY: auto.home map with automounter

From: Leonardo C. Topa (leo@ai.mit.edu)
Date: Fri Jan 17 1992 - 18:01:09 CST


Quite some time ago I asked a question regarding the automounter, and
because of the holidays and other various things I never had a chance
to summarize to the list the responses I received. With my apologies,
here is the summary.

My original question was:
============================================================
What I am trying to do is to have an NIS auto.master map in which one
line reads:

/home auto.home -rw,intr,hard

and then another NIS map auto.home in which there is a line:

ct ct:/home/ct

where /home/ct is a partition which host ct exports to a list of other
machines. The automounter is started on all machines from the rc.local
script with no arguments.

If I now do "cd /home/ct" on any host but ct everythings works
beautifully, but if I try this on ct I get the error:

/home/ct: Too many levels of symbolic links

[I kind of see recursion happening here....]

If in auto.home I change "ct:/home/ct" to something like "ct:/h/ct"
(and /h/ct is where the partition is mounted on ct) everything works,
but now people get confused because if they do "cd /home/ct; pwd" on
any host but ct they get the answer "/tmp_mnt/home/ct", but if they do
this on ct they get the answer "/h/ct" and they think it's a different
subdirectory altogether. Is there any way to make the mounting point
appear uniformly across all machines?

I read Chapter 15 of the System & Network Administration manual, where
there is an example of an auto.home map which I think is just like
mine, but I can't get it work. Is it at all possible to do what I am
trying to do? I will summarize.
============================================================

A couple of people said that this had been asked before, and that,
although it's not on the FAQ list, maybe it should be there.

Upkar suggested to use amd instead of the automounter.

Others said to get Hal Stern's book "Managing NFS and NIS" and the
section "Mount Point Conflicts" in the Sun admin manual. I didn't have
Hal's book and I must have not read carefully Sun admin manual.

Dinah McNutt sent me a long article about the automounter which
appeared in the Feb. and Mar. 1991 issues of SunExpert.

Angela Thomas Hoynowski said that on host ct I could do "automount -f
/etc/auto.master /home -null" and on all the other hosts "automount -f
/etc/auto.master". This wouldn't work for me because host ct needs to
mount other home partitions (I simplified my situation)

Arie Bikker suggested something on the same lines as Angela's
solution.

All other answers can be summarized with the following reply:

------------------------------------------------------------
From: Michael S. Maiten <msm@energetic.com>

The problem here is that you are not following a key rule with
indirect maps: The automounter MUST control everything in the
directory.

By having a hard mount there, the automounter is trying to overlay a
symbolic link over the mount point and then everything screws up.

What I recommend is that you mount your local disks which are exported
in /export with the name that they are usually referenced (ie;
/export/home/ct may be a good place for the disk which is referenced
by auto.home as /home/ct). While this still yields "/export/home/ct"
from pwd on node ct and "/tmp_mnt/home/ct" on other nodes, it will
make it a bit more clear (since the "home/ct" part is the same).

To my knowledge there is no consistent way to get pwd to return where
you think you are instead of where you really are. In fact, some
vendors' installation scripts try and make use of pwd in an automounted
environment and then botch the installation.

I suggest that if you are using csh, you can use the "cwd" command
which will tell you where the shell thinks you are (which is how you
named it, rather than over what links and automounts it really is).

[A long while ago, in a SunOS 4.0 environment, I wrote a script
autopwd that did a pwd, checked the result with the output of df and
the YP maps and made a best guess as to by what name was specified
with the automounter to reach this point. It may no longer work
properly in a 4.1.1 environment (I haven't tried). I have previously
posted it, but if you are interested (at your own risk), let me know
and I will send it to you]
------------------------------------------------------------

My thanks to:
David Fetrow <fetrow@biostat.washington.edu>
Michael S. Maiten <msm@energetic.com>
kalli!kevin@fourx.aus.sun.com (Kevin Sheehan {Consulting Poster Child})
mdl@cypress.com (J. Matt Landrum)
birger@vest.sdata.no ( Birger Wathne)
dennett@kodak.com (Charlie Dennett)
bernards@ecn.nl (Marcel Bernards)
dwb@sparky.imd.sterling.com (David Boyd)
caxwgk@pki-nbg.philips.de (Wolfgang Kuehnel )
melissa@pituco.jpl.nasa.gov (Melissa Probst)
dinah@pencom.com (Dinah Mc Nutt)
feldt@phyast.nhn.uoknor.edu (Andy Feldt)
Mike Raffety <miker@sbcoc.com>
Arie Bikker <aribi@geo.vu.nl>
jon@choctaw.b23b.ingr.com (Jon Stone)
kla!brandari%sunra@sun.com (Paul Brandariz x6546)
david@srv.pacbell.com (David St. Pierre)
Upkar Singh Kohli <upkar@trace.eng.wayne.edu>
Angela Thomas Hoynowski <angela@everest.tandem.com>
stssram@unocal.unocal.com (Robert Myers)
deltam!dm!mark@uunet.uu.net (mark galbraith)
neil@chemical-eng.edinburgh.ac.uk
sitongia@hao.ucar.edu (Leonard Sitongia)
bdb7881@eeidw004.boeing.com (Bart Borcherding 965-6517)
T.D.Lee@durham.ac.uk



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:34 CDT