Subject: Re: amd and nis?
To: Alexander Klink <aklink@igd.fhg.de>
From: Sir Clark Frazier Hale I <xlark@sdf.lonestar.org>
List: netbsd-help
Date: 04/21/2005 21:54:27
On Thu, 21 Apr 2005, Alexander Klink wrote:
> - The bigger problem is importing nfs-mounts via nis and an
> automounter. Under Linux, installing it was basically adding
> the line +auto.master to /etc/auto.master.
> Under NetBSD, I've found that I'll need amd. Fine. So I tried
> to configure it. amd.conf looks pretty empty at the moment:
> [ global ]
>
> [ /amd ]
> map_name = auto.master
>
> I've got a file named /etc/auto.master which has the +auto.master
> line in it as under Linux.
> Starting amd (which somehow only works using forcestart?) does
> basically nothing. As the mount points are used under / here in
> Linux, I tried changing the [ /amd ] to [ / ] but that basically
> hangs the whole system.
> Does anyone have an idea where to start troubleshooting?

I'd recommend reading the manual of amd.  It's rather different from 
Automounter on Linux (which is based on the SunOS Automounter).  BSD amd 
is much more powerful than the Linux Automounter and requires a different 
format for it's maps.  I would suspect there are utilities that would 
convert back and forth between Linux/SunOS and BSD style maps, but I have 
never had the need.

Two enable NIS, two parameters need to be specified in the [ global ] 
section:

[ global ]
nis_domain = cscc
map_type = nis

Each map needs to have its own section.  You should not have to specify a 
section for /amd, there is no amd.master

An example, I have two maps: amd.home for home directories, and amd.data 
for other things:

[ /home ]
map_name        =       amd.home

[ /data ]
map_name        =       amd.data


Here's my amd.home

/defaults       type:=nfs
clark           rhost:=faramir;rfs:=/export/home/clark
cliff           rhost:=faramir;rfs:=/export/home/cliff
allison         rhost:=faramir;rfs:=/export/home/allison
ftp             rhost:=avathar;rfs:=/export/ftp
ebay            rhost:=faramir;rfs:=/export/home/ebay

I'd say start looking over the manual for BSD amd

http://www.netbsd.org/Documentation/bsd/amdref_toc.html

Here's my full amd.conf:
[ global ]
auto_dir        =       /net
log_file        =       syslog:local1
log_options     =       all
nis_domain      =       cscc
restart_mounts  =       yes
browsable_dirs  =       yes
map_type        =       nis

[ /home ]
map_name        =       amd.home

[ /cscc ]
map_name        =       amd.cscc

[ /data ]
map_name        =       amd.data

HTH,

clark

--
Sir Clark Frazier Hale I
xlark@sdf.lonestar.org
For the Snark WAS a bojum, you see.
SDF Public Access UNIX System - http://sdf.lonestar.org
Clayton SuperComputing Centre - http://cscc.homeunix.net