AMD (automounter) setup for home dirs

AMD (automounter) setup for home dirs

Post by Kenneth Mun » Tue, 18 Mar 1997 04:00:00



I am trying to implement AMD on a SunOS 4.1.3 machine and am
somewhat confused.  I would like to hard mount the /home partition
locally, fstab entry:

/dev/sd0h  /home  4.2  rw 1 2

Each person's home directory could be on any number of servers all
following the form:

/home/$host/$usr

I would like the automount point on all servers to be /home/$host.
Is this a workable and feasible strategy?

The default for AMD makes the automount point /a/$host/home/$host/$usr.
For some reason, I can't figure out how to make it so that when
I reference /home/$host/$usr, I get sent over to the above
mentioned automount point.  My passwd file states that the home directory
is /home/$host/$usr and I've cribbed the automount map to look like:

/defaults       opts:=rw,intr,grpid,nosuid

talon   host!=${key};type:=nfs;rhost:=${key};rfs:=/home/${key} \
                host==${key};type:=ufs;dev:=/dev/sd0h

swoop   host!=${key};type:=nfs;rhost:=${key};rfs:=/home/${key} \
                host==${key};type:=ufs;dev:=/dev/sd0h

I've been using hard mounts in /etc/fstab exclusively and am
starting to explore the automounter.  Is there something I'm missing
here?  I would like to set it up so that all that's needed for someone
to access their home directory is to type cd ~$user or cd /home/$host/$user.
Thanks in advance for your help.
--
-----------------------------------

Professional Examination Service
(212) 870-2154

 
 
 

AMD (automounter) setup for home dirs

Post by Andrew Rapha » Wed, 19 Mar 1997 04:00:00




>I am trying to implement AMD on a SunOS 4.1.3 machine and am somewhat
>confused.  Each person's home directory could be on any number of
>servers all following the form: /home/$host/$usr
>I would like the automount point on all servers to be /home/$host.
>Is this a workable and feasible strategy?

Yes.  I've been doing that at CISRA since switching to AMD in 1990.

Quote:>The default for AMD makes the automount point /a/$host/home/$host/$usr.
>For some reason, I can't figure out how to make it so that when I
>reference /home/$host/$usr, I get sent over to the above mentioned
>automount point.

The trick you're missing is to mount your home partitions where AMD
expects to find them: in the /a/${host}/ tree.
Suppose the host is mama, and the user is raphael.
Then mama's /etc/fstab has a line like this:
        /dev/sd0h /a/mama/home 4.2 rw,noquota 1 3
and mama's /etc/exports has a line like this:
        /a/mama/home -access=unix
and the NIS passwd map has a line like this:
raphael:[...]:/home/mama/raphael:[...]
Then you start amd like this:
        amd -r /home /etc/amd.home
and the /etc/amd.home file has a line like this:
        *       -opts:=rw,bg,intr,noquota;rfs:=/a/${key}/home || \
                host==${key};type:=link;fs:=${rfs} || \
                host!=${key};type:=nfs;fs:=${rfs};rhost:=${key}

The -r switch tells AMD to inherit all your statically mounted file
systems.  Don't forget it.

So, if you're on mama, then /home/mama is a link to /a/mama/home, but
if you're on any other machine, /home/mama is a link to the NFS mount
point /a/mama/home.  This gives the same answer on every machine in
your network:
: mama; cd /home/mama/raphael
: mama; /bin/pwd
/a/mama/home/raphael
: elph; cd /home/mama/raphael
: elph; /bin/pwd
/a/mama/home/raphael

--

        "Oh! I see, it's your birthday.  It's your big day, and I forgot."

 
 
 

1. automounter and home dirs

First of all, let me apologize if this is in an inappropriate group.

I have a number of Sparc2's with home directories on each and people login
to their "home" machine...  I want to automount all the other machines'
partitions containing home directories, just in case they need to hop
over to one of the other machines.  Furthermore, I want to distribute
a single map (called 'auto.home') to all these machines vi YP.

Here is an excerpt of the 'auto.home' map (the names are changed):
almond          almond:/localhome
pecan           pecan:/localhome
walnut          walnut:/localhome
filbert         filbert:/localhome
peanut          peanut:/localhome

And /etc/auto.master looks like this
/-      direct.comm1            -rw,intr
/home   auto.home               -rw,intr

Now, here's my delima - how do I define the home directory in /etc/passwd
(also YP distributed) such that on any machine, the user will hit his/her
home directory, whether NFS or local?

I could go with '/home/machine_name/user_name'.  However, if "joe" logs into
his "pecan" and his home directory is on "pecan's" /localhome, the
automounter will mount this local drive via NFS back onto "pecan".
Is there a way I could make the automounter ignore mount requests for disks
that are local and create a symlink to the local partion (/localhome)?
Is there any symlink scheme I could use for this (other than putting
a symlink for every user in /localhome on every machine pointing to /home/__?
If not, what performance degradation will we see going thru NFS to reach a
local disk vs. going directly to the local disk?  I could use ANY comments!

I know this is kind of long winded, so please reply direct to my
email address and I'll post (if anyone's interested) what I found out
and what I implemented.

Thanks a Ton!

 ||      PATRICK H LARKIN, JR. - UNIX System Administrator     ||

2. Linux + nVidia 4Mo AGP + EV900

3. AMD automounter "home" map confusion

4. transputers

5. Correct amd automounter "direct map" setup under RH?

6. vnc logout fails to close?

7. home dir setup

8. kmail hosed my messages!!!!

9. after changing a user's home dir, cd ~user in ksh still use old dir

10. how to get apache to translate server/dir to home dir?

11. home dirs permission setup suggestions?

12. amd and NIS maps: No source data for map amd.home

13. 2.5.1 automounter adding spaces to exported dirs??