Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Feb 1995 09:53:41 -0600 (CST)
From:      Joe Greco <jgreco@brasil.moneng.mei.com>
To:        jkh@FreeBSD.org (Jordan K. Hubbard)
Cc:        hackers@FreeBSD.org
Subject:   Re: any amd users out there?
Message-ID:  <9502131553.AA14472@brasil.moneng.mei.com>
In-Reply-To: <199502131436.GAA15124@time.cdrom.com> from "Jordan K. Hubbard" at Feb 13, 95 06:36:44 am

next in thread | previous in thread | raw e-mail | index | archive | help
> Can to send me your maps?  I've read the docs and I'm still
> confused! :-)
> 
> Basically, I just want to map machines into a /machine/path
> scheme.  /thud/d, /freefall/a, etc.
> 
> Thanks!

Hi Jordan,

I'll be honest and say I haven't gone any further than I needed with amd, so
I don't really know whether or not what you describe is feasible.  I've
traditionally worked with Sun's autoblount and it is oriented towards
providing subdirectory services under a "magic" single directory of some
sort:  under amd, I have observed the same thing, so all I can immediately
say is that doing the "/net/{hostname}/{filename-on-host}" thing would be 
simple enough.

In my own environment, I wanted to be able to access
"/home/{machine}/{partition}/" via amd, so that I could do things like
"/home/solaria/u1/jgreco" and get /home/solaria/u1 automounted - without
doing an instance per-user, as the Sun automounter would stupidly do.  This
doesn't seem to be quite what you're looking for, but it may give a few
clues.  I installed the following (shortened) map as /etc/amd.home:

hummin# cat /etc/amd.home
#
# mk-amd-map /etc/amd.home
#
/defaults       opts:=rw,intr,grpid,nosuid
#
localhost       type:=link;fs:=${host}
#
solaria         type:=auto;fs:=${map};pref:=${key}/
#
solaria/u0      host!=solaria;type:=nfs;rhost:=solaria;rfs:=/usr/u0 \
                host==solaria;type:=ufs;dev:=/dev/xxx
#
solaria/u1      host!=solaria;type:=nfs;rhost:=solaria;rfs:=/usr/u1 \
                host==solaria;type:=ufs;dev:=/dev/xxx
#
hummin          type:=auto;fs:=${map};pref:=${key}/
#
hummin/u0       host!=hummin;type:=nfs;rhost:=hummin;rfs:=/home/hummin/u0 \
                host==hummin;type:=ufs;dev:=/dev/sd1g

Notice that Solaria itself is still running Sun automount and will never
participate in the amd map, so the "rfs" points to the physical mount point
and the "dev" is meaningless.  The amd syntax is funky but powerful - it's
also mildly self-explanatory.  I believe that this is fairly similar to a
sample given in the BSD SMM, by the way...

Wierd side effects:  if you do this, your physical home directory ends up as
/a/{host}/home/{host}/{partition}/{user}  but I didn't/don't care too much.

One has to create a db version of the map by doing "mk-amd-map mapname" (as
the comment at the top of my map suggests).

/etc/netstart:
amdflags="-r -l syslog /home /etc/amd.home -cache:=inc"
nfs_client=YES
nfs_server=YES

For doing what (I think) you're doing, you might want to look at "type:=host" 
as a more generalized way of providing access to the exported filesystems on
a host.

Try something like this:
#
# mk-amd-map /etc/amd.net
#
/defaults	type:=host;fs:=${autodir}/${rhost}/root;rhost:=${key}
*		opts:=rw,intr,nosuid,grpid

then mk-amd-map /etc/amd.net and run amd:

amdflags="-r -l syslog /net /etc/amd.net -cache:=inc"

which of course I haven't tried and will blow up all your systems in
brilliant and unexpected ways.  This advice comes with no warranty or
guarantees: I will take no responsibility for the destruction and demise of
your filesystems, your machine, Walnut Creek CDROM, California, or the
planet resulting from anything that you do as a result of this message.

;-)

... Joe

-------------------------------------------------------------------------------
Joe Greco - Systems Administrator			      jgreco@ns.sol.net
Solaria Public Access UNIX - Milwaukee, WI			   414/342-4847



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9502131553.AA14472>