Path: utzoo!attcan!uunet!husc6!rice!sun-spots-request From: bob@kahala.hig.hawaii.edu (Bob Cunningham) Newsgroups: comp.sys.sun Subject: automounter peculiarity, and a nice automount example Message-ID: <8812142340.AA00290@kahala.hig.Hawaii.Edu> Date: 21 Dec 88 18:51:31 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 39 Approved: Sun-Spots@rice.edu Original-Date: Wed, 14 Dec 88 13:40:49 HST X-Sun-Spots-Digest: Volume 7, Issue 70, message 6 of 14 If you accidentally specify non-existent map for an invocation of automount (or, a map which say isn't correctly published by your yp server(s)), then you can get some strange effects. The most obvious is console messages on the system on which automount is running that it "cannot read mountopts.bysitepair map". This is the name of some sort of default map, hard-coded in automount at least in SunOS4.0, for a feature which was never--and will never--be implemented. The fix is to make sure you didn't make a typo in specifying the map name, and the map is properly published. Also, ome of the examples of how to use the automounter that have appeared in Sun-Spots aren't too clear. Here is a (hopefully clear) way in which I use it to manage bits and pieces of /usr/local spread around various servers here. The "server1" and "server2" machines have identical copies of /usr/local/bin, etc., while "server3" just has /usr/local/src. At the tail end of /etc/rc.local on all the diskless machines, I put something like this: # Automounter if [ -f /usr/etc/automount ]; then /usr/etc/automount /usr/local auto.local; (echo "auto local") >/dev/console fi The yellow pages master has a file called /etc/auto.local, which I publish in the yellow pages (via some minor additions to /var/yp/Makefile which should be obvious, so I'm not outlining them here), which contains: bin -ro,soft server1:/usr/local/bin server2:/usr/local/bin lib -ro,soft server1:/usr/local/lib server2:/usr/local/lib src -ro,soft server3:/usr/local/src The effect on each diskless client is to create an invocation of automount that "lives" in /usr/local. When it sees references to /usr/local/bin or /usr/local/lib (or any of their sub-directories) it mounts them from either server1 or server2 (doesn't matter which). When it sees a reference to the /usr/local/src (or a sub-directory), it mounts that from server3.