Need help with automounting home directories

Janet Jackson janet at bilby.cs.uwa.oz.au
Sat Mar 16 08:44:00 AEST 1991


Our current (non-automount) setup for home directories is as follows:

We have several Suns which NFS serve users' home directories.  On any one
of these servers, if its hostname is "woylie", its home partition is 4.2
mounted on /home/woylie.  On all other hosts, woylie:/home/woylie is NFS
mounted on /home/woylie. So, for example, /etc/fstab on host "melomys"
contains lines like:

   /dev/sd3h             /home/melomys   4.2 rw                  1 3
   budgie:/home/budgie   /home/budgie    nfs rw,soft,noquota,bg  0 0
   woylie:/home/woylie   /home/woylie    nfs rw,soft,noquota,bg  0 0
   (etc)

To avoid maintaining lots of individual fstabs, I set up auto.master and
auto.home YP maps as follows:

   bilby% ypcat -k auto.master
   /- auto.home    -rw,soft,noquota
   bilby%
   bilby% ypcat -k auto.home
   /home/melomys melomys:/home/melomys
   /home/kultarr kultarr:/home/kultarr
   /home/woylie woylie:/home/woylie
   /home/quokka quokka:/home/quokka
   /home/numbat numbat:/home/numbat
   /home/budgie budgie:/home/budgie
   /home/bilby bilby:/home/bilby

so that on each host, I could get rid of the NFS mount lines from
/etc/fstab, and the NFS mount points in /home, and run automount instead.

On any given host (say "kultarr"), this works fine for the NFS-mounted
home directories.  However, the automounter mounts a symbolic link over
the top of the 4.2-mounted /home/kultarr.  This means that /home/kultarr
is a symbolic link pointing to itself!  /home/kultarr is thus inaccessible
on kultarr.

The automounter creates this link as soon as it runs.  It doesn't wait to
be asked for that hostname.

The problem occurs just the same if I use an indirect auto.home map with
/home given as its directory in auto.master.

Is there any way to get the automounter to ignore the map entry for the
host on which it is running?

The two ways I can think of are not viable solutions.

One is to have an indirect auto.home map, containing a single catchall
entry (* &:/home/&).  Presumably the automounter will never be asked for
the current hostname, since that home directory is already mounted, so it
will never create the offending link.  Even if this does work, I don't
want it because I don't want _all_ home directories to be mountable on
_all_ hosts.

The other is to replace the auto.home YP map with a separate auto.home
file on each host, but this is worse than maintaining separate fstabs.

Thanks in advance,

Janet Jackson
(janet at cs.uwa.oz.AU)
Department of Computer Science
The University of Western Australia



More information about the Comp.sys.sun mailing list