SUMMARY: Automount question

From: Rune Mossige (gsoz197@norway.waii.com)
Date: Sat Aug 13 1994 - 06:06:33 CDT


Sorry for the last posting, very few have metamail capabilities,
so I resend it in, hopefully, proper format.

I got five answers, and the clearest one from Nate Itkin, who
also pointed out two exelent documents on sunsite. Thanks.

The original question:

>Hello,
>I want to install automount, and have started reading all info I can come
>across, but there is one thing I don't know.
>
>I have a relativly simple setup with two machines, e.g.
>
>machine1: dir1, dir2, dir3
>machine2: dira, dirb, dirc
>
>I want to create an auto.something map so that both machines have access to
>all six directories, e.g.
>machine1: machine2:
>/dir1 /dira
>/dir2 /dirb
>/dir3 /dirc
>machine2:/dira /machine1:/dir1
>machine2:/dirb /machine1:/dir2
>machine2:/dirc /machine1:/dir3
>
>I know I can specify null maps on the automount startup line, but I would
>expect that there was a 'smarter' way of doing this? The machines in
>question is a Sun SPARC 4/330 with SunOS 4.1.3 and an RS6K with AIX 3.2.5.
>-----------------------------------------------------------------------

and the answers:

Mount diskene slik:

maskin1 maskin2
/export/automount/dir1 /export/automount/dira
etc etc etc

Se setter du opp automount maps som mounter
/dir1 fra maskin1:/export/automount/dir1
/dira fra maskin2:/export/automount/dira
etc etc

Automount pe maskin1 vil set at /dir1, /dir2 og /dir3 er lokale, og bare lage
en softlink (under 4.1.x) eller en loopback mount (Solaris 2.x). Samme for
maskin2 og dira, dirb, dirc.

Birger

I'd suggest forgetting about /foo and /bar, and instead using
/warble/foo and /warble/bar. This means using indirect maps, instead
of direct maps, which work a little more nicely - even though
converting to them is a little bit more of a hassle, because people so
often name their drives /foo.

Dan Stromberg - OAC/DCS strombrg@uci.edu

A shared auto.something file (or map) works only if the local mount is different
from the auto mount point. Example : On machine1, mount the disks under
/export/dir1, /export/dir2 and /export/dir3 and on machine2 you mount the disks
to /export/dira, /export/dirb and /export/dirc.
Then the map could look like
dir1 machine1:/export/dir1
dir2 machine1:/export/dir2
dir3 machine1:/export/dir3
dira machine2:/export/dira
dirb machine2:/export/dirb
dirc machine2:/export/dirc

The automounter then does a symlink(loopback mount for Solaris 2.3) for a local
disk and a nfsmount for a remote.

BTW : I would strongly recommend using indirect maps if they are subject to changes...

Eckhard R|ggeberg
eckhard@ts.go.dlr.de

Rune,

What you want to do is this:

On machine1, *physically* mount your directories as:
    /export/dir1
    /export/dir2
    /export/dir3

On machine2, *physically* mount your direstories as:
    /export/dira
    /export/dirb
    /export/dirc

Then, you can have a single direct map (auto.something) that is
shared by both machine1 and machine2:
    /dir1 <your mount options go here> machine1:/export&
    /dir2 <your mount options go here> machine1:/export&
    /dir3 <your mount options go here> machine1:/export&
    /dira <your mount options go here> machine2:/export&
        /dirb <your mount options go here> machine2:/export&
    /dirc <your mount options go here> machine2:/export&

The reason for putting the physical mount points in /export
is to differentiate them from the auto mount points. Otherwise,
the automounter would grab hold of the physical mount points
and things whould start disappearing.

On SunOS when the automounter is told to mount something from the
same machine, it simply creates a symbolic link. For example, on
machine1:
    /dir1 -> /export/dir1

Good luck,
John R. Koehring Voice/FAX: 602-967-2365/602-921-7060

This should do it (assuming SunOS 4.1.x and no NIS). Create /etc/auto.master
and /etc/auto.mounts on both systems with the following contents:

Put in /etc/auto.master:

        /mounts /etc/auto.mounts

Put in /etc/auto.mounts:

        dir1 machine1:/dir1
        dir2 machine1:/dir2
        dir3 machine1:/dir3
        dira machine2:/dira
        dirb machine2:/dirb
        dirc machine2:/dirc

On machine1:

        ln -s /mounts/dira /dira
        ln -s /mounts/dirb /dirb
        ln -s /mounts/dirc /dirc

On machine2:

        ln -s /mounts/dir1 /dir1
        ln -s /mounts/dir2 /dir2
        ln -s /mounts/dir3 /dir3

No need to create the /mounts directory. automount will do it for you.
On both systems, start automount as follows (edit /etc/rc.local):

        automount -m -f /etc/auto.master

Don't worry about the machines "mounting themselves". automount is smart
enough to see this and simply create the symbolic link without doing an NFS
mount. Of course, this can also be done with the automount maps in NIS.
"File System Organization, The Art of Automounting" explains this in detail.

I suggest reading two SunSoft white papers entitled "The Automounter" by Brent
Callaghan and Tom Lyon and "File System Organization, The Art of Automounting"
by Martien F. van Steenbergen. Both will shed some light on the mystery of
the automounter. I included the first as a compressed (gzip), uuencoded,
postscript file. The Art of Automounting is too big to e-mail. Get it via
anonymous ftp from sunsite.unc.edu:/pub/sun-info/white-papers.

Thanks to the following:

Birger.Wathne@vest.sdata.no (Birger A. Wathne)
Dan Stromberg - OAC-DCS <strombrg@bingy.acs.uci.edu>
Eckhard.Rueggeberg@ts.go.dlr.de (Eckhard Rueggeberg)
johnrk@bartman.syntellect.com (John Koehring)
Nate Itkin <Nate-Itkin@ptdcs2.intel.com>



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:07 CDT