[BACK]Return to amdref.html CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / htdocs / docs / bsd

File: [cvs.NetBSD.org] / htdocs / docs / bsd / amdref.html (download) (as text)

Revision 1.3, Wed Aug 1 15:36:00 2007 UTC (14 years, 4 months ago) by kano
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +3 -3 lines

fix links: Misc/disclaimer.html -> about/disclaimer.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">

<html>
<head>
<!-- Copyright (c) 1997-2003
	The NetBSD Foundation, Inc.  ALL RIGHTS RESERVED. -->

<!-- This HTML file has been created by texi2html 1.51
     from amdref.texinfo on 31 October 1997 -->

<title>4.4 BSD Automounter Reference Manual</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">

<table><tr><td>
<a href="../../about/disclaimer.html#bsd-daemon">
<img align="middle" src="../../images/BSD-daemon.jpg" border=0
width=146 height=129 alt="BSD daemon"></a>
</td><td align=center>
<h1>4.4 BSD Automounter Reference Manual</h1>
</td></tr></table>
<p>

<small>
The 4.4 BSD Automounter<br>
Reference Manual<br>
<br>
Jan-Simon Pendry
<i>and</i>
Nick Williams<br>
<br>
Last updated March 1991
Documentation for software revision 5.3 Alpha<br>
<br>
Copyright (C) 1989 Jan-Simon Pendry<br>
Copyright (C) 1989 Imperial College of Science, Technology &amp; Medicine<br>
Copyright (C) 1989 The Regents of the University of California.<br>
<br>
All Rights Reserved.
Permission to copy this document, or any portion of it, as
necessary for use of this software is granted provided this
copyright notice and statement of permission are included.
</small>
<p>

<h1><a name="SEC1" href="amdref_toc.html#SEC1">Preface</a></h1>

<p>
This manual documents the use of the 4.4 BSD automounter---<i>Amd</i>.
This is primarily a reference manual.  Unfortunately, no tutorial
exists.

<p>
This manual comes in two forms: the published form and the Info form.
The Info form is for on-line perusal with the INFO program which is
distributed along with GNU Emacs.  Both forms contain substantially the
same text and are generated from a common source file, which is
distributed with the <i>Amd</i> source.



<h1><a name="SEC2" href="amdref_toc.html#SEC2">License</a></h1>
<p>
<i>Amd</i> is not in the public domain; it is copyrighted and there are
restrictions on its distribution.
<p>
Redistribution and use in source and binary forms are permitted provided
that: (1) source distributions  retain this entire  copyright notice and
comment, and (2) distributions including  binaries display the following
acknowledgement: "This product  includes  software  developed  by   The
University  of California,   Berkeley  and its  Contributors"  in   the
documentation  or other materials provided with  the distribution and in
all advertising materials mentioning  features  or use of this software.
neither the name of the University nor the names of its Contributors may
be  used   to endorse or promote   products  derived from  this software
without specific prior written permission.

<p>
THIS SOFTWARE IS  PROVIDED "AS IS"  AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING,  WITHOUT  LIMITATION,  THE IMPLIED  WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.



<h1><a name="SEC3" href="amdref_toc.html#SEC3">Source Distribution</a></h1>
<p>
If you have access to the Internet, you can get the latest distribution
version of <i>Amd</i> from host <tt>`usc.edu'</tt> using anonymous FTP.  Move to
the directory <tt>`/pub/amd'</tt> on that host and fetch the file <tt>`amd.tar.Z'</tt>.

<p>
If you are in the UK, you can get the latest distribution version of
<i>Amd</i> from the UKnet info-server.  Start by sending email to
<tt>`info-server@doc.ic.ac.uk'</tt>.

<p>
Sites on the UK JANET network can get the latest distribution by using
anonymous NIFTP to fetch the file <samp>`&#60;AMD&#62;amd.tar.Z'</samp> from host
<samp>`uk.ac.imperial.doc.src'</samp>.

<p>
Revision 5.2 was part of the 4.3 BSD Reno distribution.

<p>
Revision 5.3bsdnet, a late alpha version of 5.3, was part
of the BSD network version 2 distribution



<h2><a name="SEC4" href="amdref_toc.html#SEC4">Bug Reports</a></h2>
<p>
Send all bug reports to <tt>`jsp@doc.ic.ac.uk'</tt> quoting the details of
the release and your configuration.  These can be obtained by running
the command <samp>`amd -v'</samp>.



<h2><a name="SEC5" href="amdref_toc.html#SEC5">Mailing List</a></h2>
<p>

There is a mailing list for people interested in keeping uptodate with
developments.  To subscribe, send a note to <tt>`amd-workers-request@acl.lanl.gov'</tt>.



<h1><a name="SEC6" href="amdref_toc.html#SEC6">Introduction</a></h1>
<p>

An <strong>automounter</strong> maintains a cache of mounted filesystems.
Filesystems are mounted on demand when they are first referenced,
and unmounted after a period of inactivity.

<p>
<i>Amd</i> may be used as a replacement for Sun's automounter.  The choice
of which filesystem to mount can be controlled dynamically with
<strong>selectors</strong>.  Selectors allow decisions of the form "hostname is
<var>this</var>," or "architecture is not <var>that</var>."  Selectors may be
combined arbitrarily.  <i>Amd</i> also supports a variety of filesystem
types, including NFS, UFS and the novel <strong>program</strong> filesystem.  The
combination of selectors and multiple filesystem types allows identical
configuration files to be used on all machines so reducing the
administrative overhead.

<p>
<i>Amd</i> ensures that it will not hang if a remote server goes down.
Moreover, <i>Amd</i> can determine when a remote server has become
inaccessible and then mount replacement filesystems as and when they
become available.

<p>
<i>Amd</i> contains no proprietary source code and has been ported to
numerous flavours of Unix.



<h1><a name="SEC7" href="amdref_toc.html#SEC7">Overview</a></h1>

<p>
<i>Amd</i> maintains a cache of mounted filesystems.  Filesystems are
<strong>demand-mounted</strong> when they are first referenced, and unmounted after
a period of inactivity.  <i>Amd</i> may be used as a replacement for Sun's
<b>automount</b>(8) program.  It contains no proprietary source code and
has been ported to numerous flavours of Unix.  See section <a href="amdref.html#SEC18">Supported Operating Systems</a>.
<p>
<i>Amd</i> was designed as the basis for experimenting with filesystem
layout and management.  Although <i>Amd</i> has many direct applications it
is loaded with additional features which have little practical use.  At
some point the infrequently used components may be removed to streamline
the production system.




<h2><a name="SEC8" href="amdref_toc.html#SEC8">Fundamentals</a></h2>
<p>

The fundamental concept behind <i>Amd</i> is the ability to separate the
name used to refer to a file from the name used to refer to its physical
storage location.  This allows the same files to be accessed with the
same name regardless of where in the network the name is used.  This is
very different from placing <tt>`/n/hostname'</tt> in front of the pathname
since that includes location dependent information which may change if
files are moved to another machine.

<p>
By placing the required mappings in a centrally administered database,
filesystems can be re-organised without requiring changes to
configuration files, shell scripts and so on.



<h2><a name="SEC9" href="amdref_toc.html#SEC9">Filesystems and Volumes</a></h2>
<p>

<i>Amd</i> views the world as a set of fileservers, each containing one or
more filesystems where each filesystem contains one or more
<strong>volumes</strong>.  Here the term <strong>volume</strong> is used to refer to a
coherent set of files such as a user's home directory or a TeX
distribution.
<p>
In order to access the contents of a volume, <i>Amd</i> must be told in
which filesystem the volume resides and which host owns the filesystem.
By default the host is assumed to be local and the volume is assumed to
be the entire filesystem.  If a filesystem contains more than one
volume, then a <strong>sublink</strong> is used to refer to the sub-directory
within the filesystem where the volume can be found.



<h2><a name="SEC10" href="amdref_toc.html#SEC10">Volume Naming</a></h2>
<p>

Volume names are defined to be unique across the entire network.  A
volume name is the pathname to the volume's root as known by the users
of that volume.  Since this name uniquely identifies the volume
contents, all volumes can be named and accessed from each host, subject
to administrative controls.

<p>
Volumes may be replicated or duplicated.  Replicated volumes contain
identical copies of the same data and reside at two or more locations in
the network.  Each of the replicated volumes can be used
interchangeably.  Duplicated volumes each have the same name but contain
different, though functionally identical, data.  For example,
<samp>`/vol/tex'</samp> might be the name of a TeX distribution which varied
for each machine architecture.
<p>
<i>Amd</i> provides facilities to take advantage of both replicated and
duplicated volumes.  Configuration options allow a single set of
configuration data to be shared across an entire network by taking
advantage of replicated and duplicated volumes.

<p>
<i>Amd</i> can take advantage of replacement volumes by mounting them as
required should an active fileserver become unavailable.



<h2><a name="SEC11" href="amdref_toc.html#SEC11">Volume Binding</a></h2>
<p>

Unix implements a namespace of hierarchically mounted filesystems.  Two
forms of binding between names and files are provided.  A <strong>hard
link</strong> completes the binding when the name is added to the filesystem.  A
<strong>soft link</strong> delays the binding until the name is accessed.  An
<strong>automounter</strong> adds a further form in which the binding of name to
filesystem is delayed until the name is accessed.
<p>
The target volume, in its general form, is a tuple (host, filesystem,
sublink) which can be used to name the physical location of any volume
in the network.

<p>
When a target is referenced, <i>Amd</i> ignores the sublink element and
determines whether the required filesystem is already mounted.  This is
done by computing the local mount point for the filesystem and checking
for an existing filesystem mounted at the same place.  If such a
filesystem already exists then it is assumed to be functionally
identical to the target filesystem.  By default there is a one-to-one
mapping between the pair (host, filesystem) and the local mount point so
this assumption is valid.



<h2><a name="SEC12" href="amdref_toc.html#SEC12">Operational Principles</a></h2>
<p>

<i>Amd</i> operates by introducing new mount points into the namespace.
These are called <strong>automount</strong> points.  The kernel sees these
automount points as NFS filesystems being served by <i>Amd</i>.  Having
attached itself to the namespace, <i>Amd</i> is now able to control the
view the rest of the system has of those mount points.  RPC calls are
received from the kernel one at a time.

<p>
When a <strong>lookup</strong> call is received <i>Amd</i> checks whether the name is
already known.  If it is not, the required volume is mounted.  A
symbolic link pointing to the volume root is then returned.  Once the
symbolic link is returned, the kernel will send all other requests
direct to the mounted filesystem.

<p>
If a volume is not yet mounted, <i>Amd</i> consults a configuration
<strong>mount-map</strong> corresponding to the automount point.  <i>Amd</i> then
makes a runtime decision on what and where to mount a filesystem based
on the information obtained from the map.

<p>
<i>Amd</i> does not implement all the NFS requests; only those relevant
to name binding such as <strong>lookup</strong>, <strong>readlink</strong> and <strong>readdir</strong>.
Some other calls are also implemented but most simply return an error
code; for example <strong>mkdir</strong> always returns "read-only filesystem".



<h2><a name="SEC13" href="amdref_toc.html#SEC13">Mounting a Volume</a></h2>
<p>

Each automount point has a corresponding mount map.  The mount map
contains a list of key--value pairs.  The key is the name of the volume
to be mounted.  The value is a list of locations describing where the
filesystem is stored in the network.  In the source for the map the
value would look like


<pre>
location1  location2  ...  locationN
</pre>

<p>
<i>Amd</i> examines each location in turn.  Each location may contain
<strong>selectors</strong> which control whether <i>Amd</i> can use that location.
For example, the location may be restricted to use by certain hosts.
Those locations which cannot be used are ignored.

<p>
<i>Amd</i> attempts to mount the filesystem described by each remaining
location until a mount succeeds or <i>Amd</i> can no longer proceed.  The
latter can occur in three ways:


<ul>
<li>

If none of the locations could be used, or if all of the locations
caused an error, then the last error is returned.

<li>

If a location could be used but was being mounted in the background then
<i>Amd</i> marks that mount as being "in progress" and continues with
the next request; no reply is sent to the kernel.

<li>

Lastly, one or more of the mounts may have been <strong>deferred</strong>.  A mount
is deferred if extra information is required before the mount can
proceed.  When the information becomes available the mount will take
place, but in the mean time no reply is sent to the kernel.  If the
mount is deferred, <i>Amd</i> continues to try any remaining locations.
</ul>

<p>
Once a volume has been mounted, <i>Amd</i> establishes a <strong>volume
mapping</strong> which is used to satisfy subsequent requests.


<h2><a name="SEC14" href="amdref_toc.html#SEC14">Automatic Unmounting</a></h2>

<p>
To avoid an ever increasing number of filesystem mounts, <i>Amd</i> removes
volume mappings which have not been used recently.  A time-to-live
interval is associated with each mapping and when that expires the
mapping is removed.  When the last reference to a filesystem is removed,
that filesystem is unmounted.  If the unmount fails, for example the
filesystem is still busy, the mapping is re-instated and its
time-to-live interval is extended.  The global default for this grace
period is controlled by the "-w" command-line option (see section <a href="amdref.html#SEC51"><code>-w</code> <var>wait-timeout</var></a>).  It is also possible to set this value on a per-mount
basis (see section <a href="amdref.html#SEC36">opts Option</a>).
<p>
Filesystems can be forcefully timed out using the <i>Amq</i> command.
See section <a href="amdref.html#SEC71">Run-time Administration</a>.



<h2><a name="SEC15" href="amdref_toc.html#SEC15">Keep-alives</a></h2>
<p>

Use of some filesystem types requires the presence of a server on
another machine.  If a machine crashes then it is of no concern to
processes on that machine that the filesystem is unavailable.  However,
to processes on a remote host using that machine as a fileserver this
event is important.  This situation is most widely recognised when an
NFS server crashes and the behaviour observed on client machines is that
more and more processes hang.  In order to provide the possibility of
recovery, <i>Amd</i> implements a <strong>keep-alive</strong> interval timer for some
filesystem types.  Currently only NFS makes use of this service.

<p>
The basis of the NFS keep-alive implementation is the observation that
most sites maintain replicated copies of common system data such as
manual pages, most or all programs, system source code and so on.  If
one of those servers goes down it would be reasonable to mount one of
the others as a replacement.

<p>
The first part of the process is to keep track of which fileservers are
up and which are down.  <i>Amd</i> does this by sending RPC requests to the
servers' NFS <code>NullProc</code> and checking whether a reply is returned.
While the server state is uncertain the requests are re-transmitted at
three second intervals and if no reply is received after four attempts
the server is marked down.  If a reply is received the fileserver is
marked up and stays in that state for 30 seconds at which time another
NFS ping is sent.

<p>
Once a fileserver is marked down, requests continue to be sent every 30
seconds in order to determine when the fileserver comes back up.  During
this time any reference through <i>Amd</i> to the filesystems on that
server fail with the error "Operation would block".  If a replacement
volume is available then it will be mounted, otherwise the error is
returned to the user.

<p>
Although this action does not protect user files, which are unique on
the network, or processes which do not access files via <i>Amd</i> or
already have open files on the hung filesystem, it can prevent most new
processes from hanging.

<p>
By default, fileserver state is not maintained for NFS/TCP mounts.  The
remote fileserver is always assumed to be up.



<h2><a name="SEC16" href="amdref_toc.html#SEC16">Non-blocking Operation</a></h2>
<p>

Since there is only one instance of <i>Amd</i> for each automount point,
and usually only one instance on each machine, it is important that it
is always available to service kernel calls.  <i>Amd</i> goes to great
lengths to ensure that it does not block in a system call.  As a last
resort <i>Amd</i> will fork before it attempts a system call that may block
indefinitely, such as mounting an NFS filesystem.  Other tasks such as
obtaining filehandle information for an NFS filesystem, are done using a
purpose built non-blocking RPC library which is integrated with
<i>Amd</i>'s task scheduler.  This library is also used to implement NFS
keep-alives (see section <a href="amdref.html#SEC15">Keep-alives</a>).

<p>
Whenever a mount is deferred or backgrounded, <i>Amd</i> must wait for it
to complete before replying to the kernel.  However, this would cause
<i>Amd</i> to block waiting for a reply to be constructed.  Rather than do
this, <i>Amd</i> simply <strong>drops</strong> the call under the assumption that the
kernel RPC mechanism will automatically retry the request.



<h1><a name="SEC17" href="amdref_toc.html#SEC17">Supported Platforms</a></h1>

<p>
<i>Amd</i> has been ported to a wide variety of machines and operating systems.
The table below lists those platforms supported by the current release.




<h2><a name="SEC18" href="amdref_toc.html#SEC18">Supported Operating Systems</a></h2>

<p>
The following operating systems are currently supported by <i>Amd</i>.
<i>Amd</i>'s conventional name for each system is given.

<dl compact>

<dt><code>acis43</code>
<dd>
4.3 BSD for IBM RT.  Contributed by Jan-Simon Pendry <tt>&#60;jsp@doc.ic.ac.uk&#62;</tt>
<dt><code>aix3</code>
<dd>
AIX 3.1.  Contributed by Jan-Simon Pendry <tt>&#60;jsp@doc.ic.ac.uk&#62;</tt>
<dt><code>aux</code>
<dd>
System V for Mac-II.  Contributed by Julian Onions <tt>&#60;jpo@cs.nott.ac.uk&#62;</tt>
<dt><code>bsd44</code>
<dd>
4.4 BSD.  Contributed by Jan-Simon Pendry <tt>&#60;jsp@doc.ic.ac.uk&#62;</tt>
<dt><code>concentrix</code>
<dd>
Concentrix 5.0.  Contributed by Sjoerd Mullender <tt>&#60;sjoerd@cwi.nl&#62;</tt>
<dt><code>convex</code>
<dd>
Convex OS 7.1.  Contributed by Eitan Mizrotsky <tt>&#60;eitan@shumuji.ac.il&#62;</tt>
<dt><code>dgux</code>
<dd>
Data General DG/UX.  Contributed by Mark Davies <tt>&#60;mark@comp.vuw.ac.nz&#62;</tt>
<dt><code>fpx4</code>
<dd>
Celerity FPX 4.1/2.  Contributed by Stephen Pope <tt>&#60;scp@grizzly.acl.lanl.gov&#62;</tt>
<dt><code>hcx</code>
<dd>
Harris HCX/UX.  Contributed by Chris Metcalf <tt>&#60;metcalf@masala.lcs.mit.edu&#62;</tt>
<dt><code>hlh42</code>
<dd>
HLH OTS 1.<i>x</i> (4.2 BSD).  Contributed by Jan-Simon Pendry <tt>&#60;jsp@doc.ic.ac.uk&#62;</tt>
<dt><code>hpux</code>
<dd>
HP-UX 6.<i>x</i> or 7.0.  Contributed by Jan-Simon Pendry <tt>&#60;jsp@doc.ic.ac.uk&#62;</tt>
<dt><code>irix</code>
<dd>
SGI Irix.  Contributed by Scott R. Presnell <tt>&#60;srp@cgl.ucsf.edu&#62;</tt>
<dt><code>next</code>
<dd>
Mach for NeXT.  Contributed by Bill Trost <tt>&#60;trost%reed@cse.ogi.edu&#62;</tt>
<dt><code>pyrOSx</code>
<dd>
Pyramid OSx.  Contributed by Stefan Petri <tt>&#60;petri@tubsibr.UUCP&#62;</tt>
<dt><code>riscix</code>
<dd>
Acorn RISC iX.  Contributed by Piete Brooks <tt>&#60;pb@cam.cl.ac.uk&#62;</tt>
<dt><code>sos3</code>
<dd>
SunOS 3.4 &#38; 3.5.  Contributed by Jan-Simon Pendry <tt>&#60;jsp@doc.ic.ac.uk&#62;</tt>
<dt><code>sos4</code>
<dd>
SunOS 4.<i>x</i>.  Contributed by Jan-Simon Pendry <tt>&#60;jsp@doc.ic.ac.uk&#62;</tt>
<dt><code>u2_2</code>
<dd>
Ultrix 2.2.  Contributed by Piete Brooks <tt>&#60;pb@cam.cl.ac.uk&#62;</tt>
<dt><code>u3_0</code>
<dd>
Ultrix 3.  Contributed by Piete Brooks <tt>&#60;pb@cam.cl.ac.uk&#62;</tt>
<dt><code>u4_0</code>
<dd>
Ultrix 4.0.  Contributed by Chris Lindblad <tt>&#60;cjl@ai.mit.edu&#62;</tt>
<dt><code>umax43</code>
<dd>
Umax 4.3 BSD.  Contributed by Sjoerd Mullender <tt>&#60;sjoerd@cwi.nl&#62;</tt>
<dt><code>utek</code>
<dd>
Utek 4.0.  Contributed by Bill Trost <tt>&#60;trost%reed@cse.ogi.edu&#62;</tt>
<dt><code>xinu43</code>
<dd>
mt Xinu MORE/bsd.  Contributed by Jan-Simon Pendry <tt>&#60;jsp@doc.ic.ac.uk&#62;</tt>
<dt><code>linux</code>
<dd>
Linux i386/i486. Contributed by Mitchum D'Souza <tt>&#60;m.dsouza@mrc-apu.cam.ac.uk&#62;</tt>
</DL>



<h2><a name="SEC19" href="amdref_toc.html#SEC19">Supported Machine Architectures</a></h2>
<p>

<dl compact>

<dt><code>alliant</code>
<dd>
Alliant FX/4
<dt><code>arm</code>
<dd>
Acorn ARM
<dt><code>aviion</code>
<dd>
Data General AViiON
<dt><code>encore</code>
<dd>
Encore
<dt><code>fps500</code>
<dd>
FPS Model 500
<dt><code>hp9000</code>
<dd>
HP 9000/300 family
<dt><code>hp9k8</code>
<dd>
HP 9000/800 family
<dt><code>ibm032</code>
<dd>
IBM RT
<dt><code>ibm6000</code>
<dd>
IBM RISC System/6000
<dt><code>iris4d</code>
<dd>
SGI Iris 4D
<dt><code>macII</code>
<dd>
Apple Mac II
<dt><code>mips</code>
<dd>
MIPS RISC
<dt><code>multimax</code>
<dd>
Encore Multimax
<dt><code>orion105</code>
<dd>
HLH Orion 1/05
<dt><code>sun3</code>
<dd>
Sun-3 family
<dt><code>sun4</code>
<dd>
Sun-4 family
<dt><code>tahoe</code>
<dd>
Tahoe family
<dt><code>vax</code>
<dd>
DEC Vax
<dt><code>linux</code>
<dd>
i386/i486 family
</DL>



<h1><a name="SEC20" href="amdref_toc.html#SEC20">Mount Maps</a></h1>
<p>

<i>Amd</i> has no built-in knowledge of machines or filesystems.
External <strong>mount-maps</strong> are used to provide the required information.
Specifically, <i>Amd</i> needs to know when and under what conditions it
should mount filesystems.

<p>
The map entry corresponding to the requested name contains a list of
possible locations from which to resolve the request.  Each location
specifies filesystem type, information required by that filesystem (for
example the block special device in the case of UFS), and some
information describing where to mount the filesystem (see section <a href="amdref.html#SEC35">fs Option</a>).  A
location may also contain <strong>selectors</strong> (see section <a href="amdref.html#SEC32">Selectors</a>).



<h2><a name="SEC21" href="amdref_toc.html#SEC21">Map Types</a></h2>
<p>

A mount-map provides the run-time configuration information to <i>Amd</i>.
Maps can be implemented in many ways.  Some of the forms supported by
<i>Amd</i> are regular files, ndbm databases, NIS maps the <strong>Hesiod</strong>
name server and even the password file.

<p>
A mount-map <strong>name</strong> is a sequence of characters.  When an automount
point is created a handle on the mount-map is obtained.  For each map
type configured <i>Amd</i> attempts to reference the a map of the
appropriate type.  If a map is found, <i>Amd</i> notes the type for future
use and deletes the reference, for example closing any open file
descriptors.  The available maps are configure when <i>Amd</i> is built and
can be displayed by running the command <samp>`amd -v'</samp>.

<p>
By default, <i>Amd</i> caches data in a mode dependent on the type of map.
This is the same as specifying <samp>`cache:=mapdefault'</samp> and selects a
suitable default cache mode depending on the map type.  The individual
defaults are described below.  The <var>cache</var> option can be specified
on automount points to alter the caching behaviour (see section <a href="amdref.html#SEC64">Automount Filesystem (<samp>`type:=auto'</samp>)</a>).
<p>
The following map types have been implemented, though some are not
available on all machines.  Run the command <samp>`amd -v'</samp> to obtain a
list of map types configured on your machine.




<h3><a name="SEC22" href="amdref_toc.html#SEC22">File maps</a></h3>
<p>

When <i>Amd</i> searches a file for a map entry it does a simple scan of
the file and supports both comments and continuation lines.

<p>
Continuation lines are indicated by a backslash character (<samp>`\'</samp>) as
the last character of a line in the file.  The backslash, newline character
<em>and any leading white space on the following line</em> are discarded.  A maximum
line length of 2047 characters is enforced after continuation lines are read
but before comments are stripped.  Each line must end with
a newline character; that is newlines are terminators, not separators.
The following examples illustrate this:


<pre>
key     valA   valB;   \
          valC
</pre>

<p>
specifies <em>three</em> locations, and is identical to


<pre>
key     valA   valB;   valC
</pre>

<p>
However,


<pre>
key     valA   valB;\
          valC
</pre>

<p>
specifies only <em>two</em> locations, and is identical to


<pre>
key     valA   valB;valC
</pre>

<p>
After a complete line has been read from the file, including
continuations, <i>Amd</i> determines whether there is a comment on the
line.  A comment begins with a hash ("<samp>`#'</samp>") character and
continues to the end of the line.  There is no way to escape or change
the comment lead-in character.

<p>
Note that continuation lines and comment support <strong>only</strong> apply to
file maps, or ndbm maps built with the <code>mk-amd-map</code> program.

<p>
When caching is enabled, file maps have a default cache mode of
<code>all</code> (see section <a href="amdref.html#SEC64">Automount Filesystem (<samp>`type:=auto'</samp>)</a>).



<h3><a name="SEC23" href="amdref_toc.html#SEC23">ndbm maps</a></h3>
<p>

An ndbm map may be used as a fast access form of a file map.  The program,
<code>mk-amd-map</code>, converts a normal map file into an ndbm database.
This program supports the same continuation and comment conventions that
are provided for file maps.  Note that ndbm format files may <em>not</em>
be sharable across machine architectures.  The notion of speed generally
only applies to large maps; a small map, less than a single disk block,
is almost certainly better implemented as a file map.

<p>
ndbm maps do not support cache mode <samp>`all'</samp> and, when caching is
enabled, have a default cache mode of <samp>`inc'</samp> (see section <a href="amdref.html#SEC64">Automount Filesystem (<samp>`type:=auto'</samp>)</a>).



<h3><a name="SEC24" href="amdref_toc.html#SEC24">NIS maps</a></h3>
<p>

When using NIS (formerly YP), an <i>Amd</i> map is implemented directly
by the underlying NIS map.  Comments and continuation lines are
<em>not</em> supported in the automounter and must be stripped when
constructing the NIS server's database.

<p>
NIS maps do not support cache mode <code>all</code> and, when caching is
enabled, have a default cache mode of <code>inc</code> (see section <a href="amdref.html#SEC64">Automount Filesystem (<samp>`type:=auto'</samp>)</a>).

<p>
The following rule illustrates what could be added to your NIS <tt>`Makefile'</tt>,
in this case causing the <tt>`amd.home'</tt> map to be rebuilt:

<pre>
$(YPTSDIR)/amd.home.time: $(ETCDIR)/amd.home
        -@sed -e "s/#.*$$//" -e "/^$$/d" $(ETCDIR)/amd.home | \
          awk '{  \
                 for (i = 1; i &#60;= NF; i++) \
                     if (i == NF) { \
                         if (substr($$i, length($$i), 1) == "\\") \
                             printf("%s", substr($$i, 1, length($$i) - 1)); \
                         else \
                             printf("%s\n", $$i); \
                     } \
                     else \
                         printf("%s ", $$i); \
             }' | \
        $(MAKEDBM) - $(YPDBDIR)/amd.home; \
        touch $(YPTSDIR)/amd.home.time; \
        echo "updated amd.home"; \
        if [ ! $(NOPUSH) ]; then \
                $(YPPUSH) amd.home; \
                echo "pushed amd.home"; \
        else \
                : ; \
        fi
</pre>

<p>
Here <code>$(YPTSDIR)</code> contains the time stamp files, and <code>$(YPDBDIR)</code> contains
the dbm format NIS files.



<h3><a name="SEC25" href="amdref_toc.html#SEC25">Hesiod maps</a></h3>
<p>

When the map name begins with the string <samp>`hesiod.'</samp> lookups are made
using the <strong>Hesiod</strong> name server.  The string following the dot is
used as a name qualifier and is prepended with the key being located.
The entire string is then resolved in the <code>automount</code> context.  For
example, if the key is <samp>`jsp'</samp> and map name is
<samp>`hesiod.homes'</samp> then <strong>Hesiod</strong> is asked to resolve
<samp>`jsp.homes.automount'</samp>.

<p>
Hesiod maps do not support cache mode <samp>`all'</samp> and, when caching is
enabled, have a default cache mode of <samp>`inc'</samp> (see section <a href="amdref.html#SEC64">Automount Filesystem (<samp>`type:=auto'</samp>)</a>).

<p>
The following is an example of a <strong>Hesiod</strong> map entry:


<pre>
jsp.homes.automount HS TXT "rfs:=/home/charm;rhost:=charm;sublink:=jsp"
njw.homes.automount HS TXT "rfs:=/home/dylan/dk2;rhost:=dylan;sublink:=njw"
</pre>



<h3><a name="SEC26" href="amdref_toc.html#SEC26">Password maps</a></h3>
<p>

The password map support is unlike the four previous map types.  When
the map name is the string <tt>`/etc/passwd'</tt> <i>Amd</i> can lookup a user
name in the password file and re-arrange the home directory field to
produce a usable map entry.

<p>
<i>Amd</i> assumes the home directory has the format
`<tt>/</tt><i>anydir</i><tt>/</tt><i>dom1</i><tt>/../</tt><i>domN</i><tt>/</tt><i>login</i>'.
It breaks this string into a map entry where <code>${rfs}</code> has the
value `<tt>/</tt><i>anydir</i><tt>/</tt><i>domN</i>', <code>${rhost}</code> has the value
`<i>domN</i><tt>.</tt><i>...</i><tt>.</tt><i>dom1</i>', and <code>${sublink}</code> has the
value <samp>`login'</samp>.
<p>
Thus if the password file entry was


<pre>
/home/achilles/jsp
</pre>

<p>
the map entry used by <i>Amd</i> would be


<pre>
rfs:=/home/achilles;rhost:=achilles;sublink:=jsp
</pre>

<p>
Similarly, if the password file entry was


<pre>
/home/cc/sugar/mjh
</pre>

<p>
the map entry used by <i>Amd</i> would be 


<pre>
rfs:=/home/sugar;rhost:=sugar.cc;sublink:=jsp
</pre>



<h3><a name="SEC27" href="amdref_toc.html#SEC27">Union maps</a></h3>
<p>

The union map support is provided specifically for use with the union
filesystem, see section <a href="amdref.html#SEC66">Union Filesystem (<samp>`type:=union'</samp>)</a>.

<p>
It is identified by the string <samp>`union:'</samp> which is followed by a
colon separated list of directories.  The directories are read in order,
and the names of all entries are recorded in the map cache.  Later
directories take precedence over earlier ones.  The union filesystem
type then uses the map cache to determine the union of the names in all
the directories.




<h2><a name="SEC28" href="amdref_toc.html#SEC28">How keys are looked up</a></h2>
<p>

The key is located in the map whose type was determined when the
automount point was first created.  In general the key is a pathname
component.  In some circumstances this may be modified by variable
expansion (see section <a href="amdref.html#SEC31">Variable Expansion</a>) and prefixing.  If the automount
point has a prefix, specified by the <var>pref</var> option, then that is
prepended to the search key before the map is searched.

<p>
If the map cache is a <samp>`regexp'</samp> cache then the key is treated as an
egrep-style regular expression, otherwise a normal string comparison is
made.

<p>
If the key cannot be found then a <strong>wildcard</strong> match is attempted.
<i>Amd</i> repeatedly strips the basename from the key, appends <samp>`/*'</samp> and
attempts a lookup.  Finally, <i>Amd</i> attempts to locate the special key <samp>`*'</samp>.

<p>
For example, the following sequence would be checked if <tt>`home/dylan/dk2'</tt> was
being located:


<pre>
   home/dylan/dk2
   home/dylan/*
   home/*
   *
</pre>

<p>
At any point when a wildcard is found, <i>Amd</i> proceeds as if an exact
match had been found and the value field is then used to resolve the
mount request, otherwise an error code is propagated back to the kernel.
(see section <a href="amdref.html#SEC56">Filesystem Types</a>).


<h2><a name="SEC29" href="amdref_toc.html#SEC29">Location Format</a></h2>
<p>

The value field from the lookup provides the information required to
mount a filesystem.  The information is parsed according to the syntax
shown below.


<pre>
<i>location-list</i>:
                  <i>location-selection</i>
                  <i>location-list</i> <i>white-space</i> <tt>||</tt> <i>white-space</i> <i>location-selection</i>
<i>location-selection</i>:
                  <i>location</i>
                  <i>location-selection</i> <i>white-space</i> <i>location</i>
<i>location</i>:
                  <i>location-info</i>
                  <tt>-</tt><i>location-info</i>
                  <tt>-</tt>
<i>location-info</i>:
                  <i>sel-or-opt</i>
                  <i>location-info</i><tt>;</tt><i>sel-or-opt</i>
                  <tt>;</tt>
<i>sel-or-opt</i>:
                  <i>selection</i>
                  <i>opt-ass</i>
<i>selection</i>:
                  selector<tt>==</tt><i>value</i>
                  selector<tt>!=</tt><i>value</i>
<i>opt-ass</i>:
                  option<tt>:=</tt><i>value</i>
<i>white-space</i>:
                  space
                  tab
</pre>

<p>
Note that unquoted whitespace is not allowed in a location description.
White space is only allowed, and is mandatory, where shown with non-terminal
<samp>`white-space'</samp>.

<p>
A <strong>location-selection</strong> is a list of possible volumes with which to
satisfy the request.  <strong>location-selection</strong>s are separated by the
<samp>`||'</samp> operator.  The effect of this operator is to prevent use of
location-selections to its right if any of the location-selections on
its left were selected whether or not any of them were successfully
mounted (see section <a href="amdref.html#SEC32">Selectors</a>).
<p>
The location-selection, and singleton <strong>location-list</strong>,
<samp>`type:=ufs;dev:=/dev/xd1g'</samp> would inform <i>Amd</i> to mount a UFS
filesystem from the block special device <tt>`/dev/xd1g'</tt>.

<p>
The <strong>sel-or-opt</strong> component is either the name of an option required
by a specific filesystem, or it is the name of a built-in, predefined
selector such as the architecture type.  The value may be quoted with
double quotes <samp>`"'</samp>, for example
<samp>`type:="ufs";dev:="/dev/xd1g"'</samp>.  These quotes are stripped when the
value is parsed and there is no way to get a double quote into a value
field.  Double quotes are used to get white space into a value field,
which is needed for the program filesystem (see section <a href="amdref.html#SEC61">Program Filesystem (<samp>`type:=program'</samp>)</a>).



<h3><a name="SEC30" href="amdref_toc.html#SEC30">Map Defaults</a></h3>
<p>

A location beginning with a dash <samp>`-'</samp> is used to specify default
values for subsequent locations.  Any previously specified defaults in
the location-list are discarded.  The default string can be empty in
which case no defaults apply.

<p>
The location <samp>`-fs:=/mnt;opts:=ro'</samp> would set the local mount point
to <tt>`/mnt'</tt> and cause mounts to be read-only by default.  Defaults
specified this way are appended to, and so override, any global map
defaults given with <samp>`/defaults'</samp>).



<h3><a name="SEC31" href="amdref_toc.html#SEC31">Variable Expansion</a></h3>
<p>

To allow generic location specifications <i>Amd</i> does variable expansion
on each location and also on some of the option strings.  Any option or
selector appearing in the form <code>$<strong>var</strong></code> is replaced by the
current value of that option or selector.  For example, if the value of
<code>${key}</code> was <samp>`bin'</samp>, <code>${autodir}</code> was <samp>`/a'</samp> and
<code>${fs}</code> was `<tt>${autodir}</tt><tt>/local/</tt><tt>${key}</tt>' then
after expansion <code>${fs}</code> would have the value <samp>`/a/local/bin'</samp>.
Any environment variable can be accessed in a similar way.
<p>
Two pathname operators are available when expanding a variable.  If the
variable name begins with <samp>`/'</samp> then only the last component of
then pathname is substituted.  For example, if <code>${path}</code> was
<samp>`/foo/bar'</samp> then <code>${/path}</code> would be expanded to <samp>`bar'</samp>.
Similarly, if the variable name ends with <samp>`/'</samp> then all but the
last component of the pathname is substituted.  In the previous example,
<code>${path/}</code> would be expanded to <samp>`/foo'</samp>.
<p>
Two domain name operators are also provided.  If the variable name
begins with <samp>`.'</samp> then only the domain part of the name is
substituted.  For example, if <code>${rhost}</code> was
<samp>`swan.doc.ic.ac.uk'</samp> then <code>${.rhost}</code> would be expanded to
<samp>`doc.ic.ac.uk'</samp>.  Similarly, if the variable name ends with <samp>`.'</samp>
then only the host component is substituted.  In the previous example,
<code>${rhost.}</code> would be expanded to <samp>`swan'</samp>.
<p>
Variable expansion is a two phase process.  Before a location is parsed,
all references to selectors, <i>eg</i> <code>${path}</code>, are expanded.  The
location is then parsed, selections are evaluated and option assignments
recorded.  If there were no selections or they all succeeded the
location is used and the values of the following options are expanded in
the order given: <var>sublink</var>, <var>rfs</var>, <var>fs</var>, <var>opts</var>,
<var>remopts</var>, <var>mount</var> and <var>unmount</var>.

<p>
Note that expansion of option values is done after <strong>all</strong> assignments
have been completed and not in a purely left to right order as is done
by the shell.  This generally has the desired effect but care must be
taken if one of the options references another, in which case the
ordering can become significant.

<p>
There are two special cases concerning variable expansion:


<ol>
<li>

before a map is consulted, any selectors in the name received
from the kernel are expanded.  For example, if the request from the
kernel was for `<tt>${arch}</tt><tt>.bin</tt>' and the machine architecture
was <samp>`vax'</samp>, the value given to <code>${key}</code> would be
<samp>`vax.bin'</samp>.
<li>

the value of <code>${rhost}</code> is expanded and normalized before the
other options are expanded.  The normalization process strips any local
sub-domain components.  For example, if <code>${domain}</code> was
<samp>`Berkeley.EDU'</samp> and <code>${rhost}</code> was initially
<samp>`snow.Berkeley.EDU'</samp>, after the normalization it would simply be
<samp>`snow'</samp>.  Hostname normalization is currently done in a
<em>case-dependent</em> manner.</ol>



<h3><a name="SEC32" href="amdref_toc.html#SEC32">Selectors</a></h3>
<p>

Selectors are used to control the use of a location.  It is possible to
share a mount map between many machines in such a way that filesystem
location, architecture and operating system differences are hidden from
the users.  A selector of the form <samp>`arch==sun3;os==sos4'</samp> would only
apply on Sun-3s running SunOS 4.x.

<p>
Selectors are evaluated left to right.  If a selector fails then that
location is ignored.  Thus the selectors form a conjunction and the
locations form a disjunction.  If all the locations are ignored or
otherwise fail then <i>Amd</i> uses the <strong>error</strong> filesystem
(see section <a href="amdref.html#SEC67">Error Filesystem (<samp>`type:=error'</samp>)</a>).  This is equivalent to having a location
<samp>`type:=error'</samp> at the end of each mount-map entry.
<p>
The selectors currently implemented are:

<dl compact>

<dt><a name="arch"><samp>`arch'</samp></a>
<dd>
 
the machine architecture which was automatically determined at compile
time.  The architecture type can be displayed by running the command
<samp>`amd -v'</samp>.  See section <a href="amdref.html#SEC19">Supported Machine Architectures</a>.
<dt><a name="autodir"><samp>`autodir'</samp></a>
<dd>

the default directory under which to mount filesystems.  This may be
changed by the "-a" command line option.  See the <var>fs</var> option.

<dt><a name="byte"><samp>`byte'</samp></a>
<dd>

the machine's byte ordering.  This is either <samp>`little'</samp>, indicating
little-endian, or <samp>`big'</samp>, indicating big-endian.  One possible use
is to share <samp>`rwho'</samp> databases (see section <a href="amdref.html#SEC124"><samp>`rwho'</samp> servers</a>).  Another is to
share ndbm databases, however this use can be considered a courageous
juggling act.

<dt><a name="cluster"><samp>`cluster'</samp></a>
<dd>
is provided as a hook for the name of the local cluster.  This can be
used to decide which servers to use for copies of replicated
filesystems.  <code>${cluster}</code> defaults to the value of
<code>${domain}</code> unless a different value is set with the "-C"
command line option.

<dt><a name="domain"><samp>`domain'</samp></a>
<dd>

the local domain name as specified by the "-d" command line option.
See <samp>`host'</samp>.

<dt><a name="host"><samp>`host'</samp></a>
<dd>

the local hostname as determined by <b>gethostname</b>(2).  If no domain
name was specified on the command line and the hostname contains a
period <samp>`.'</samp> then the string before the period is used as the
host name, and the string after the period is assigned to
<code>${domain}</code>.  For example, if the hostname is
<samp>`styx.doc.ic.ac.uk'</samp> then <code>host</code> would be <samp>`styx'</samp> and
<code>domain</code> would be <samp>`doc.ic.ac.uk'</samp>.  <code>hostd</code> would be
<samp>`styx.doc.ic.ac.uk'</samp>.
<dt><a name="hostd"><samp>`hostd'</samp></a>
<dd>

is <code>${host}</code> and <code>${domain}</code> concatenated with a
<samp>`.'</samp> inserted between them if required.  If <code>${domain}</code>
is an empty string then <code>${host}</code> and <code>${hostd}</code> will be
identical.

<dt><a name="karch"><samp>`karch'</samp></a>
<dd>
is provided as a hook for the kernel architecture.  This is used on
SunOS 4, for example, to distinguish between different <samp>`/usr/kvm'</samp>
volumes.  <code>${karch}</code> defaults to the value of <code>${arch}</code>
unless a different value is set with the "-k" command line option.

<dt><a name="os"><samp>`os'</samp></a>
<dd>
the operating system.  Like the machine architecture, this is
automatically determined at compile time.  The operating system name can
be displayed by running the command <samp>`amd -v'</samp>.  See section <a href="amdref.html#SEC18">Supported Operating Systems</a>.
</DL>

<p>
The following selectors are also provided.  Unlike the other selectors,
they vary for each lookup.  Note that when the name from the kernel is
expanded prior to a map lookup, these selectors are all defined as empty
strings.

<dl compact>

<dt><a name="key"><samp>`key'</samp></a>
<dd>
the name being resolved.  For example, if <tt>`/home'</tt> is an automount
point, then accessing <tt>`/home/foo'</tt> would set <code>${key}</code> to the
string <samp>`foo'</samp>.  The key is prefixed by the <var>pref</var> option set in
the parent mount point.  The default prefix is an empty string.  If the
prefix was <tt>`blah/'</tt> then <code>${key}</code> would be set to
<tt>`blah/foo'</tt>.
<dt><samp>`map'</samp>
<dd>
<a name="IDX110"></a>
<a name="IDX111"></a>
<a name="IDX112"></a>
the name of the mount map being used.

<dt><samp>`path'</samp>
<dd>
<a name="IDX113"></a>
<a name="IDX114"></a>
<a name="IDX115"></a>
the full pathname of the name being resolved.  For example
<tt>`/home/foo'</tt> in the example above.

<dt><samp>`wire'</samp>
<dd>
<a name="IDX116"></a>
<a name="IDX117"></a>
<a name="IDX118"></a>
the name of the network to which the primary network interface is
attached.  If a symbolic name cannot be found in the networks or hosts
database then dotted IP address format is used.  This value is also
output by the "-v" option.

</DL>

<p>
Selectors can be negated by using <samp>`!='</samp> instead of <samp>`=='</samp>.  For
example to select a location on all non-Vax machines the selector
<samp>`arch!=vax'</samp> would be used.



<h3><a name="SEC33" href="amdref_toc.html#SEC33">Map Options</a></h3>
<p>
<a name="IDX119"></a>
<a name="IDX120"></a>

<p>
Options are parsed concurrently with selectors.  The difference is that
when an option is seen the string following the <samp>`:='</samp> is
recorded for later use.  As a minimum the <var>type</var> option must be
specified.  Each filesystem type has other options which must also be
specified.  See section <a href="amdref.html#SEC56">Filesystem Types</a>, for details on the filesystem
specific options.
<p>
Superfluous option specifications are ignored and are not reported
as errors.

<p>
The following options apply to more than one filesystem type.




<h4><a name="SEC34" href="amdref_toc.html#SEC34">delay Option</a></h4>
<p>
<a name="IDX121"></a>
<a name="IDX122"></a>
<a name="IDX123"></a>
<a name="IDX124"></a>
<a name="IDX125"></a>
<a name="IDX126"></a>

<p>
The delay, in seconds, before an attempt will be made to mount from the current location.
Auxiliary data, such as network address, file handles and so on are computed
regardless of this value.

<p>
A delay can be used to implement the notion of primary and secondary file servers.
The secondary servers would have a delay of a few seconds,
thus giving the primary servers a chance to respond first.



<h4><a name="SEC35" href="amdref_toc.html#SEC35">fs Option</a></h4>
<p>
<a name="IDX127"></a>
<a name="IDX128"></a>
<a name="IDX129"></a>
<a name="IDX130"></a>

<p>
The local mount point.  The semantics of this option vary between
filesystems.

<p>
For NFS and UFS filesystems the value of <code>${fs}</code> is used as the
local mount point.  For other filesystem types it has other meanings
which are described in the section describing the respective filesystem
type.  It is important that this string uniquely identifies the
filesystem being mounted.  To satisfy this requirement, it should
contain the name of the host on which the filesystem is resident and the
pathname of the filesystem on the local or remote host.

<p>
The reason for requiring the hostname is clear if replicated filesystems
are considered.  If a fileserver goes down and a replacement filesystem
is mounted then the <strong>local</strong> mount point <strong>must</strong> be different from
that of the filesystem which is hung.  Some encoding of the filesystem
name is required if more than one filesystem is to be mounted from any
given host.

<p>
If the hostname is first in the path then all mounts from a particular
host will be gathered below a single directory.  If that server goes
down then the hung mount points are less likely to be accidentally
referenced, for example when <b>getwd</b>(3) traverses the namespace to
find the pathname of the current directory.

<p>
The <samp>`fs'</samp> option defaults to
<code>${autodir}/${rhost}${rfs}</code>.  In addition,
<samp>`rhost'</samp> defaults to the local host name (<code>${host}</code>) and
<samp>`rfs'</samp> defaults to the value of <code>${path}</code>, which is the full
path of the requested file; <samp>`/home/foo'</samp> in the example above
(see section <a href="amdref.html#SEC32">Selectors</a>).  <code>${autodir}</code> defaults to <samp>`/a'</samp> but may
be changed with the "-a" command line option.  Sun's automounter
defaults to <samp>`/tmp_mnt'</samp>.  Note that there is no <samp>`/'</samp> between
the <code>${rhost}</code> and <code>${rfs}</code> since <code>${rfs}</code> begins
with a <samp>`/'</samp>.


<h4><a name="SEC36" href="amdref_toc.html#SEC36">opts Option</a></h4>
<p>
<a name="IDX131"></a>
<a name="IDX132"></a>
<a name="IDX133"></a>
<a name="IDX134"></a>
<a name="IDX135"></a>
<a name="IDX136"></a>
<a name="IDX137"></a>

<p>
The options to pass to the mount system call.  A leading <samp>`-'</samp> is
silently ignored.  The mount options supported generally correspond to
those used by <b>mount</b>(8) and are listed below.  Some additional
pseudo-options are interpreted by <i>Amd</i> and are also listed.

<p>
Unless specifically overridden, each of the system default mount options
applies.  Any options not recognised are ignored.  If no options list is
supplied the string <samp>`rw,defaults'</samp> is used and all the system
default mount options apply.  Options which are not applicable for a
particular operating system are silently ignored.  For example, only 4.4
BSD is known to implement the <code>compress</code> and <code>spongy</code> options.

<dl compact>

<dt><code>compress</code>
<dd>
Use NFS compression protocol.
<dt><code>grpid</code>
<dd>
Use BSD directory group-id semantics.
<dt><code>intr</code>
<dd>
Allow keyboard interrupts on hard mounts.
<dt><code>noconn</code>
<dd>
Don't make a connection on datagram transports.
<dt><code>nocto</code>
<dd>
No close-to-open consistency.
<dt><code>nodevs</code>
<dd>
Don't allow local special devices on this filesystem.
<dt><code>nosuid</code>
<dd>
Don't allow set-uid or set-gid executables on this filesystem.
<dt><code>quota</code>
<dd>
Enable quota checking on this mount.
<dt><code>retrans=<i>n</i></code>
<dd>
The number of NFS retransmits made before a user error is generated by a
<samp>`soft'</samp> mounted filesystem, and before a <samp>`hard'</samp> mounted
filesystem reports <samp>`NFS server <strong>yoyo</strong> not responding still
trying'</samp>.
<dt><code>ro</code>
<dd>
Mount this filesystem readonly.
<dt><code>rsize=<var>n</var></code>
<dd>
The NFS read packet size.  You may need to set this if you are using
NFS/UDP through a gateway.
<dt><code>soft</code>
<dd>
Give up after <strong>retrans</strong> retransmissions.
<dt><code>spongy</code>
<dd>
Like <samp>`soft'</samp> for status requests, and <samp>`hard'</samp> for data transfers.
<dt><code>tcp</code>
<dd>
Use TCP/IP instead of UDP/IP, ignored if the NFS implementation does not
support TCP/IP mounts.
<dt><code>timeo=<var>n</var></code>
<dd>
The NFS timeout, in tenth-seconds, before a request is retransmitted.
<dt><code>wsize=<var>n</var></code>
<dd>
The NFS write packet size.  You may need to set this if you are using
NFS/UDP through a gateway.
</DL>

<p>
The following options are implemented by <i>Amd</i>, rather than being
passed to the kernel.

<dl compact>

<dt><code>nounmount</code>
<dd>
Configures the mount so that its time-to-live will
never expire.  This is also the default for some filesystem types.
<dt><code>ping=<var>n</var></code>
<dd>
The interval, in seconds, between keep-alive pings.  When four
consecutive pings have failed the mount point is marked as hung.  This
interval defaults to 30 seconds.  If the ping interval is less than zero,
no pings are sent and the host is assumed to be always
up.  By default, pings are not sent for an NFS/TCP mount.
<dt><code>retry=<var>n</var></code>
<dd>
The number of times to retry the mount system call.
<dt><code>utimeout=<var>n</var></code>
<dd>
The interval, in seconds, by which the mount's
time-to-live is extended after an unmount attempt
has failed.  In fact the interval is extended before the unmount is
attempted to avoid thrashing.  The default value is 120 seconds (two
minutes) or as set by the "-w" command line option.
</DL>



<h4><a name="SEC37" href="amdref_toc.html#SEC37">remopts Option</a></h4>
<p>
<a name="IDX138"></a>
<a name="IDX139"></a>
<a name="IDX140"></a>

<p>
This option has the same use as <code>${opts}</code> but applies only when
the remote host is on a non-local network.  For example, when using NFS
across a gateway it is often necessary to use smaller values for the
data read and write sizes.  This can simply be done by specifying the
small values in <var>remopts</var>.  When a non-local host is accessed, the
smaller sizes will automatically be used.

<p>
<i>Amd</i> determines whether a host is local by examining the network
interface configuration at startup.  Any interface changes made after
<i>Amd</i> has been started will not be noticed.  The likely effect will
be that a host may incorrectly be declared non-local.

<p>
Unless otherwise set, the value of <code>${rem}</code> is the same as the
value of <code>${opts}</code>.



<h4><a name="SEC38" href="amdref_toc.html#SEC38">sublink Option</a></h4>
<p>
<a name="IDX141"></a>
<a name="IDX142"></a>
<a name="IDX143"></a>

<p>
The subdirectory within the mounted filesystem to which the reference
should point.  This can be used to prevent duplicate mounts in cases
where multiple directories in the same mounted filesystem are used.



<h4><a name="SEC39" href="amdref_toc.html#SEC39">type Option</a></h4>
<p>
<a name="IDX144"></a>
<a name="IDX145"></a>
<a name="IDX146"></a>

<p>
The filesystem type to be used.  See section <a href="amdref.html#SEC56">Filesystem Types</a>, for a full
description of each type.


<h1><a name="SEC40" href="amdref_toc.html#SEC40"><i>Amd</i> Command Line Options</a></h1>
<p>
<a name="IDX147"></a>
<a name="IDX148"></a>
<a name="IDX149"></a>

<p>
Many of <i>Amd</i>'s parameters can be set from the command line.  The
command line is also used to specify automount points and maps.

<p>
The general format of a command line is


<pre>
amd [<i>options</i>] { <i>directory</i> <i>map-name</i> [-<i>map-options</i>] } ...
</pre>

<p>
For each directory and map-name given, <i>Amd</i> establishes an
automount point.  The <strong>map-options</strong> may be any sequence of options
or selectors---see section <a href="amdref.html#SEC29">Location Format</a>.  The <strong>map-options</strong>
apply only to <i>Amd</i>'s mount point.

<p>
<samp>`type:=toplvl;cache:=mapdefault;fs:=${map}'</samp> is the default value for the
map options.  Default options for a map are read from a special entry in
the map whose key is the string <samp>`/defaults'</samp>.  When default options
are given they are prepended to any options specified in the mount-map
locations as explained in.  See section <a href="amdref.html#SEC30">Map Defaults</a>, for more details.

<p>
The <strong>options</strong> are any combination of those listed below.

<p>
Once the command line has been parsed, the automount points are mounted.
The mount points are created if they do not already exist, in which case they
will be removed when <i>Amd</i> exits.
Finally, <i>Amd</i> disassociates itself from its controlling terminal and
forks into the background.

<p>
Note: Even if <i>Amd</i> has been built with <samp>`-DDEBUG'</samp> it will still
background itself and disassociate itself from the controlling terminal.
To use a debugger it is necessary to specify <samp>`-D nodaemon'</samp> on the
command line.




<h2><a name="SEC41" href="amdref_toc.html#SEC41"><code>-a</code> <var>directory</var></a></h2>
<p>
<a name="IDX150"></a>
<a name="IDX151"></a>

<p>
Specifies the default mount directory.  This option changes the variable
<code>${autodir}</code> which otherwise defaults to <tt>`/a'</tt>.  For example,
some sites prefer <tt>`/amd'</tt>.


<pre>
amd -a /amd ...
</pre>



<h2><a name="SEC42" href="amdref_toc.html#SEC42"><code>-c</code> <var>cache-interval</var></a></h2>
<p>
<a name="IDX152"></a>

<p>
Selects the period, in seconds, for which a name is cached by <i>Amd</i>.
If no reference is made to the volume in this period, <i>Amd</i> discards
the volume name to filesystem mapping.

<p>
Once the last reference to a filesystem has been removed, <i>Amd</i>
attempts to unmount the filesystem.  If the unmount fails the interval
is extended by a further period as specified by the <samp>`-w'</samp> command
line option or by the <samp>`utimeout'</samp> mount option.

<p>
The default <strong>cache-interval</strong> is 300 seconds (five minutes).



<h2><a name="SEC43" href="amdref_toc.html#SEC43"><code>-d</code> <var>domain</var></a></h2>
<p>
<a name="IDX156"></a>
<a name="IDX157"></a>
<a name="IDX158"></a>

<p>
Specifies the host's domain.  This sets the internal variable
<code>${domain}</code> and affects the <code>${hostd}</code> variable.

<p>
If this option is not specified and the hostname already contains the
local domain then that is used, otherwise the default value of
<code>${domain}</code> is <samp>`unknown.domain'</samp>.

<p>
For example, if the local domain was <samp>`doc.ic.ac.uk'</samp>, <i>Amd</i> could
be started as follows:


<pre>
amd -d doc.ic.ac.uk ...
</pre>



<h2><a name="SEC44" href="amdref_toc.html#SEC44"><code>-k</code> <var>kernel-architecture</var></a></h2>
<p>
<a name="IDX159"></a>

<p>
Specifies the kernel architecture of the system.  This is usually the
output of <samp>`arch -k'</samp> and its only effect is to set the variable
<code>${karch}</code>.  If this option is not given, <code>${karch}</code> has
the same value as <code>${arch}</code>.

<p>
This would be used as follows:


<pre>
amd -k `arch -k` ...
</pre>



<h2><a name="SEC45" href="amdref_toc.html#SEC45"><code>-l</code> <var>log-option</var></a></h2>
<p>
<a name="IDX160"></a>
<a name="IDX161"></a>
<a name="IDX162"></a>
<a name="IDX163"></a>

<p>
Selects the form of logging to be made.  Two special <strong>log-options</strong>
are recognised.


<ol>
<li>

If <strong>log-option</strong> is the string <samp>`syslog'</samp>, <i>Amd</i> will use the
<b>syslog</b>(3) mechanism.
<li>

If <strong>log-option</strong> is the string <samp>`/dev/stderr'</samp>, <i>Amd</i> will use
standard error, which is also the default target for log messages.  To
implement this, <i>Amd</i> simulates the effect of the <samp>`/dev/fd'</samp>
driver.
</OL>

<p>
Any other string is taken as a filename to use for logging.  Log
messages are appended to the file if it already exists, otherwise a new
file is created.  The file is opened once and then held open, rather
than being re-opened for each message.

<p>
If the <samp>`syslog'</samp> option is specified but the system does not support
syslog or if the named file cannot be opened or created, <i>Amd</i> will
use standard error.  Error messages generated before <i>Amd</i> has
finished parsing the command line are printed on standard error.

<p>
Using <samp>`syslog'</samp> is usually best, in which case <i>Amd</i> would be
started as follows:


<pre>
amd -l syslog ...
</pre>



<h2><a name="SEC46" href="amdref_toc.html#SEC46"><code>-n</code></a></h2>
<p>
<a name="IDX164"></a>
<a name="IDX165"></a>
<a name="IDX166"></a>
<a name="IDX167"></a>

<p>
Normalises the remote hostname before using it.  Normalisation is done
by replacing the value of <code>${rhost}</code> with the primary name
returned by a hostname lookup.

<p>
This option should be used if several names are used to refer to a
single host in a mount map.



<h2><a name="SEC47" href="amdref_toc.html#SEC47"><code>-p</code></a></h2>
<p>
<a name="IDX168"></a>
<a name="IDX169"></a>
<a name="IDX170"></a>
<a name="IDX171"></a>
<a name="IDX172"></a>

<p>
Causes <i>Amd</i>'s process id to be printed on standard output.
This can be redirected to a suitable file for use with kill:


<pre>
amd -p &#62; /var/run/amd.pid ...
</pre>

<p>
This option only has an affect if <i>Amd</i> is running in daemon mode.
If <i>Amd</i> is started with the <code>-D nodaemon</code> debug flag, this
option is ignored.



<h2><a name="SEC48" href="amdref_toc.html#SEC48"><code>-r</code></a></h2>
<p>
<a name="IDX173"></a>
<a name="IDX174"></a>

<p>
Tells <i>Amd</i> to restart existing mounts (see section <a href="amdref.html#SEC70">Inheritance Filesystem</a>).



<h2><a name="SEC49" href="amdref_toc.html#SEC49"><code>-t</code> <var>timeout.retransmit</var></a></h2>
<p>
<a name="IDX175"></a>

<p>
Specifies the RPC <strong>timeout</strong> and <strong>retransmit</strong> intervals used by
the kernel to communicate to <i>Amd</i>.  These are used to set the
<samp>`timeo'</samp> and <samp>`retrans'</samp> mount options.

<p>
<i>Amd</i> relies on the kernel RPC retransmit mechanism to trigger mount
retries.  The value of this parameter changes the retry interval.  Too
long an interval gives poor interactive response, too short an interval
causes excessive retries.



<h2><a name="SEC50" href="amdref_toc.html#SEC50"><code>-v</code></a></h2>
<p>
<a name="IDX176"></a>
<a name="IDX177"></a>
<a name="IDX178"></a>

<p>
Print version information on standard error and then exit.  The output
is of the form:


<pre>
amd 5.2.1.11 of 91/03/17 18:04:05 5.3Alpha11 #0: Sun Mar 17 18:07:28 GMT 1991
Built by pendry@vangogh.Berkeley.EDU for a hp300 running bsd44 (big-endian).
Map support for: root, passwd, union, file, error.
FS: ufs, nfs, nfsx, host, link, program, union, auto, direct, toplvl, error.
Primary network is 128.32.130.0.
</pre>

<p>
The information includes the version number, release date and name of
the release.  The architecture (see section <a href="amdref.html#SEC19">Supported Machine Architectures</a>),
operating system (see section <a href="amdref.html#SEC18">Supported Operating Systems</a>)
and byte ordering are also printed as they appear in the <code>${os}</code>,
<code>${arch}</code> and <code>${byte}</code> variables.


<h2><a name="SEC51" href="amdref_toc.html#SEC51"><code>-w</code> <var>wait-timeout</var></a></h2>
<p>
<a name="IDX179"></a>
<a name="IDX180"></a>

<p>
Selects the interval in seconds between unmount attempts after the
initial time-to-live has expired.

<p>
This defaults to 120 seconds (two minutes).



<h2><a name="SEC52" href="amdref_toc.html#SEC52"><code>-x</code> <var>opts</var></a></h2>
<p>
<a name="IDX181"></a>
<a name="IDX182"></a>
<a name="IDX183"></a>
<a name="IDX184"></a>

<p>
Specifies the type and verbosity of log messages.  <strong>opts</strong> is
a comma separated list selected from the following options:

<dl compact>

<dt><code>fatal</code>
<dd>
Fatal errors
<dt><code>error</code>
<dd>
Non-fatal errors
<dt><code>user</code>
<dd>
Non-fatal user errors
<dt><code>warn</code>
<dd>
Recoverable errors
<dt><code>warning</code>
<dd>
Alias for <code>warn</code>
<dt><code>info</code>
<dd>
Information messages
<dt><code>map</code>
<dd>
Mount map usage
<dt><code>stats</code>
<dd>
Additional statistics
<dt><code>all</code>
<dd>
All of the above
</DL>

<p>
Initially a set of default logging flags is enabled.  This is as if
<samp>`-x all,nomap,nostats'</samp> had been selected.  The command line is
parsed and logging is controlled by the "-x" option.  The very first
set of logging flags is saved and can not be subsequently disabled using
<i>Amq</i>.  This default set of options is useful for general production
use.
<p>
The <samp>`info'</samp> messages include details of what is mounted and
unmounted and when filesystems have timed out.  If you want to have the
default set of messages without the <samp>`info'</samp> messages then you simply
need <samp>`-x noinfo'</samp>.  The messages given by <samp>`user'</samp> relate to
errors in the mount maps, so these are useful when new maps are
installed.  The following table lists the syslog priorities used for each
of the message types.
<dl compact>

<dt><code>fatal</code>
<dd>
LOG_CRIT
<dt><code>error</code>
<dd>
LOG_ERR
<dt><code>user</code>
<dd>
LOG_WARNING
<dt><code>warning</code>
<dd>
LOG_WARNING
<dt><code>info</code>
<dd>
LOG_INFO
<dt><code>debug</code>
<dd>
LOG_DEBUG
<dt><code>map</code>
<dd>
LOG_DEBUG
<dt><code>stats</code>
<dd>
LOG_INFO
</DL>

<p>
The options can be prefixed by the string <samp>`no'</samp> to indicate
that this option should be turned off.  For example, to obtain all
but <samp>`info'</samp> messages the option <samp>`-x all,noinfo'</samp> would be used.

<p>
If <i>Amd</i> was built with debugging enabled the <code>debug</code> option is
automatically enabled regardless of the command line options.



<h2><a name="SEC53" href="amdref_toc.html#SEC53"><code>-y</code> <var>NIS-domain</var></a></h2>
<p>
<a name="IDX185"></a>
<a name="IDX186"></a>
<a name="IDX187"></a>
<a name="IDX188"></a>

<p>
Selects an alternate NIS domain.  This is useful for debugging and
cross-domain shared mounting.  If this flag is specified, <i>Amd</i>
immediately attempts to bind to a server for this domain.



<h2><a name="SEC54" href="amdref_toc.html#SEC54"><code>-C</code> <var>cluster-name</var></a></h2>
<p>
<a name="IDX189"></a>
<a name="IDX190"></a>

<p>
Specifies the name of the cluster of which the local machine is a member.
The only effect is to set the variable <code>${cluster}</code>.
The <strong>cluster-name</strong> is will usually obtained by running another command which uses
a database to map the local hostname into a cluster name.
<code>${cluster}</code> can then be used as a selector to restrict mounting of
replicated data.
If this option is not given, <code>${cluster}</code> has the same value as <code>${domain}</code>.
This would be used as follows:


<pre>
amd -C `clustername` ...
</pre>



<h2><a name="SEC55" href="amdref_toc.html#SEC55"><code>-D</code> <var>opts</var></a></h2>
<p>
<a name="IDX191"></a>
<a name="IDX192"></a>

<p>
Controls the verbosity and coverage of the debugging trace; <strong>opts</strong>
is a comma separated list of debugging options.  The "-D" option is
only available if <i>Amd</i> was compiled with <samp>`-DDEBUG'</samp>.  The memory
debugging facilities are only available if <i>Amd</i> was compiled with
<samp>`-DDEBUG_MEM'</samp> (in addition to <samp>`-DDEBUG'</samp>).

<p>
The most common options to use are <samp>`-D trace'</samp> and <samp>`-D test'</samp>
(which turns on all the useful debug options).  See the program source
for a more detailed explanation of the available options.



<h1><a name="SEC56" href="amdref_toc.html#SEC56">Filesystem Types</a></h1>
<p>
<a name="IDX193"></a>
<a name="IDX194"></a>
<a name="IDX195"></a>

<p>
To mount a volume, <i>Amd</i> must be told the type of filesystem to be
used.  Each filesystem type typically requires additional information
such as the fileserver name for NFS.

<p>
From the point of view of <i>Amd</i>, a <strong>filesystem</strong> is anything that
can resolve an incoming name lookup.  An important feature is support
for multiple filesystem types.  Some of these filesystems are
implemented in the local kernel and some on remote fileservers, whilst
the others are implemented internally by <i>Amd</i>.
<p>
The two common filesystem types are UFS and NFS.  Four other user
accessible filesystems (<samp>`link'</samp>, <samp>`program'</samp>, <samp>`auto'</samp> and
<samp>`direct'</samp>) are also implemented internally by <i>Amd</i> and these are
described below.  There are two additional filesystem types internal to
<i>Amd</i> which are not directly accessible to the user (<samp>`inherit'</samp>
and <samp>`error'</samp>).  Their use is described since they may still have an
effect visible to the user.



<h2><a name="SEC57" href="amdref_toc.html#SEC57">Network Filesystem (<samp>`type:=nfs'</samp>)</a></h2>
<p>
<a name="IDX196"></a>
<a name="IDX197"></a>
<a name="IDX198"></a>
<a name="IDX199"></a>
<a name="IDX200"></a>

<p>
The <strong>nfs</strong> filesystem type provides access to Sun's NFS.

<p>
The following options must be specified:

<dl compact>

<dt><code>rhost</code>
<dd>
<a name="IDX201"></a>
 <a name="IDX202"></a>
 
the remote fileserver.  This must be an entry in the hosts database.  IP
addresses are not accepted.  The default value is taken
from the local host name (<code>${host}</code>) if no other value is
specified.

<a name="IDX203"></a>
<a name="IDX204"></a>
<dt><code>rfs</code>
<dd>
the remote filesystem.
If no value is specified for this option, an internal default of
<code>${path}</code> is used.
</DL>

<p>
NFS mounts require a two stage process.  First, the <strong>file handle</strong> of
the remote file system must be obtained from the server.  Then a mount
system call must be done on the local system.  <i>Amd</i> keeps a cache
of file handles for remote file systems.  The cache entries have a
lifetime of a few minutes.

<p>
If a required file handle is not in the cache, <i>Amd</i> sends a request
to the remote server to obtain it.  <i>Amd</i> <strong>does not</strong> wait for
a response; it notes that one of the locations needs retrying, but
continues with any remaining locations.  When the file handle becomes
available, and assuming none of the other locations was successfully
mounted, <i>Amd</i> will retry the mount.  This mechanism allows several
NFS filesystems to be mounted in parallel.
The first one which responds with a valid file handle will be used.

<p>
An NFS entry might be:


<pre>
jsp  host!=charm;type:=nfs;rhost:=charm;rfs:=/home/charm;sublink:=jsp
</pre>

<p>
The mount system call and any unmount attempts are always done
in a new task to avoid the possibility of blocking <i>Amd</i>.



<h2><a name="SEC58" href="amdref_toc.html#SEC58">Network Host Filesystem (<samp>`type:=host'</samp>)</a></h2>
<p>
<a name="IDX205"></a>
<a name="IDX206"></a>
<a name="IDX207"></a>
<a name="IDX208"></a>
<a name="IDX209"></a>


<p>
The <strong>host</strong> filesystem allows access to the entire export tree of an
NFS server.  The implementation is layered above the <samp>`nfs'</samp>
implementation so keep-alives work in the same way.  The only option
which needs to specified is <samp>`rhost'</samp> which is the name of the
fileserver to mount.

<p>
The <samp>`host'</samp> filesystem type works by querying the mount daemon on
the given fileserver to obtain its export list.  <i>Amd</i> then obtains
filehandles for each of the exported filesystems.  Any errors at this
stage cause that particular filesystem to be ignored.  Finally each
filesystem is mounted.  Again, errors are logged but ignored.  One
common reason for mounts to fail is that the mount point does not exist.
Although <i>Amd</i> attempts to automatically create the mount point, it
may be on a remote filesystem to which <i>Amd</i> does not have write
permission.

<p>
When an attempt to unmount a <samp>`host'</samp> filesystem mount fails, <i>Amd</i>
remounts any filesystems which had successfully been unmounted.  To do
this <i>Amd</i> queries the mount daemon again and obtains a fresh copy of
the export list.  <i>Amd</i> then tries to mount any exported filesystems
which are not currently mounted.

<p>
Sun's automounter provides a special <samp>`-hosts'</samp> map.  To achieve the
same effect with <i>Amd</i> requires two steps.  First a mount map must
be created as follows:


<pre>
/defaults  type:=host;fs:=${autodir}/${rhost}/root;rhost:=${key}
*          opts:=rw,nosuid,grpid
</pre>

<p>
and then start <i>Amd</i> with the following command


<pre>
amd /n net.map
</pre>

<p>
where <samp>`net.map'</samp> is the name of map described above.  Note that the
value of <code>${fs}</code> is overridden in the map.  This is done to avoid
a clash between the mount tree and any other filesystem already mounted
from the same fileserver.

<p>
If different mount options are needed for different hosts then
additional entries can be added to the map, for example


<pre>
host2       opts:=ro,nosuid,soft
</pre>

<p>
would soft mount <samp>`host2'</samp> read-only.



<h2><a name="SEC59" href="amdref_toc.html#SEC59">Network Filesystem Group (<samp>`type:=nfsx'</samp>)</a></h2>
<p>
<a name="IDX210"></a>
<a name="IDX211"></a>
<a name="IDX212"></a>
<a name="IDX213"></a>
<a name="IDX214"></a>
<a name="IDX215"></a>

<p>
The <strong>nfsx</strong> filesystem allows a group of filesystems to be mounted
from a single NFS server.  The implementation is layered above the
<samp>`nfs'</samp> implementation so keep-alives work in the same way.

<p>
The options are the same as for the <samp>`nfs'</samp> filesystem with one
difference.

<p>
The following options must be specified:

<dl compact>

<dt><code>rhost</code>
<dd>
the remote fileserver.  This must be an entry in the hosts database.  IP
addresses are not accepted.  The default value is taken from the local
host name (<code>${host}</code>) if no other value is specified.

<dt><code>rfs</code>
<dd>
as a list of filesystems to mount.  The list is in the form of a comma
separated strings.
</DL>

<p>
For example:


<pre>
pub      type:=nfsx;rhost:=gould;\
		rfs:=/public,/,graphics,usenet;fs:=${autodir}/${rhost}/root
</pre>

<p>
The first string defines the root of the tree, and is applied as a
prefix to the remaining members of the list which define the individual
filesystems.  The first string is <em>not</em> used as a filesystem name.
A parallel operation is used to determine the local mount points to
ensure a consistent layout of a tree of mounts.

<p>
Here, the <em>three</em> filesystems, <samp>`/public'</samp>,
<samp>`/public/graphics'</samp> and <samp>`/public/usenet'</samp>, would be mounted.
<p>
A local mount point, <code>${fs}</code>, <em>must</em> be specified.  The
default local mount point will not work correctly in the general case.
A suggestion is to use <samp>`fs:=${autodir}/${rhost}/root'</samp>.


<h2><a name="SEC60" href="amdref_toc.html#SEC60">Unix Filesystem (<samp>`type:=ufs'</samp>)</a></h2>
<p>
<a name="IDX216"></a>
<a name="IDX217"></a>
<a name="IDX218"></a>
<a name="IDX219"></a>
<a name="IDX220"></a>
<a name="IDX221"></a>
<a name="IDX222"></a>
<a name="IDX223"></a>
<a name="IDX224"></a>

<p>
The <strong>ufs</strong> filesystem type provides access to the system's
standard disk filesystem--usually a derivative of the Berkeley Fast Filesystem.

<p>
The following option must be specified:

<dl compact>

<dt><code>dev</code>
<dd>
<a name="IDX225"></a>
 <a name="IDX226"></a>
 
the block special device to be mounted.
</DL>

<p>
A UFS entry might be:


<pre>
jsp   host==charm;type:=ufs;dev:=/dev/xd0g;sublink:=jsp
</pre>



<h2><a name="SEC61" href="amdref_toc.html#SEC61">Program Filesystem (<samp>`type:=program'</samp>)</a></h2>
<p>
<a name="IDX227"></a>
<a name="IDX228"></a>
<a name="IDX229"></a>
<a name="IDX230"></a>

<p>
The <strong>program</strong> filesystem type allows a program to be run whenever a
mount or unmount is required.  This allows easy addition of support for
other filesystem types, such as MIT's Remote Virtual Disk (RVD)
which has a programmatic interface via the commands
<samp>`rvdmount'</samp> and <samp>`rvdunmount'</samp>.

<p>
The following options must be specified:

<dl compact>

<dt><code>mount</code>
<dd>
<a name="IDX231"></a>
 <a name="IDX232"></a>
 
the program which will perform the mount.

<a name="IDX233"></a>
<a name="IDX234"></a>
<dt><code>unmount</code>
<dd>
the program which will perform the unmount.
</DL>

<p>
The exit code from these two programs is interpreted as a Unix error
code.  As usual, exit code zero indicates success.  To execute the
program <i>Amd</i> splits the string on whitespace to create an array of
substrings.  Single quotes <samp>`''</samp> can be used to quote whitespace
if that is required in an argument.  There is no way to escape or change
the quote character.

<p>
To run the program <samp>`rvdmount'</samp> with a host name and filesystem as
arguments would be specified by <samp>`mount:="/etc/rvdmount rvdmount
fserver ${path}"'</samp>.

<p>
The first element in the array is taken as the pathname of the program
to execute.  The other members of the array form the argument vector to
be passed to the program, <strong>including argument zero</strong>.  This means
that the split string must have at least two elements.  The program is
directly executed by <i>Amd</i>, not via a shell.  This means that scripts
must begin with a <code>#!</code> interpreter specification.

<p>
If a filesystem type is to be heavily used, it may be worthwhile adding
a new filesystem type into <i>Amd</i>, but for most uses the program
filesystem should suffice.

<p>
When the program is run, standard input and standard error are inherited
from the current values used by <i>Amd</i>.  Standard output is a
duplicate of standard error.  The value specified with the "-l"
command line option has no effect on standard error.



<h2><a name="SEC62" href="amdref_toc.html#SEC62">Symbolic Link Filesystem (<samp>`type:=link'</samp>)</a></h2>
<p>
<a name="IDX235"></a>
<a name="IDX236"></a>
<a name="IDX237"></a>
<a name="IDX238"></a>
<a name="IDX239"></a>
<a name="IDX240"></a>
<a name="IDX241"></a>

<p>
Each filesystem type creates a symbolic link to point from the volume
name to the physical mount point.  The <samp>`link'</samp> filesystem does the
same without any other side effects.  This allows any part of the
machines name space to be accessed via <i>Amd</i>.

<p>
One common use for the symlink filesystem is <tt>`/homes'</tt> which can be
made to contain an entry for each user which points to their
(auto-mounted) home directory.  Although this may seem rather expensive,
it provides a great deal of administrative flexibility.

<p>
The following option must be defined:

<dl compact>

<dt><code>fs</code>
<dd>
The value of <var>fs</var> option specifies the destination of the link, as
modified by the <var>sublink</var> option.  If <var>sublink</var> is non-null, it
is appended to <code>${fs}</code><code>/</code> and the resulting string is used
as the target.
</DL>

<p>
The <samp>`link'</samp> filesystem can be though of as identical to the
<samp>`ufs'</samp> filesystem but without actually mounting anything.

<p>
An example entry might be:


<pre>
jsp   host==charm;type:=link;fs:=/home/charm;sublink:=jsp
</pre>

<p>
which would return a symbolic link pointing to <tt>`/home/charm/jsp'</tt>.



<h2><a name="SEC63" href="amdref_toc.html#SEC63">Symbolic Link Filesystem II (<samp>`type:=link'</samp>)</a></h2>
<p>
<a name="IDX242"></a>
<a name="IDX243"></a>
<a name="IDX244"></a>
<a name="IDX245"></a>
<a name="IDX246"></a>
<a name="IDX247"></a>
<a name="IDX248"></a>

<p>
The <samp>`linkx'</samp> filesystem type is identical to <samp>`link'</samp> with the
exception that the target of the link must exist.  Existence is checked
with the <samp>`lstat'</samp> system call.

<p>
The <samp>`linkx'</samp> filesystem type is particularly useful for wildcard map
entries.  In this case, a list of possible targets can be give and
<i>Amd</i> will choose the first one which exists on the local machine.



<h2><a name="SEC64" href="amdref_toc.html#SEC64">Automount Filesystem (<samp>`type:=auto'</samp>)</a></h2>
<p>
<a name="IDX249"></a>
<a name="IDX250"></a>
<a name="IDX251"></a>
<a name="IDX252"></a>
<a name="IDX253"></a>
<a name="IDX254"></a>
<a name="IDX255"></a>
<a name="IDX256"></a>
<a name="IDX257"></a>
<a name="IDX258"></a>
<a name="IDX259"></a>
<a name="IDX260"></a>

<p>
The <strong>auto</strong> filesystem type creates a new automount point below an
existing automount point.  Top-level automount points appear as system
mount points.  An automount mount point can also appear as a
sub-directory of an existing automount point.  This allows some
additional structure to be added, for example to mimic the mount tree of
another machine.

<p>
The following options may be specified:

<dl compact>

<dt><code>cache</code>
<dd>
<a name="IDX261"></a>
 <a name="IDX262"></a>
 
specifies whether the data in this mount-map should be
cached.  The default value is <samp>`none'</samp>, in which case
no caching is done in order to conserve memory.
However, better performance and reliability can be obtained by caching
some or all of a mount-map.

If the cache option specifies <samp>`all'</samp>,
the entire map is enumerated when the mount point is created.

If the cache option specifies <samp>`inc'</samp>, caching is done incrementally
as and when data is required.
Some map types do not support cache mode <samp>`all'</samp>, in which case <samp>`inc'</samp>
is used whenever <samp>`all'</samp> is requested.

Caching can be entirely disabled by using cache mode <samp>`none'</samp>.

If the cache option specifies <samp>`regexp'</samp> then the entire map will be
enumerated and each key will be treated as an egrep-style regular
expression.  The order in which a cached map is searched does not
correspond to the ordering in the source map so the regular expressions
should be mutually exclusive to avoid confusion.

Each mount map type has a default cache type, usually <samp>`inc'</samp>, which
can be selected by specifying <samp>`mapdefault'</samp>.

The cache mode for a mount map can only be selected on the command line.
Starting <i>Amd</i> with the command:


<pre>
amd /homes hesiod.homes -cache:=inc
</pre>

will cause <samp>`/homes'</samp> to be automounted using the <strong>Hesiod</strong> name
server with local incremental caching of all successfully resolved names.

All cached data is forgotten whenever <i>Amd</i> receives a <samp>`SIGHUP'</samp>
signal and, if cache <samp>`all'</samp> mode was selected, the cache will be
reloaded.  This can be used to inform <i>Amd</i> that a map has been
updated.  In addition, whenever a cache lookup fails and <i>Amd</i> needs
to examine a map, the map's modify time is examined.  If the cache is
out of date with respect to the map then it is flushed as if a
<samp>`SIGHUP'</samp> had been received.

An additional option (<samp>`sync'</samp>) may be specified to force <i>Amd</i> to
check the map's modify time whenever a cached entry is being used.  For
example, an incremental, synchronised cache would be created by the
following command:


<pre>
amd /homes hesiod.homes -cache:=inc,sync
</pre>

<dt><code>fs</code>
<dd>
specifies the name of the mount map to use for the new mount point.

Arguably this should have been specified with the <code>${rfs}</code> option but
we are now stuck with it due to historical accident.

<dt><code>pref</code>
<dd>
alters the name that is looked up in the mount map.  If
<code>${pref}</code>, the <strong>prefix</strong>, is non-null then it is prepended to
the name requested by the kernel <strong>before</strong> the map is searched.
</DL>

<p>
The server <samp>`dylan.doc.ic.ac.uk'</samp> has two user disks:
<samp>`/dev/dsk/2s0'</samp> and <samp>`/dev/dsk/5s0'</samp>.  These are accessed as
<samp>`/home/dylan/dk2'</samp> and <samp>`/home/dylan/dk5'</samp> respectively.  Since
<samp>`/home'</samp> is already an automount point, this naming is achieved with
the following map entries:

<pre>
dylan        type:=auto;fs:=${map};pref:=${key}/
dylan/dk2    type:=ufs;dev:=/dev/dsk/2s0
dylan/dk5    type:=ufs;dev:=/dev/dsk/5s0
</pre>



<h2><a name="SEC65" href="amdref_toc.html#SEC65">Direct Automount Filesystem (<samp>`type:=direct'</samp>)</a></h2>
<p>
<a name="IDX263"></a>
<a name="IDX264"></a>
<a name="IDX265"></a>
<a name="IDX266"></a>

<p>
The <strong>direct</strong> filesystem is almost identical to the automount
filesystem.  Instead of appearing to be a directory of mount points, it
appears as a symbolic link to a mounted filesystem.  The mount is done
at the time the link is accessed.  See section <a href="amdref.html#SEC64">Automount Filesystem (<samp>`type:=auto'</samp>)</a> for a
list of required options.

<p>
Direct automount points are created by specifying the <samp>`direct'</samp>
filesystem type on the command line:


<pre>
amd ... /usr/man auto.direct -type:=direct
</pre>

<p>
where <samp>`auto.direct'</samp> would contain an entry such as:


<pre>
usr/man    -type:=nfs;rfs:=/usr/man \
           rhost:=man-server1  rhost:=man-server2
</pre>

<p>
In this example, <samp>`man-server1'</samp> and <samp>`man-server2'</samp> are file
servers which export copies of the manual pages.  Note that the key
which is looked up is the name of the automount point without the
leading <samp>`/'</samp>.



<h2><a name="SEC66" href="amdref_toc.html#SEC66">Union Filesystem (<samp>`type:=union'</samp>)</a></h2>
<p>
<a name="IDX267"></a>
<a name="IDX268"></a>
<a name="IDX269"></a>

<p>
The <strong>union</strong> filesystem type allows the contents of several
directories to be merged and made visible in a single directory.  This
can be used to overcome one of the major limitations of the Unix mount
mechanism which only allows complete directories to be mounted.

<p>
For example, supposing <tt>`/tmp'</tt> and <tt>`/var/tmp'</tt> were to be merged
into a new directory called <tt>`/mtmp'</tt>, with files in <tt>`/var/tmp'</tt>
taking precedence.  The following command could be used to achieve this
effect:


<pre>
amd ... /mtmp union:/tmp:/var/tmp -type:=union
</pre>

<p>
Currently, the unioned directories must <em>not</em> be automounted.  That
would cause a deadlock.  This seriously limits the current usefulness of
this filesystem type and the problem will be addressed in a future
release of <i>Amd</i>.

<p>
Files created in the union directory are actually created in the last
named directory.  This is done by creating a wildcard entry which points
to the correct directory.  The wildcard entry is visible if the union
directory is listed, so allowing you to see which directory has
priority.

<p>
The files visible in the union directory are computed at the time
<i>Amd</i> is started, and are not kept uptodate with respect to the
underlying directories.  Similarly, if a link is removed, for example
with the <samp>`rm'</samp> command, it will be lost forever.



<h2><a name="SEC67" href="amdref_toc.html#SEC67">Error Filesystem (<samp>`type:=error'</samp>)</a></h2>
<p>
<a name="IDX270"></a>
<a name="IDX271"></a>
<a name="IDX272"></a>

<p>
The <strong>error</strong> filesystem type is used internally as a catch-all in
the case where none of the other filesystems was selected, or some other
error occurred.
Lookups and mounts always fail with "No such file or directory".
All other operations trivially succeed.

<p>
The error filesystem is not directly accessible.



<h2><a name="SEC68" href="amdref_toc.html#SEC68">Top-level Filesystem (<samp>`type:=toplvl'</samp>)</a></h2>
<p>
<a name="IDX273"></a>
<a name="IDX274"></a>
<a name="IDX275"></a>

<p>
The <strong>toplvl</strong> filesystems is derived from the <samp>`auto'</samp> filesystem
and is used to mount the top-level automount nodes.  Requests of this
type are automatically generated from the command line arguments and
can also be passed in by using the "-M" option of the <strong>Amq</strong> command.



<h2><a name="SEC69" href="amdref_toc.html#SEC69">Root Filesystem</a></h2>
<p>
<a name="IDX276"></a>
<a name="IDX277"></a>
<a name="IDX278"></a>

<p>
The <strong>root</strong> (<samp>`type:=root'</samp>) filesystem type acts as an internal
placeholder onto which <i>Amd</i> can pin <samp>`toplvl'</samp> mounts.  Only one
node of this type need ever exist and one is created automatically
during startup.  The effect of creating a second root node is undefined.



<h2><a name="SEC70" href="amdref_toc.html#SEC70">Inheritance Filesystem</a></h2>
<p>
<a name="IDX279"></a>
<a name="IDX280"></a>
<a name="IDX281"></a>
<a name="IDX282"></a>

<p>
The <strong>inheritance</strong> (<samp>`type:=inherit'</samp>) filesystem is not directly
accessible.  Instead, internal mount nodes of this type are
automatically generated when <i>Amd</i> is started with the "-r" option.
At this time the system mount table is scanned to locate any filesystems
which are already mounted.  If any reference to these filesystems is
made through <i>Amd</i> then instead of attempting to mount it, <i>Amd</i>
simulates the mount and <strong>inherits</strong> the filesystem.  This allows a
new version of <i>Amd</i> to be installed on a live system simply by
killing the old daemon with <code>SIGTERM</code> and starting the new one.
<p>
This filesystem type is not generally visible externally, but it is
possible that the output from <samp>`amq -m'</samp> may list <samp>`inherit'</samp> as
the filesystem type.  This happens when an inherit operation cannot
be completed for some reason, usually because a fileserver is down.



<h1><a name="SEC71" href="amdref_toc.html#SEC71">Run-time Administration</a></h1>
<p>
<a name="IDX283"></a>
<a name="IDX284"></a>




<h2><a name="SEC72" href="amdref_toc.html#SEC72">Starting <i>Amd</i></a></h2>
<p>
<a name="IDX285"></a>
<a name="IDX286"></a>
<a name="IDX287"></a>
<a name="IDX288"></a>

<p>
<i>Amd</i> is best started from <samp>`/etc/rc.local'</samp>:


<pre>
if [ -f /etc/amd.start ]; then
        sh /etc/amd.start; (echo -n ' amd')      &#62;/dev/console
fi
</pre>

<p>
The shell script, <samp>`amd.start'</samp>, contains:


<pre>
#!/bin/sh -
PATH=/etc:/bin:/usr/bin:/usr/ucb:$PATH export PATH

#
# Either name of logfile or "syslog"
#
LOGFILE=syslog
#LOGFILE=/var/log/amd

#
# Figure out whether domain name is in host name
# If the hostname is just the machine name then
# pass in the name of the local domain so that the
# hostnames in the map are domain stripped correctly.
#
case `hostname` in
*.*) dmn= ;;
*) dmn='-d doc.ic.ac.uk'
esac

#
# Zap earlier log file
#
case "$LOGFILE" in
*/*)
        mv "$LOGFILE" "$LOGFILE"-
        &#62; "$LOGFILE"
        ;;
syslog)
        : nothing
        ;;
esac

cd /usr/sbin
#
# -r            restart
# -d dmn        local domain
# -w wait       wait between unmount attempts
# -l log        logfile or "syslog"
#
eval ./amd -r $dmn -w 240 -l "$LOGFILE" \
        /homes amd.homes -cache:=inc \
        /home amd.home -cache:=inc \
        /vol amd.vol -cache:=inc \
        /n amd.net -cache:=inc
</pre>

<p>
If the list of automount points and maps is contained in a file or NIS map
it is easily incorporated onto the command line:


<pre>
...
eval ./amd -r $dmn -w 240 -l "$LOGFILE" `ypcat -k auto.master`
</pre>



<h2><a name="SEC73" href="amdref_toc.html#SEC73">Stopping <i>Amd</i></a></h2>
<p>
<a name="IDX289"></a>
<a name="IDX290"></a>
<a name="IDX291"></a>

<p>
<i>Amd</i> stops in response to two signals.

<dl compact>

<dt><samp>`SIGTERM'</samp>
<dd>
causes the top-level automount points to be unmounted and then <i>Amd</i>
to exit.  Any automounted filesystems are left mounted.  They can be
recovered by restarting <i>Amd</i> with the "-r" command line option.
<dt><samp>`SIGINT'</samp>
<dd>
causes <i>Amd</i> to attempt to unmount any filesystems which it has
automounted, in addition to the actions of <samp>`SIGTERM'</samp>.  This signal
is primarily used for debugging.</DL>

<p>
Actions taken for other signals are undefined.



<h2><a name="SEC74" href="amdref_toc.html#SEC74">Controlling <i>Amd</i></a></h2>
<p>
<a name="IDX292"></a>
<a name="IDX293"></a>
<a name="IDX294"></a>

<p>
It is sometimes desirable or necessary to exercise external control
over some of <i>Amd</i>'s internal state.  To support this requirement,
<i>Amd</i> implements an RPC interface which is used by the <strong>Amq</strong> program.
A variety of information is available.

<p>
<i>Amq</i> generally applies an operation, specified by a single letter option,
to a list of mount points.  The default operation is to obtain statistics
about each mount point.  This is similar to the output shown above
but includes information about the number and type of accesses to each
mount point.




<h3><a name="SEC75" href="amdref_toc.html#SEC75"><i>Amq</i> default information</a></h3>

<p>
With no arguments, <strong>Amq</strong> obtains a brief list of all existing
mounts created by <i>Amd</i>.  This is different from the list displayed by
<b>df</b>(1) since the latter only includes system mount points.

<p>
The output from this option includes the following information:


<ul>
<li>

the automount point,
<li>

the filesystem type,
<li>

the mount map or mount information,
<li>

the internal, or system mount point.
</ul>

<p>
For example:


<pre>
/            root   "root"                    sky:(pid75)
/homes       toplvl /usr/local/etc/amd.homes  /homes
/home        toplvl /usr/local/etc/amd.home   /home
/homes/jsp   nfs    charm:/home/charm         /a/charm/home/charm/jsp
/homes/phjk  nfs    toytown:/home/toytown     /a/toytown/home/toytown/ai/phjk
</pre>

<p>
If an argument is given then statistics for that volume name will
be output.  For example:


<pre>
What            Uid   Getattr Lookup RdDir   RdLnk   Statfs Mounted@
/homes          0     1196    512    22      0       30     90/09/14 12:32:55
/homes/jsp      0     0       0      0       1180    0      90/10/13 12:56:58
</pre>

<dl compact>

<dt><code>What</code>
<dd>
the volume name.

<dt><code>Uid</code>
<dd>
ignored.

<dt><code>Getattr</code>
<dd>
the count of NFS <strong>getattr</strong> requests on this node.  This should only be
non-zero for directory nodes.

<dt><code>Lookup</code>
<dd>
the count of NFS <strong>lookup</strong> requests on this node.  This should only be
non-zero for directory nodes.

<dt><code>RdDir</code>
<dd>
the count of NFS <strong>readdir</strong> requests on this node.  This should only
be non-zero for directory nodes.

<dt><code>RdLnk</code>
<dd>
the count of NFS <strong>readlink</strong> requests on this node.  This should be
zero for directory nodes.

<dt><code>Statfs</code>
<dd>
the could of NFS <strong>statfs</strong> requests on this node.  This should only
be non-zero for top-level automount points.

<dt><code>Mounted@</code>
<dd>
the date and time the volume name was first referenced.
</DL>



<h3><a name="SEC76" href="amdref_toc.html#SEC76"><i>Amq</i> -f option</a></h3>
<p>
<a name="IDX295"></a>
<a name="IDX296"></a>

<p>
The "-f" option causes <i>Amd</i> to flush the internal mount map cache.
This is useful for Hesiod maps since <i>Amd</i> will not automatically
notice when they have been updated.  The map cache can also be
synchronised with the map source by using the <samp>`sync'</samp> option
(see section <a href="amdref.html#SEC64">Automount Filesystem (<samp>`type:=auto'</samp>)</a>).


<h3><a name="SEC77" href="amdref_toc.html#SEC77"><i>Amq</i> -h option</a></h3>
<p>
<a name="IDX297"></a>

<p>
By default the local host is used.  In an HP-UX cluster the root server
is used since that is the only place in the cluster where <i>Amd</i> will
be running.  To query <i>Amd</i> on another host the "-h" option should
be used.



<h3><a name="SEC78" href="amdref_toc.html#SEC78"><i>Amq</i> -m option</a></h3>

<p>
The "-m" option displays similar information about mounted
filesystems, rather than automount points.  The output includes the
following information:


<ul>
<li>

the mount information,
<li>

the mount point,
<li>

the filesystem type,
<li>

the number of references to this filesystem,
<li>

the server hostname,
<li>

the state of the file server,
<li>

any error which has occurred.
</ul>

<p>
For example:


<pre>
"root"           truth:(pid602)     root   1 localhost is up
hesiod.home      /home              toplvl 1 localhost is up
hesiod.vol       /vol               toplvl 1 localhost is up
hesiod.homes     /homes             toplvl 1 localhost is up
amy:/home/amy    /a/amy/home/amy    nfs    5 amy is up
swan:/home/swan  /a/swan/home/swan  nfs    0 swan is up (Permission denied)
ex:/home/ex      /a/ex/home/ex      nfs    0 ex is down
</pre>

<p>
When the reference count is zero the filesystem is not mounted but
the mount point and server information is still being maintained
by <i>Amd</i>.



<h3><a name="SEC79" href="amdref_toc.html#SEC79"><i>Amq</i> -M option</a></h3>

<p>
The "-M" option passes a new map entry to <i>Amd</i> and waits for it to
be evaluated, possibly causing a mount.  For example, the following
command would cause <samp>`/home/toytown'</samp> on host <samp>`toytown'</samp> to be
mounted locally on <samp>`/mnt/toytown'</samp>.


<pre>
amq -M '/mnt/toytown type:=nfs;rfs:=/home/toytown;rhost:=toytown;fs:=${key}'
</pre>

<p>
<i>Amd</i> applies some simple security checks before allowing this
operation.  The check tests whether the incoming request is from a
privileged UDP port on the local machine.  "Permission denied" is
returned if the check fails.

<p>
A future release of <i>Amd</i> will include code to allow the <b>mount</b>(8)
command to mount automount points:


<pre>
mount -t amd /vol hesiod.vol
</pre>

<p>
This will then allow <i>Amd</i> to be controlled from the standard system
filesystem mount list.



<h3><a name="SEC80" href="amdref_toc.html#SEC80"><i>Amq</i> -s option</a></h3>
<p>
<a name="IDX298"></a>
<a name="IDX299"></a>

<p>
The "-s" option displays global statistics.  If any other options are specified
or any filesystems named then this option is ignored.  For example:


<pre>
requests  stale     mount     mount     unmount
deferred  fhandles  ok        failed    failed
1054      1         487       290       7017
</pre>

<dl compact>

<dt><samp>`Deferred requests'</samp>
<dd>
are those for which an immediate reply could not be constructed.  For
example, this would happen if a background mount was required.

<dt><samp>`Stale filehandles'</samp>
<dd>
counts the number of times the kernel passes a stale filehandle to <i>Amd</i>.
Large numbers indicate problems.

<dt><samp>`Mount ok'</samp>
<dd>
counts the number of automounts which were successful.

<dt><samp>`Mount failed'</samp>
<dd>
counts the number of automounts which failed.

<dt><samp>`Unmount failed'</samp>
<dd>
counts the number of times a filesystem could not be unmounted.  Very
large numbers here indicate that the time between unmount attempts
should be increased.
</DL>



<h3><a name="SEC81" href="amdref_toc.html#SEC81"><i>Amq</i> -u option</a></h3>
<p>
<a name="IDX300"></a>
<a name="IDX301"></a>

<p>
The "-u" option causes the time-to-live interval of the named mount
points to be expired, thus causing an unmount attempt.  This is the only
safe way to unmount an automounted filesystem.  It is not possible to
unmount a filesystem which has been mounted with the <samp>`nounmount'</samp>
flag.




<h3><a name="SEC82" href="amdref_toc.html#SEC82"><i>Amq</i> -v option</a></h3>
<p>
<a name="IDX302"></a>

<p>
The "-v" option displays the version of <i>Amd</i> in a similar way to
<i>Amd</i>'s "-v" option.



<h3><a name="SEC83" href="amdref_toc.html#SEC83">Other <i>Amq</i> options</a></h3>

<p>
Three other operations are implemented.  These modify the state of
<i>Amd</i> as a whole, rather than any particular filesystem.  The "-l",
"-x" and "-D" options have exactly the same effect as <i>Amd</i>'s
corresponding command line options.  The "-l" option is rejected by
<i>Amd</i> in the current version for obvious security reasons.  When
<i>Amd</i> receives a "-x"flag it limits the log options being modified
to those which were not enabled at startup.  This prevents a user
turning <em>off</em> any logging option which was specified at startup,
though any which have been turned off since then can still be turned
off.  The "-D" option has a similar behaviour.



<h1><a name="SEC84" href="amdref_toc.html#SEC84">FSinfo</a></h1>
<p>
<a name="IDX303"></a>
<a name="IDX304"></a>




<h2><a name="SEC85" href="amdref_toc.html#SEC85"><i>FSinfo</i> overview</a></h2>
<p>
<a name="IDX305"></a>

<p>
<i>FSinfo</i> is a filesystem management tool.  It has been designed to
work with <i>Amd</i> to help system administrators keep track of the ever
increasing filesystem namespace under their control.

<p>
The purpose of <i>FSinfo</i> is to generate all the important standard
filesystem data files from a single set of input data.  Starting with a
single data source guarantees that all the generated files are
self-consistent.  One of the possible output data formats is a set of
<i>Amd</i> maps which can be used amongst the set of hosts described in the
input data.

<p>
<i>FSinfo</i> implements a declarative language.  This language is
specifically designed for describing filesystem namespace and physical
layouts.  The basic declaration defines a mounted filesystem including
its device name, mount point, and all the volumes and access
permissions.  <i>FSinfo</i> reads this information and builds an internal
map of the entire network of hosts.  Using this map, many different data
formats can be produced including <tt>`/etc/fstab'</tt>,
<tt>`/etc/exports'</tt>, <i>Amd</i> mount maps and
<tt>`/etc/bootparams'</tt>.


<h2><a name="SEC86" href="amdref_toc.html#SEC86">Using <i>FSinfo</i></a></h2>
<p>
<a name="IDX306"></a>

<p>
The basic strategy when using <i>FSinfo</i> is to gather all the
information about all disks on all machines into one set of
declarations.  For each machine being managed, the following data is
required:


<ul>
<li>

Hostname
<li>

List of all filesystems and, optionally, their mount points.
<li>

Names of volumes stored on each filesystem.
<li>

NFS export information for each volume.
<li>

The list of static filesystem mounts.
</ul>

<p>
The following information can also be entered into the same
configuration files so that all data can be kept in one place.


<ul>
<li>

List of network interfaces
<li>

IP address of each interface
<li>

Hardware address of each interface
<li>

Dumpset to which each filesystem belongs
<li>

and more ...
</ul>

<p>
To generate <i>Amd</i> mount maps, the automount tree must also be defined
(see section <a href="amdref.html#SEC104">Defining an <i>Amd</i> Mount Map in <i>FSinfo</i></a>).  This will have been designed at
the time the volume names were allocated.  Some volume names will not be
automounted, so <i>FSinfo</i> needs an explicit list of which volumes
should be automounted.
<p>
Hostnames are required at several places in the <i>FSinfo</i> language.  It
is important to stick to either fully qualified names or unqualified
names.  Using a mixture of the two will inevitably result in confusion.

<p>
Sometimes volumes need to be referenced which are not defined in the set
of hosts being managed with <i>FSinfo</i>.  The required action is to add a
dummy set of definitions for the host and volume names required.  Since
the files generated for those particular hosts will not be used on them,
the exact values used is not critical.



<h2><a name="SEC87" href="amdref_toc.html#SEC87"><i>FSinfo</i> grammar</a></h2>
<p>
<a name="IDX307"></a>
<a name="IDX308"></a>

<p>
<i>FSinfo</i> has a relatively simple grammar.  Distinct syntactic
constructs exist for each of the different types of data, though they
share a common flavour.  Several conventions are used in the grammar
fragments below.

<p>
The notation, <i>list(</i><tt>xxx</tt><i>)</i>, indicates a list of zero or more
<tt>xxx</tt>'s.  The notation, <i>opt(</i><tt>xxx</tt><i>)</i>, indicates zero or one
<tt>xxx</tt>.  Items in double quotes, <i>eg</i> <tt>"host"</tt>, represent input
tokens.  Items in angle brackets, <i>eg</i> <var>&#60;hostname&#62;</var>, represent
strings in the input.  Strings need not be in double quotes, except to
differentiate them from reserved words.  Quoted strings may include the
usual set of C "<tt>\</tt>" escape sequences with one exception: a
backslash-newline-whitespace sequence is squashed into a single space
character.  To defeat this feature, put a further backslash at the start
of the second line.

<p>
At the outermost level of the grammar, the input consists of a
sequence of host and automount declarations.  These declarations are
all parsed before they are analyzed.  This means they can appear in
any order and cyclic host references are possible.


<pre>
fsinfo      : <i>list(</i>fsinfo_attr<i>)</i> ;

fsinfo_attr : host | automount ;
</pre>



<h2><a name="SEC88" href="amdref_toc.html#SEC88"><i>FSinfo</i> host definitions</a></h2>
<p>
<a name="IDX309"></a>
<a name="IDX310"></a>

<p>
A host declaration consists of three parts: a set of machine attribute
data, a list of filesystems physically attached to the machine, and a
list of additional statically mounted filesystems.


<pre>
host        : "host" host_data <i>list(</i>filesystem<i><i>)</i></i> <i>list(</i>mount<i><i>)</i></i> ;
</pre>

<p>
Each host must be declared in this way exactly once.  Such things as the
hardware address, the architecture and operating system types and the
cluster name are all specified within the <strong>host data</strong>.

<p>
All the disks the machine has should then be described in the <strong>list
of filesystems</strong>.  When describing disks, you can specify what
<strong>volname</strong> the disk/partition should have and all such entries are
built up into a dictionary which can then be used for building the
automounter maps.

<p>
The <strong>list of mounts</strong> specifies all the filesystems that should be
statically mounted on the machine.




<h2><a name="SEC89" href="amdref_toc.html#SEC89"><i>FSinfo</i> host attributes</a></h2>
<p>
<a name="IDX311"></a>
<a name="IDX312"></a>

<p>
The host data, <strong>host_data</strong>, always includes the <strong>hostname</strong>.  In
addition, several other host attributes can be given.


<pre>
host_data   : <var>&#60;hostname&#62;</var>
            | "{" <i>list(</i>host_attrs<i>)</i> "}" <var>&#60;hostname&#62;</var>
            ;

host_attrs  : host_attr "=" <var>&#60;string&#62;</var>
            | netif
            ;

host_attr   : "config"
            | "arch"
            | "os"
            | "cluster"
            ;
</pre>

<p>
The <strong>hostname</strong> is, typically, the fully qualified hostname of the
machine.

<p>
Examples:


<pre>
host dylan.doc.ic.ac.uk

host {
    os = hpux
    arch = hp300
} dougal.doc.ic.ac.uk
</pre>

<p>
The options that can be given as host attributes are shown below.




<h3><a name="SEC90" href="amdref_toc.html#SEC90">netif Option</a></h3>

<p>
This defines the set of network interfaces configured on the machine.
The interface attributes collected by <i>FSinfo</i> are the IP address,
subnet mask and hardware address.  Multiple interfaces may be defined
for hosts with several interfaces by an entry for each interface.  The
values given are sanity checked, but are currently unused for anything
else.


<pre>
netif       : "netif" <var>&#60;string&#62;</var> "{" <i>list(</i>netif_attrs<i>)</i> "}" ;

netif_attrs : netif_attr "=" <var>&#60;string&#62;</var> ;

netif_attr  : "inaddr" | "netmask" | "hwaddr" ;
</pre>

<p>
Examples:


<pre>
netif ie0 {
    inaddr  = 129.31.81.37
    netmask = 0xfffffe00
    hwaddr  = "08:00:20:01:a6:a5"
}

netif ec0 { }
</pre>



<h3><a name="SEC91" href="amdref_toc.html#SEC91">config Option</a></h3>
<p>
<a name="IDX313"></a>
<a name="IDX314"></a>

<p>
This option allows you to specify configuration variables for the
startup scripts (<tt>`rc'</tt> scripts).  A simple string should immediately
follow the keyword.

<p>
Example:


<pre>
config "NFS_SERVER=true"
config "ZEPHYR=true"
</pre>

<p>
This option is currently unsupported.



<h3><a name="SEC92" href="amdref_toc.html#SEC92">arch Option</a></h3>
<p>
<a name="IDX315"></a>
<a name="IDX316"></a>

<p>
This defines the architecture of the machine.  For example:


<pre>
arch = hp300
</pre>

<p>
This is intended to be of use when building architecture specific
mountmaps, however, the option is currently unsupported.



<h3><a name="SEC93" href="amdref_toc.html#SEC93">os Option</a></h3>
<p>
<a name="IDX317"></a>
<a name="IDX318"></a>

<p>
This defines the operating system type of the host.  For example:


<pre>
os = hpux
</pre>

<p>
This information is used when creating the <tt>`fstab'</tt> files, for
example in choosing which format to use for the <tt>`fstab'</tt> entries
within the file.



<h3><a name="SEC94" href="amdref_toc.html#SEC94">cluster Option</a></h3>
<p>
<a name="IDX319"></a>
<a name="IDX320"></a>

<p>
This is used for specifying in which cluster the machine belongs.  For
example:


<pre>
cluster = "theory"
</pre>

<p>
The cluster is intended to be used when generating the automount maps,
although it is currently unsupported.



<h2><a name="SEC95" href="amdref_toc.html#SEC95"><i>FSinfo</i> filesystems</a></h2>
<p>
<a name="IDX321"></a>

<p>
The list of physically attached filesystems follows the machine
attributes.  These should define all the filesystems available from this
machine, whether exported or not.  In addition to the device name,
filesystems have several attributes, such as filesystem type, mount
options, and <samp>`fsck'</samp> pass number which are needed to generate
<tt>`fstab'</tt> entries.


<pre>
filesystem  : "fs" <var>&#60;device&#62;</var> "{" <i>list(</i>fs_data<i>)</i> "}" ;

fs_data     : fs_data_attr "=" <var>&#60;string&#62;</var>
            | mount
            ;

fs_data_attr
            : "fstype" | "opts" | "passno"
            | "freq" | "dumpset" | "log"
            ;
</pre>

<p>
Here, <var>&#60;device&#62;</var> is the device name of the disk (for example,
<tt>`/dev/dsk/2s0'</tt>).  The device name is used for building the mount
maps and for the <tt>`fstab'</tt> file.  The attributes that can be
specified are shown in the following section.

<p>
The <i>FSinfo</i> configuration file for <code>dylan.doc.ic.ac.uk</code> is listed below.


<pre>
host dylan.doc.ic.ac.uk

fs /dev/dsk/0s0 {
	fstype = swap
}

fs /dev/dsk/0s0 {
	fstype = hfs
	opts = rw,noquota,grpid
	passno = 0;
	freq = 1;
	mount / { }
}

fs /dev/dsk/1s0 {
	fstype = hfs
	opts = defaults
	passno = 1;
	freq = 1;
	mount /usr {
		local {
			exportfs "dougal eden dylan zebedee brian"
			volname /nfs/hp300/local
		}
	}
}

fs /dev/dsk/2s0 {
	fstype = hfs
	opts = defaults
	passno = 1;
	freq = 1;
	mount default {
		exportfs "toytown_clients hangers_on"
		volname /home/dylan/dk2
	}
}

fs /dev/dsk/3s0 {
	fstype = hfs
	opts = defaults
	passno = 1;
	freq = 1;
	mount default {
		exportfs "toytown_clients hangers_on"
		volname /home/dylan/dk3
	}
}

fs /dev/dsk/5s0 {
	fstype = hfs
	opts = defaults
	passno = 1;
	freq = 1;
	mount default {
		exportfs "toytown_clients hangers_on"
		volname /home/dylan/dk5
	}
}
</pre>



<h3><a name="SEC96" href="amdref_toc.html#SEC96">fstype Option</a></h3>
<p>
<a name="IDX322"></a>
<a name="IDX323"></a>
<a name="IDX324"></a>

<p>
This specifies the type of filesystem being declared and will be placed
into the <tt>`fstab'</tt> file as is.  The value of this option will be
handed to <code>mount</code> as the filesystem type--it should have such
values as <code>4.2</code>, <code>nfs</code> or <code>swap</code>.  The value is not
examined for correctness.

<p>
There is one special case.  If the filesystem type is specified as
<samp>`export'</samp> then the filesystem information will not be added to the
host's <tt>`fstab'</tt> information, but it will still be visible on the
network.  This is useful for defining hosts which contain referenced
volumes but which are not under full control of <i>FSinfo</i>.

<p>
Example:


<pre>
fstype = swap
</pre>



<h3><a name="SEC97" href="amdref_toc.html#SEC97">opts Option</a></h3>
<p>
<a name="IDX325"></a>
<a name="IDX326"></a>

<p>
This defines any options that should be given to <b>mount</b>(8) in the
<tt>`fstab'</tt> file.  For example:


<pre>
opts = rw,nosuid,grpid
</pre>



<h3><a name="SEC98" href="amdref_toc.html#SEC98">passno Option</a></h3>
<p>
<a name="IDX327"></a>
<a name="IDX328"></a>

<p>
This defines the <b>fsck</b>(8) pass number in which to check the
filesystem.  This value will be placed into the <tt>`fstab'</tt> file.

<p>
Example:


<pre>
passno = 1
</pre>



<h3><a name="SEC99" href="amdref_toc.html#SEC99">freq Option</a></h3>
<p>
<a name="IDX329"></a>
<a name="IDX330"></a>

<p>
This defines the interval (in days) between dumps.  The value is placed
as is into the <tt>`fstab'</tt> file.

<p>
Example:


<pre>
freq = 3
</pre>



<h3><a name="SEC100" href="amdref_toc.html#SEC100">mount Option</a></h3>
<p>
<a name="IDX331"></a>
<a name="IDX332"></a>
<a name="IDX333"></a>
<a name="IDX334"></a>
<a name="IDX335"></a>

<p>
This defines the mountpoint at which to place the filesystem.  If the
mountpoint of the filesystem is specified as <code>default</code>, then the
filesystem will be mounted in the automounter's tree under its volume
name and the mount will automatically be inherited by the automounter.

<p>
Following the mountpoint, namespace information for the filesystem may
be described.  The options that can be given here are <code>exportfs</code>,
<code>volname</code> and <code>sel</code>.

<p>
The format is:


<pre>
mount       : "mount" vol_tree ;

vol_tree    : <i>list(</i>vol_tree_attr<i>)</i> ;

vol_tree_attr
            :  <var>&#60;string&#62;</var> "{" <i>list(</i>vol_tree_info<i>)</i> vol_tree "}" ;

vol_tree_info
            : "exportfs" <var>&#60;export-data&#62;</var>
            | "volname" <var>&#60;volname&#62;</var>
            | "sel" <var>&#60;selector-list&#62;</var>
            ;
</pre>

<p>
Example:


<pre>
mount default {
    exportfs "dylan dougal florence zebedee"
    volname /vol/andrew
}
</pre>

<p>
In the above example, the filesystem currently being declared will have
an entry placed into the <tt>`exports'</tt> file allowing the filesystem to
be exported to the machines <code>dylan</code>, <code>dougal</code>, <code>florence</code>
and <code>zebedee</code>.  The volume name by which the filesystem will be
referred to remotely, is <tt>`/vol/andrew'</tt>.  By declaring the
mountpoint to be <code>default</code>, the filesystem will be mounted on the
local machine in the automounter tree, where <i>Amd</i> will automatically
inherit the mount as <tt>`/vol/andrew'</tt>.
<dl compact>

<dt><samp>`exportfs'</samp>
<dd>
a string defining which machines the filesystem may be exported to.
This is copied, as is, into the <tt>`exports'</tt> file--no sanity checking
is performed on this string.
<dt><samp>`volname'</samp>
<dd>
a string which declares the remote name by which to reference the
filesystem.  The string is entered into a dictionary and allows you to
refer to this filesystem in other places by this volume name.
<dt><samp>`sel'</samp>
<dd>
a string which is placed into the automounter maps as a selector for the
filesystem.
</DL>



<h3><a name="SEC101" href="amdref_toc.html#SEC101">dumpset Option</a></h3>
<p>
<a name="IDX336"></a>
<a name="IDX337"></a>

<p>
This provides support for Imperial College's local file backup tools and
is not documented further here.



<h3><a name="SEC102" href="amdref_toc.html#SEC102">log Option</a></h3>
<p>
<a name="IDX338"></a>
<a name="IDX339"></a>

<p>
Specifies the log device for the current filesystem. This is ignored if
not required by the particular filesystem type.



<h2><a name="SEC103" href="amdref_toc.html#SEC103"><i>FSinfo</i> static mounts</a></h2>
<p>
<a name="IDX340"></a>
<a name="IDX341"></a>

<p>
Each host may also have a number of statically mounted filesystems.  For
example, the host may be a diskless workstation in which case it will
have no <code>fs</code> declarations.  In this case the <code>mount</code>
declaration is used to determine from where its filesystems will be
mounted.  In addition to being added to the <tt>`fstab'</tt> file, this
information can also be used to generate a suitable <tt>`bootparams'</tt>
file.

<pre>
mount       : "mount" <var>&#60;volname&#62;</var> <i>list(</i>localinfo<i>)</i> ;

localinfo   : localinfo_attr <var>&#60;string&#62;</var> ;

localinfo_attr
            : "as"
            | "from"
            | "fstype"
            | "opts"
            ;
</pre>

<p>
The filesystem specified to be mounted will be searched for in the
dictionary of volume names built when scanning the list of hosts'
definitions.

<p>
The attributes have the following semantics:
<dl compact>

<dt><samp>`from <var>machine</var>'</samp>
<dd>
mount the filesystem from the machine with the hostname of
<strong>machine</strong>.
<dt><samp>`as <var>mountpoint</var>'</samp>
<dd>
mount the filesystem locally as the name given, in case this is
different from the advertised volume name of the filesystem.

<dt><samp>`opts <var>options</var>'</samp>
<dd>
native <b>mount</b>(8) options.

<dt><samp>`fstype <var>type</var>'</samp>
<dd>
type of filesystem to be mounted.
</DL>

<p>
An example:


<pre>
mount /export/exec/hp300/local as /usr/local
</pre>

<p>
If the mountpoint specified is either <tt>`/'</tt> or <tt>`swap'</tt>, the
machine will be considered to be booting off the net and this will be
noted for use in generating a <tt>`bootparams'</tt> file for the host which
owns the filesystems.



<h2><a name="SEC104" href="amdref_toc.html#SEC104">Defining an <i>Amd</i> Mount Map in <i>FSinfo</i></a></h2>
<p>
<a name="IDX342"></a>
<a name="IDX343"></a>

<p>
The maps used by <i>Amd</i> can be constructed from <i>FSinfo</i> by defining
all the automount trees.  <i>FSinfo</i> takes all the definitions found and
builds one map for each top level tree.

<p>
The automount tree is usually defined last.  A single automount
configuration will usually apply to an entire management domain.  One
<code>automount</code> declaration is needed for each <i>Amd</i> automount point.
<i>FSinfo</i> determines whether the automount point is <strong>direct</strong>
(see section <a href="amdref.html#SEC65">Direct Automount Filesystem (<samp>`type:=direct'</samp>)</a>) or <strong>indirect</strong>
(see section <a href="amdref.html#SEC68">Top-level Filesystem (<samp>`type:=toplvl'</samp>)</a>).  Direct automount points are
distinguished by the fact that there is no underlying
<strong>automount_tree</strong>.

<pre>
automount   : "automount" opt(auto_opts<i>)</i> automount_tree ;

auto_opts   : "opts" <var>&#60;mount-options&#62;</var> ;

automount_tree
            : <i>list(</i>automount_attr<i>)</i>
            ;

automount_attr
            : <var>&#60;string&#62;</var> "=" <var>&#60;volname&#62;</var>
            | <var>&#60;string&#62;</var> "-&#62;" <var>&#60;symlink&#62;</var>
            | <var>&#60;string&#62;</var> "{" automount_tree "}"
            ;
</pre>

<p>
If <var>&#60;mount-options&#62;</var> is given, then it is the string to be placed in
the maps for <i>Amd</i> for the <code>opts</code> option.

<p>
A <strong>map</strong> is typically a tree of filesystems, for example <tt>`home'</tt>
normally contains a tree of filesystems representing other machines in
the network.

<p>
A map can either be given as a name representing an already defined
volume name, or it can be a tree.  A tree is represented by placing
braces after the name.  For example, to define a tree <tt>`/vol'</tt>, the
following map would be defined:


<pre>
automount /vol { }
</pre>

<p>
Within a tree, the only items that can appear are more maps.
For example:


<pre>
automount /vol {
    andrew { }
    X11 { }
}
</pre>

<p>
In this case, <i>FSinfo</i> will look for volumes named <tt>`/vol/andrew'</tt>
and <tt>`/vol/X11'</tt> and a map entry will be generated for each.  If the
volumes are defined more than once, then <i>FSinfo</i> will generate
a series of alternate entries for them in the maps.
<p>
Instead of a tree, either a link (<var>name</var> <code>-&#62;</code>
<var>destination</var>) or a reference can be specified (<var>name</var> <code>=</code>
<var>destination</var>).  A link creates a symbolic link to the string
specified, without further processing the entry.  A reference will
examine the destination filesystem and optimise the reference.  For
example, to create an entry for <code>njw</code> in the <tt>`/homes'</tt> map,
either of the two forms can be used:

<pre>
automount /homes {
    njw -&#62; /home/dylan/njw
}
</pre>

<p>
or


<pre>
automount /homes {
    njw = /home/dylan/njw
}
</pre>

<p>
In the first example, when <tt>`/homes/njw'</tt> is referenced from <i>Amd</i>,
a link will be created leading to <tt>`/home/dylan/njw'</tt> and the
automounter will be referenced a second time to resolve this filename.
The map entry would be:


<pre>
njw type:=link;fs:=/home/dylan/njw
</pre>

<p>
In the second example, the destination directory is analysed and found
to be in the filesystem <tt>`/home/dylan'</tt> which has previously been
defined in the maps. Hence the map entry will look like:


<pre>
njw rhost:=dylan;rfs:=/home/dylan;sublink:=njw
</pre>

<p>
Creating only one symbolic link, and one access to <i>Amd</i>.



<h2><a name="SEC105" href="amdref_toc.html#SEC105"><i>FSinfo</i> Command Line Options</a></h2>
<p>
<a name="IDX344"></a>
<a name="IDX345"></a>

<p>
<i>FSinfo</i> is started from the command line by using the command:


<pre>
fsinfo [<i>options</i>] files ...
</pre>

<p>
The input to <i>FSinfo</i> is a single set of definitions of machines and
automount maps.  If multiple files are given on the command-line, then
the files are concatenated together to form the input source.  The files
are passed individually through the C pre-processor before being parsed.

<p>
Several options define a prefix for the name of an output file.  If the
prefix is not specified no output of that type is produced.  The suffix
used will correspond either to the hostname to which a file belongs, or
to the type of output if only one file is produced.  Dumpsets and the
<tt>`bootparams'</tt> file are in the latter class.  To put the output into
a subdirectory simply put a <tt>`/'</tt> at the end of the prefix, making
sure that the directory has already been made before running
<samp>`fsinfo'</samp>.




<h3><a name="SEC106" href="amdref_toc.html#SEC106"><code>-a</code> <var>autodir</var></a></h3>

<p>
Specifies the directory name in which to place the automounter's
mountpoints.  This defaults to <tt>`/a'</tt>.  Some sites have the autodir set
to be <tt>`/amd'</tt>, and this would be achieved by:


<pre>
fsinfo -a /amd ...
</pre>



<h3><a name="SEC107" href="amdref_toc.html#SEC107"><code>-b</code> <var>bootparams</var></a></h3>
<p>
<a name="IDX346"></a>

<p>
This specifies the prefix for the <tt>`bootparams'</tt> filename.  If it is
not given, then the file will not be generated.  The <tt>`bootparams'</tt>
file will be constructed for the destination machine and will be placed
into a file named <tt>`bootparams'</tt> and prefixed by this string.  The
file generated contains a list of entries describing each diskless
client that can boot from the destination machine.

<p>
As an example, to create a <tt>`bootparams'</tt> file in the directory
<tt>`generic'</tt>, the following would be used:


<pre>
fsinfo -b generic/ ...
</pre>



<h3><a name="SEC108" href="amdref_toc.html#SEC108"><code>-d</code> <var>dumpsets</var></a></h3>
<p>
<a name="IDX347"></a>

<p>
This specifies the prefix for the <tt>`dumpsets'</tt> file.  If it is not
specified, then the file will not be generated.  The file will be for
the destination machine and will be placed into a filename
<tt>`dumpsets'</tt>, prefixed by this string.  The <tt>`dumpsets'</tt> file is
for use by Imperial College's local backup system.

<p>
For example, to create a dumpsets file in the directory <tt>`generic'</tt>,
then you would use the following:


<pre>
fsinfo -d generic/ ...
</pre>



<h3><a name="SEC109" href="amdref_toc.html#SEC109"><code>-e</code> <var>exportfs</var></a></h3>
<p>
<a name="IDX348"></a>

<p>
Defines the prefix for the <tt>`exports'</tt> files.  If it is not given,
then the file will not be generated.  For each machine defined in the
configuration files as having disks, an <tt>`exports'</tt> file is
constructed and given a filename determined by the name of the machine,
prefixed with this string.  If a machine is defined as diskless, then no
<tt>`exports'</tt> file will be created for it.  The files contain entries
for directories on the machine that may be exported to clients.

<p>
Example: To create the <tt>`exports'</tt> files for each diskful machine
and place them into the directory <tt>`exports'</tt>:


<pre>
fsinfo -e exports/ ...
</pre>



<h3><a name="SEC110" href="amdref_toc.html#SEC110"><code>-f</code> <var>fstab</var></a></h3>
<p>
<a name="IDX349"></a>

<p>
This defines the prefix for the <tt>`fstab'</tt> files.  The files will only
be created if this prefix is defined.  For each machine defined in the
configuration files, a <tt>`fstab'</tt> file is created with the filename
determined by prefixing this string with the name of the machine.  These
files contain entries for filesystems and partitions to mount at boot
time.

<p>
Example, to create the files in the directory <tt>`fstabs'</tt>:


<pre>
fsinfo -f fstabs/ ...
</pre>



<h3><a name="SEC111" href="amdref_toc.html#SEC111"><code>-h</code> <var>hostname</var></a></h3>
<p>
<a name="IDX350"></a>

<p>
Defines the hostname of the destination machine to process for.  If this
is not specified, it defaults to the local machine name, as returned by
<b>gethostname</b>(2).

<p>
Example:


<pre>
fsinfo -h dylan.doc.ic.ac.uk ...
</pre>



<h3><a name="SEC112" href="amdref_toc.html#SEC112"><code>-m</code> <var>mount-maps</var></a></h3>
<p>
<a name="IDX351"></a>

<p>
Defines the prefix for the automounter files.  The maps will only be
produced if this prefix is defined.  The mount maps suitable for the
network defined by the configuration files will be placed into files
with names calculated by prefixing this string to the name of each map.

<p>
For example, to create the automounter maps and place them in the
directory <tt>`automaps'</tt>:


<pre>
fsinfo -m automaps/ ...
</pre>



<h3><a name="SEC113" href="amdref_toc.html#SEC113"><code>-q</code></a></h3>
<p>
<a name="IDX352"></a>

<p>
Selects quiet mode.  <i>FSinfo</i> suppress the "running commentary" and
only outputs any error messages which are generated.



<h3><a name="SEC114" href="amdref_toc.html#SEC114"><code>-v</code></a></h3>
<p>
<a name="IDX353"></a>

<p>
Selects verbose mode.  When this is activated, the program will display
more messages, and display all the information discovered when
performing the semantic analysis phase.  Each verbose message is output
to <tt>`stdout'</tt> on a line starting with a <samp>`#'</samp> character.



<h3><a name="SEC115" href="amdref_toc.html#SEC115"><code>-D</code> <var>name[=defn]</var></a></h3>

<p>
Defines a symbol <strong>name</strong> for the preprocessor when reading the
configuration files.  Equivalent to <code>#define</code> directive.



<h3><a name="SEC116" href="amdref_toc.html#SEC116"><code>-I</code> <var>directory</var></a></h3>

<p>
This option is passed into the preprocessor for the configuration files.
It specifies directories in which to find include files



<h3><a name="SEC117" href="amdref_toc.html#SEC117"><code>-U</code> <var>name</var></a></h3>

<p>
Removes any initial definition of the symbol <strong>name</strong>.  Inverse of the
<code>-D</code> option.



<h2><a name="SEC118" href="amdref_toc.html#SEC118">Errors produced by <i>FSinfo</i></a></h2>
<p>
<a name="IDX354"></a>

<p>
The following table documents the errors and warnings which <i>FSinfo</i> may produce.

<dl compact>

<dt><tt>can't open <var>filename</var> for writing</tt>
<dd>
Occurs if any errors are encountered when opening an output file.
<dt><tt>unknown host attribute</tt>
<dd>
Occurs if an unrecognised keyword is used when defining a host.
<dt><tt>unknown filesystem attribute</tt>
<dd>
Occurs if an unrecognised keyword is used when defining a host's
filesystems.
<dt><tt>not allowed '/' in a directory name</tt>
<dd>
When reading the configuration input, if there is a filesystem
definition which contains a pathname with multiple directories for any
part of the mountpoint element, and it is not a single absolute path,
then this message will be produced by the parser.
<dt><tt>unknown directory attribute</tt>
<dd>
If an unknown keyword is found while reading the definition of a host's
filesystem mount option.

<dt><tt>unknown mount attribute</tt>
<dd>
Occurs if an unrecognised keyword is found while parsing the list of
static mounts.
<dt><tt>" expected</tt>
<dd>
Occurs if an unescaped newline is found in a quoted string.

<dt><tt>unknown \ sequence</tt>
<dd>
Occurs if an unknown escape sequence is found inside a string.  Within a
string, you can give the standard C escape sequences for strings, such
as newlines and tab characters.
<dt><tt><var>filename</var>: cannot open for reading</tt>
<dd>
If a file specified on the command line as containing configuration data
could not be opened.
<dt><tt>end of file within comment</tt>
<dd>
A comment was unterminated before the end of one of the configuration
files.

<dt><tt>host field "<var>field-name</var>" already set</tt>
<dd>
If duplicate definitions are given for any of the fields with a host
definition.

<dt><tt>duplicate host <var>hostname</var>!</tt>
<dd>
If a host has more than one definition.

<dt><tt>netif field <var>field-name</var> already set</tt>
<dd>
Occurs if you attempt to define an attribute of an interface more than
once.

<dt><tt>malformed IP dotted quad: <var>address</var></tt>
<dd>
If the Internet address of an interface is incorrectly specified.  An
Internet address definition is handled to <b>inet_addr</b>(3N) to see if it
can cope.  If not, then this message will be displayed.

<dt><tt>malformed netmask: <var>netmask</var></tt>
<dd>
If the netmask cannot be decoded as though it were a hexadecimal number,
then this message will be displayed.  It will typically be caused by
incorrect characters in the <var>netmask</var> value.
<dt><tt>fs field "<var>field-name</var>" already set</tt>
<dd>
Occurs when multiple definitions are given for one of the attributes of a
host's filesystem.

<dt><tt>mount tree field "<var>field-name</var>" already set</tt>
<dd>
Occurs when the <var>field-name</var> is defined more than once during the
definition of a filesystems mountpoint.

<dt><tt>mount field "<var>field-name</var>" already set</tt>
<dd>
Occurs when a static mount has multiple definitions of the same field.

<dt><tt>no disk mounts on <var>hostname</var></tt>
<dd>
If there are no static mounts, nor local disk mounts specified for a
machine, this message will be displayed.

<dt><tt><var>host</var>:<var>device</var> needs field "<var>field-name</var>"</tt>
<dd>
Occurs when a filesystem is missing a required field. <var>field-name</var> could
be one of <code>fstype</code>, <code>opts</code>, <code>passno</code> or
<code>mount</code>.
<dt><tt><var>filesystem</var> has a volname but no exportfs data</tt>
<dd>
Occurs when a volume name is declared for a file system, but the string
specifying what machines the filesystem can be exported to is
missing.

<dt><tt>sub-directory <var>directory</var> of <var>directory-tree</var> starts with '/'</tt>
<dd>
Within the filesystem specification for a host, if an element
<var>directory</var> of the mountpoint begins with a <samp>`/'</samp> and it is not
the start of the tree.
<dt><tt><var>host</var>:<var>device</var> has no mount point</tt>
<dd>
Occurs if the <samp>`mount'</samp> option is not specified for a host's
filesystem.
<dt><tt><var>host</var>:<var>device</var> has more than one mount point</tt>
<dd>
Occurs if the mount option for a host's filesystem specifies multiple
trees at which to place the mountpoint.
<dt><tt>no volname given for <var>host</var>:<var>device</var></tt>
<dd>
Occurs when a filesystem is defined to be mounted on <tt>`default'</tt>, but
no volume name is given for the file system, then the mountpoint cannot
be determined.
<dt><tt><var>host</var>:mount field specified for swap partition</tt>
<dd>
Occurs if a mountpoint is given for a filesystem whose type is declared
to be <code>swap</code>.
<dt><tt>ambiguous mount: <var>volume</var> is a replicated filesystem</tt>
<dd>
If several filesystems are declared as having the same volume name, they
will be considered replicated filesystems.  To mount a replicated
filesystem statically, a specific host will need to be named, to say
which particular copy to try and mount, else this error will
result.
<dt><tt>cannot determine localname since volname <var>volume</var> is not uniquely defined</tt>
<dd>
If a volume is replicated and an attempt is made to mount the filesystem
statically without specifying a local mountpoint, <i>FSinfo</i> cannot
calculate a mountpoint, as the desired pathname would be
ambiguous.
<dt><tt>volname <var>volume</var> is unknown</tt>
<dd>
Occurs if an attempt is made to mount or reference a volume name which
has not been declared during the host filesystem definitions.
<dt><tt>volname <var>volume</var> not exported from <var>machine</var></tt>
<dd>
Occurs if you attempt to mount the volume <var>volume</var> from a machine
which has not declared itself to have such a filesystem
available.
<dt><tt>network booting requires both root and swap areas</tt>
<dd>
Occurs if a machine has mount declarations for either the root partition
or the swap area, but not both.  You cannot define a machine to only
partially boot via the network.
<dt><tt>unknown volname <var>volume</var> automounted <i>[</i> on &#60;name&#62; <i>]</i></tt>
<dd>
Occurs if <var>volume</var> is used in a definition of an automount map but the volume
name has not been declared during the host filesystem definitions.
<dt><tt>not allowed '/' in a directory name</tt>
<dd>
Occurs when a pathname with multiple directory elements is specified as
the name for an automounter tree.  A tree should only have one name at
each level.

<dt><tt><var>device</var> has duplicate exportfs data</tt>
<dd>
Produced if the <samp>`exportfs'</samp> option is used multiple times within the
same branch of a filesystem definition. For example, if you attempt to
set the <samp>`exportfs'</samp> data at different levels of the mountpoint
directory tree.
<dt><tt>sub-directory of <var>directory-tree</var> is named "default"</tt>
<dd>
<samp>`default'</samp> is a keyword used to specify if a mountpoint should be
automatically calculated by <i>FSinfo</i>.  If you attempt to specify a
directory name as this, it will use the filename of <tt>`default'</tt> but
will produce this warning.
<dt><tt>pass number for <var>host</var>:<var>device</var> is non-zero</tt>
<dd>
Occurs if <var>device</var> has its <samp>`fstype'</samp> declared to be <samp>`swap'</samp>
or <samp>`export'</samp> and the <b>fsck</b>(8) pass number is set. Swap devices should not be
fsck'd.  See section <a href="amdref.html#SEC96">fstype Option</a>
<dt><tt>dump frequency for <var>host</var>:<var>device</var> is non-zero</tt>
<dd>
Occurs if <var>device</var> has its <samp>`fstype'</samp> declared to be <samp>`swap'</samp>
or <samp>`export'</samp> and the <samp>`dump'</samp> option is set to a value greater
than zero.  Swap devices should not be dumped.
</DL>



<h1><a name="SEC119" href="amdref_toc.html#SEC119">Examples</a></h1>



<h2><a name="SEC120" href="amdref_toc.html#SEC120">User Filesystems</a></h2>
<p>
<a name="IDX355"></a>
<a name="IDX356"></a>

<p>
With more than one fileserver, the directories most frequently
cross-mounted are those containing user home directories.  A common
convention used at Imperial College is to mount the user disks under
<tt>/home/</tt><i>machine</i>.

<p>
Typically, the <samp>`/etc/fstab'</samp> file contained a long list of entries
such as:


<pre>
<i>machine</i>:/home/<i>machine</i> /home/<i>machine</i> nfs ...
</pre>

<p>
for each fileserver on the network.

<p>
There are numerous problems with this system.  The mount list can become
quite large and some of the machines may be down when a system is
booted.  When a new fileserver is installed, <samp>`/etc/fstab'</samp> must be
updated on every machine, the mount directory created and the filesystem
mounted.

<p>
In many environments most people use the same few workstations, but
it is convenient to go to a colleague's machine and access your own
files.  When a server goes down, it can cause a process on a client
machine to hang.  By minimising the mounted filesystems to only include
those actively being used, there is less chance that a filesystem will
be mounted when a server goes down.

<p>
The following is a short extract from a map taken from a research fileserver
at Imperial College.

<p>
Note the entry for <samp>`localhost'</samp> which is used for users such as
the operator (<samp>`opr'</samp>) who have a home directory on most machine as
<samp>`/home/localhost/opr'</samp>.


<pre>
/defaults       opts:=rw,intr,grpid,nosuid
charm           host!=${key};type:=nfs;rhost:=${key};rfs:=/home/${key} \
                host==${key};type:=ufs;dev:=/dev/xd0g
#
...

#
localhost       type:=link;fs:=${host}
...
#
# dylan has two user disks so have a
# top directory in which to mount them.
#
dylan           type:=auto;fs:=${map};pref:=${key}/
#
dylan/dk2       host!=dylan;type:=nfs;rhost:=dylan;rfs:=/home/${key} \
                host==dylan;type:=ufs;dev:=/dev/dsk/2s0
#
dylan/dk5       host!=dylan;type:=nfs;rhost:=dylan;rfs:=/home/${key} \
                host==dylan;type:=ufs;dev:=/dev/dsk/5s0
...
#
toytown         host!=${key};type:=nfs;rhost:=${key};rfs:=/home/${key} \
                host==${key};type:=ufs;dev:=/dev/xy1g
...
#
zebedee         host!=${key};type:=nfs;rhost:=${key};rfs:=/home/${key} \
                host==${key};type:=ufs;dev:=/dev/dsk/1s0
#
# Just for access...
#
gould           type:=auto;fs:=${map};pref:=${key}/
gould/staff     host!=gould;type:=nfs;rhost:=gould;rfs:=/home/${key}
#
gummo           host!=${key};type:=nfs;rhost:=${key};rfs:=/home/${key}
...
</pre>

<p>
This map is shared by most of the machines listed so on those
systems any of the user disks is accessible via a consistent name.
<i>Amd</i> is started with the following command


<pre>
amd /home amd.home
</pre>

<p>
Note that when mounting a remote filesystem, the <strong>automounted</strong>
mount point is referenced, so that the filesystem will be mounted if
it is not yet (at the time the remote <samp>`mountd'</samp> obtains the file handle).



<h2><a name="SEC121" href="amdref_toc.html#SEC121">Home Directories</a></h2>
<p>
<a name="IDX357"></a>
<a name="IDX358"></a>
<a name="IDX359"></a>

<p>
One convention for home directories is to locate them in <samp>`/homes'</samp>
so user <samp>`jsp'</samp>'s home directory is <samp>`/homes/jsp'</samp>.  With more
than a single fileserver it is convenient to spread user files across
several machines.  All that is required is a mount-map which converts
login names to an automounted directory.

<p>
Such a map might be started by the command:


<pre>
amd /homes amd.homes
</pre>

<p>
where the map <samp>`amd.homes'</samp> contained the entries:


<pre>
/defaults   type:=link   # All the entries are of type:=link
jsp         fs:=/home/charm/jsp
njw         fs:=/home/dylan/dk5/njw
...
phjk        fs:=/home/toytown/ai/phjk
sjv         fs:=/home/ganymede/sjv
</pre>

<p>
Whenever a login name is accessed in <samp>`/homes'</samp> a symbolic link
appears pointing to the real location of that user's home directory.  In
this example, <samp>`/homes/jsp'</samp> would appear to be a symbolic link
pointing to <samp>`/home/charm/jsp'</samp>.  Of course, <samp>`/home'</samp> would also
be an automount point.

<p>
This system causes an extra level of symbolic links to be used.
Although that turns out to be relatively inexpensive, an alternative is
to directly mount the required filesystems in the <samp>`/homes'</samp>
map.  The required map is simple, but long, and its creation is best automated.
The entry for <samp>`jsp'</samp> could be:


<pre>
jsp   -sublink:=${key};rfs:=/home/charm \
               host==charm;type:=ufs;dev:=/dev/xd0g \
               host!=charm;type:=nfs;rhost:=charm
</pre>

<p>
This map can become quite big if it contains a large number of entries.
By combining two other features of <i>Amd</i> it can be greatly simplified.

<p>
First the UFS partitions should be mounted under the control of
<samp>`/etc/fstab'</samp>, taking care that they are mounted in the same place
that <i>Amd</i> would have automounted them.  In most cases this would be
something like <samp>`/a/<strong>host</strong>/home/<strong>host</strong>'</samp> and
<samp>`/etc/fstab'</samp> on host <samp>`charm'</samp> would have a line:

<pre>
/dev/xy0g /a/charm/home/charm 4.2 rw,nosuid,grpid 1 5
</pre>

<p>
The map can then be changed to:


<pre>
/defaults    type:=nfs;sublink:=${key};opts:=rw,intr,nosuid,grpid
jsp          rhost:=charm;rfs:=/home/charm
njw          rhost:=dylan;rfs:=/home/dylan/dk5
...
phjk         rhost:=toytown;rfs:=/home/toytown;sublink:=ai/${key}
sjv          rhost:=ganymede;rfs:=/home/ganymede
</pre>

<p>
This map operates as usual on a remote machine (<i>ie</i> <code>${host}</code>
not equal to <code>${rhost}</code>).  On the machine where the filesystem is
stored (<i>ie</i> <code>${host}</code> equal to <code>${rhost}</code>), <i>Amd</i>
will construct a local filesystem mount point which corresponds to the
name of the locally mounted UFS partition.  If <i>Amd</i> is started with
the "-r" option then instead of attempting an NFS mount, <i>Amd</i> will
simply inherit the UFS mount (see section <a href="amdref.html#SEC70">Inheritance Filesystem</a>).  If
"-r" is not used then a loopback NFS mount will be made.  This type of
mount is known to cause a deadlock on many systems.



<h2><a name="SEC122" href="amdref_toc.html#SEC122">Architecture Sharing</a></h2>
<p>
<a name="IDX360"></a>
<a name="IDX361"></a>
<a name="IDX362"></a>

<p>
Often a filesystem will be shared by machines of different architectures.
Separate trees can be maintained for the executable images for each
architecture, but it may be more convenient to have a shared tree,
with distinct subdirectories.

<p>
A shared tree might have the following structure on the fileserver (called
<samp>`fserver'</samp> in the example):


<pre>
local/tex
local/tex/fonts
local/tex/lib
local/tex/bin
local/tex/bin/sun3
local/tex/bin/sun4
local/tex/bin/hp9000
...
</pre>

<p>
In this example, the subdirectories of <samp>`local/tex/bin'</samp> should be
hidden when accessed via the automount point (conventionally <samp>`/vol'</samp>).
A mount-map for <samp>`/vol'</samp> to achieve this would look like:


<pre>
/defaults   sublink:=${/key};rhost:=fserver;type:=link
tex         type:=auto;fs:=${map};pref:=${key}/
tex/fonts   host!=fserver;type:=nfs;rfs:=/vol/tex \
            host==fserver;fs:=/usr/local/tex
tex/lib     host!=fserver;type:=nfs;rfs:=/vol/tex \
            host==fserver;fs:=/usr/local/tex
tex/bin     -sublink:=${/key}/${arch} host!=fserver;type:=nfs;rfs:=/vol/tex \
            host:=fserver;fs:=/usr/local/tex
</pre>

<p>
When <samp>`/vol/tex/bin'</samp> is referenced, the current machine architecture
is automatically appended to the path by the <code>${sublink}</code>
variable.  This means that users can have <samp>`/vol/tex/bin'</samp> in their
<samp>`PATH'</samp> without concern for architecture dependencies.



<h2><a name="SEC123" href="amdref_toc.html#SEC123">Wildcard names &#38; Replicated Servers</a></h2>

<p>
By using the wildcard facility, <i>Amd</i> can <strong>overlay</strong> an existing
directory with additional entries.
The system files are usually mounted under <samp>`/usr'</samp>.  If instead
<i>Amd</i> is mounted on <samp>`/usr'</samp>, additional
names can be overlayed to augment or replace names in the "master" <samp>`/usr'</samp>.
A map to do this would have the form:


<pre>
local  type:=auto;fs:=local-map
share  type:=auto;fs:=share-map
*      -type:=nfs;rfs:=/export/exec/${arch};sublink:="${key}" \
        rhost:=fserv1  rhost:=fserv2  rhost:=fserv3
</pre>

<p>
Note that the assignment to <code>${sublink}</code> is surrounded by double
quotes to prevent the incoming key from causing the map to be
misinterpreted.  This map has the effect of directing any access to
<samp>`/usr/local'</samp> or <samp>`/usr/share'</samp> to another automount point.

<p>
In this example, it is assumed that the <samp>`/usr'</samp> files are replicated
on three fileservers: <samp>`fserv1'</samp>, <samp>`fserv2'</samp> and <samp>`fserv3'</samp>.
For any references other than to <samp>`local'</samp> and <samp>`share'</samp> one of
the servers is used and a symbolic link to
<tt>${autodir}/${rhost}/export/exec/${arch}/<i>whatever</i></tt> is
returned once an appropriate filesystem has been mounted.


<h2><a name="SEC124" href="amdref_toc.html#SEC124"><samp>`rwho'</samp> servers</a></h2>
<p>
<a name="IDX363"></a>
<a name="IDX364"></a>
<a name="IDX365"></a>

<p>
The <samp>`/usr/spool/rwho'</samp> directory is a good candidate for automounting.
For efficiency reasons it is best to capture the rwho data on a small
number of machines and then mount that information onto a large number
of clients.  The data written into the rwho files is byte order dependent
so only servers with the correct byte ordering can be used by a client:


<pre>
/defaults         type:=nfs
usr/spool/rwho    -byte==little;rfs:=/usr/spool/rwho \
                      rhost:=vaxA  rhost:=vaxB \
                  || -rfs:=/usr/spool/rwho \
                      rhost:=sun4  rhost:=hp300
</pre>



<h2><a name="SEC125" href="amdref_toc.html#SEC125"><samp>`/vol'</samp></a></h2>
<p>
<a name="IDX366"></a>
<a name="IDX367"></a>
<a name="IDX368"></a>

<p>
<samp>`/vol'</samp> is used as a catch-all for volumes which do not have other
conventional names.

<p>
Below is part of the <samp>`/vol'</samp> map for the domain <samp>`doc.ic.ac.uk'</samp>.
The <samp>`r+d'</samp> tree is used for new or experimental software that needs
to be available everywhere without installing it on all the fileservers.
Users wishing to try out the new software then simply include
<samp>`/vol/r+d/{bin,ucb}'</samp> in their path.
<p>
The main tree resides on one host <samp>`gould.doc.ic.ac.uk'</samp>, which has
different <samp>`bin'</samp>, <samp>`etc'</samp>, <samp>`lib'</samp> and <samp>`ucb'</samp>
sub-directories for each machine architecture.  For example,
<samp>`/vol/r+d/bin'</samp> for a Sun-4 would be stored in the sub-directory
<samp>`bin/sun4'</samp> of the filesystem <samp>`/usr/r+d'</samp>.  When it was accessed
a symbolic link pointing to <samp>`/a/gould/usr/r+d/bin/sun4'</samp> would be
returned.

<pre>
/defaults    type:=nfs;opts:=rw,grpid,nosuid,intr,soft
wp           -opts:=rw,grpid,nosuid;rhost:=charm \
             host==charm;type:=link;fs:=/usr/local/wp \
             host!=charm;type:=nfs;rfs:=/vol/wp
...
#
src          -opts:=rw,grpid,nosuid;rhost:=charm \
             host==charm;type:=link;fs:=/usr/src \
             host!=charm;type:=nfs;rfs:=/vol/src
#
r+d          type:=auto;fs:=${map};pref:=r+d/
# per architecture bin,etc,lib&#38;ucb...
r+d/bin      rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=${/key}/${arch}
r+d/etc      rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=${/key}/${arch}
r+d/include  rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=${/key}
r+d/lib      rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=${/key}/${arch}
r+d/man      rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=${/key}
r+d/src      rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=${/key}
r+d/ucb      rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=${/key}/${arch}
# hades pictures
pictures     -opts:=rw,grpid,nosuid;rhost:=thpfs \
             host==thpfs;type:=link;fs:=/nbsd/pictures \
             host!=thpfs;type:=nfs;rfs:=/nbsd;sublink:=pictures
# hades tools
hades        -opts:=rw,grpid,nosuid;rhost:=thpfs \
             host==thpfs;type:=link;fs:=/nbsd/hades \
             host!=thpfs;type:=nfs;rfs:=/nbsd;sublink:=hades
# bsd tools for hp.
bsd          -opts:=rw,grpid,nosuid;arch==hp9000;rhost:=thpfs \
             host==thpfs;type:=link;fs:=/nbsd/bsd \
             host!=thpfs;type:=nfs;rfs:=/nbsd;sublink:=bsd
</pre>



<h1><a name="SEC126" href="amdref_toc.html#SEC126">Internals</a></h1>



<h2><a name="SEC127" href="amdref_toc.html#SEC127">Log Messages</a></h2>

<p>
In the following sections a brief explanation is given of some of the
log messages made by <i>Amd</i>.  Where the message is in <samp>`typewriter'</samp>
font, it corresponds exactly to the message produced by <i>Amd</i>.  Words
in <strong>italic</strong> are replaced by an appropriate string.  Variables,
<code>${var}</code>, indicate that the value of the appropriate variable is
output.

<p>
Log messages are either sent direct to a file,
or logged via the <b>syslog</b>(3) mechanism.
Messages are logged with facility <samp>`LOG_DAEMON'</samp> when using <b>syslog</b>(3).
In either case, entries in the file are of the form:

<pre>
<i>date-string</i>  <i>hostname</i> <tt>amd[</tt><i>pid</i><tt>]</tt>  <i>message</i>
</pre>



<h3><a name="SEC128" href="amdref_toc.html#SEC128">Fatal errors</a></h3>

<p>
<i>Amd</i> attempts to deal with unusual events.  Whenever it is not
possible to deal with such an error, <i>Amd</i> will log an appropriate
message and, if it cannot possibly continue, will either exit or abort.
These messages are selected by <samp>`-x fatal'</samp> on the command line.
When <b>syslog</b>(3) is being used, they are logged with level
<samp>`LOG_FATAL'</samp>.  Even if <i>Amd</i> continues to operate it is likely to
remain in a precarious state and should be restarted at the earliest
opportunity.

<dl compact>

<dt><tt>Attempting to inherit not-a-filesystem</tt>
<dd>
The prototype mount point created during a filesystem restart did not
contain a reference to the restarted filesystem.  This erorr "should
never happen".

<dt><tt>Can't bind to domain "<i>NIS-domain</i>"</tt>
<dd>
A specific NIS domain was requested on the command line, but no server
for that domain is available on the local net.

<dt><tt>Can't determine IP address of this host (<i>hostname</i>)</tt>
<dd>
When <i>Amd</i> starts it determines its own IP address.  If this lookup
fails then <i>Amd</i> cannot continue.  The hostname it looks up is that
obtained returned by <b>gethostname</b>(2) system call.

<dt><tt>Can't find root file handle for <i>automount point</i></tt>
<dd>
<i>Amd</i> creates its own file handles for the automount points.  When it
mounts itself as a server, it must pass these file handles to the local
kernel.  If the filehandle is not obtainable the mount point is ignored.
This error "should never happen".

<dt><tt>Must be root to mount filesystems (euid = <i>euid</i>)</tt>
<dd>
To prevent embarrassment, <i>Amd</i> makes sure it has appropriate system
privileges.  This amounts to having an euid of 0.  The check is made
after argument processing complete to give non-root users a chance to
access the "-v" option.

<dt><tt>No work to do - quitting</tt>
<dd>
No automount points were given on the command line and so there is no
work to do.

<dt><tt>Out of memory in realloc</tt>
<dd>
While attempting to realloc some memory, the memory space available to
<i>Amd</i> was exhausted.  This is an unrecoverable error.

<dt><tt>Out of memory</tt>
<dd>
While attempting to malloc some memory, the memory space available to
<i>Amd</i> was exhausted.  This is an unrecoverable error.

<dt><tt>cannot create rpc/udp service</tt>
<dd>
Either the NFS or AMQ endpoint could not be created.

<dt><tt>gethostname:</tt> <i>description</i>
<dd>
The <b>gethostname</b>(2) system call failed during startup.

<dt><tt>host name is not set</tt>
<dd>
The <b>gethostname</b>(2) system call returned a zero length host name.
This can happen if <i>Amd</i> is started in single user mode just after
booting the system.

<dt><tt>ifs_match called!</tt>
<dd>
An internal error occurred while restarting a pre-mounted filesystem.
This error "should never happen".

<dt><tt>mount_afs:</tt> <i>description</i>
<dd>
An error occured while <i>Amd</i> was mounting itself.

<dt><tt>run_rpc failed</tt>
<dd>
Somehow the main NFS server loop failed.  This error "should never
happen".

<dt><tt>unable to free rpc arguments in amqprog_1</tt>
<dd>
The incoming arguments to the AMQ server could not be free'ed.

<dt><tt>unable to free rpc arguments in nfs_program_1</tt>
<dd>
The incoming arguments to the NFS server could not be free'ed.

<dt><tt>unable to register (AMQ_PROGRAM, AMQ_VERSION, udp)</tt>
<dd>
The AMQ server could not be registered with the local portmapper or the
internal RPC dispatcher.

<dt><tt>unable to register (NFS_PROGRAM, NFS_VERSION, 0)</tt>
<dd>
The NFS server could not be registered with the internal RPC dispatcher.

</DL>



<h3><a name="SEC129" href="amdref_toc.html#SEC129">Info messages</a></h3>

<p>
<i>Amd</i> generates information messages to record state changes.  These
messages are selected by <samp>`-x info'</samp> on the command line.  When
<b>syslog</b>(3) is being used, they are logged with level <samp>`LOG_INFO'</samp>.

<p>
The messages listed below can be generated and are in a format suitable
for simple statistical analysis.  <strong>mount-info</strong> is the string
that is displayed by <strong>Amq</strong> in its mount information column and
placed in the system mount table.

<dl compact>

<dt><tt>mount of "<tt>${<i>path</i>}</tt>" on <tt>${<i>fs</i>}</tt> timed out</tt>
<dd>
Attempts to mount a filesystem for the given automount point have failed
to complete within 30 seconds.

<dt><tt>"<tt>${<i>path</i>}</tt>" forcibly timed out</tt>
<dd>
An automount point has been timed out by the <i>Amq</i> command.

<dt><tt>restarting <i>mount-info</i> on <tt>${<i>fs</i>}</tt></tt>
<dd>
A pre-mounted file system has been noted.

<dt><tt>"<tt>${<i>path</i>}</tt>" has timed out</tt>
<dd>
No access to the automount point has been made within the timeout
period.

<dt><tt>file server <tt>${<i>rhost</i>}</tt> is down - timeout of "<tt>${<i>path</i>}</tt>" ignored</tt>
<dd>
An automount point has timed out, but the corresponding file server is
known to be down.  This message is only produced once for each mount
point for which the server is down.

<dt><tt>Re-synchronizing cache for map <tt>${<i>map</i>}</tt></tt>
<dd>
The named map has been modified and the internal cache is being re-synchronized.

<dt><tt>Filehandle denied for "<tt>${<i>rhost</i>}</tt>:<tt>${<i>rfs</i>}</tt>"</tt>
<dd>
The mount daemon refused to return a file handle for the requested filesystem.

<dt><tt>Filehandle error for "${<i>rhost</i>}:${<i>rfs</i>}":</tt> <i>description</i>
<dd>
The mount daemon gave some other error for the requested filesystem.

<dt><tt>file server <tt>${<i>rhost</i>}</tt> type nfs starts up</tt>
<dd>
A new NFS file server has been referenced and is known to be up.

<dt><tt>file server <tt>${<i>rhost</i>}</tt> type nfs starts down</tt>
<dd>
A new NFS file server has been referenced and is known to be down.

<dt><tt>file server <tt>${<i>rhost</i>}</tt> type nfs is up</tt>
<dd>
An NFS file server that was previously down is now up.

<dt><tt>file server <tt>${<i>rhost</i>}</tt> type nfs is down</tt>
<dd>
An NFS file server that was previously up is now down.

<dt><tt>Finishing with status <i>exit-status</i></tt>
<dd>
<i>Amd</i> is about to exit with the given exit status. 

<dt><tt><i>mount-info</i> mounted fstype <tt>${<i>type</i>}</tt> on <tt>${<i>fs</i>}</tt></tt>
<dd>
A new file system has been mounted.

<dt><tt><i>mount-info</i> restarted fstype <tt>${<i>type</i>}</tt> on <tt>${<i>fs</i>}</tt></tt>
<dd>
<i>Amd</i> is using a pre-mounted filesystem to satisfy a mount request.

<dt><tt><i>mount-info</i> unmounted fstype <tt>${<i>type</i>}</tt> from <tt>${<i>fs</i>}</tt></tt>
<dd>
A file system has been unmounted.

<dt><tt><i>mount-info</i> unmounted fstype <tt>${<i>type</i>}</tt> from <tt>${<i>fs</i>}</tt> link <tt>${<i>fs</i>}</tt>/<tt>${<i>sublink</i>}</tt></tt>
<dd>
A file system of which only a sub-directory was in use has been unmounted.

</DL>



<h1><a name="SEC130" href="amdref_toc.html#SEC130">Acknowledgements &#38; Trademarks</a></h1>

<p>
Thanks to the Formal Methods Group at Imperial College for
suffering patiently while <i>Amd</i> was being developed on their machines.

<p>
Thanks to the many people who have helped with the development of
<i>Amd</i>, especially Piete Brooks at the Cambridge University Computing
Lab for many hours of testing, experimentation and discussion.


<ul>
<li>

<b>DEC</b>, <b>VAX</b> and <b>Ultrix</b> are registered trademarks of Digital
Equipment Corporation.
<li>

<b>AIX</b> and <b>IBM</b> are registered trademarks of International Business
Machines Corporation.
<li>

<b>Sun</b>, <b>NFS</b> and <b>SunOS</b> are registered trademarks of Sun
Microsystems, Inc.
<li>

<b>Unix</b> is a registered trademark of AT&#38;T Unix Systems Laboratories
in the USA and other countries.
</ul>



<h1><a name="SEC131" href="amdref_toc.html#SEC131">Index</a></h1>

<p>
<h2>/</h2>
<dir>
<li><a href="amdref.html#IDX288">/etc/amd.start</a>
<li><a href="amdref.html#SEC26">/etc/passwd maps</a>
<li><a href="amdref.html#IDX287">/etc/rc.local additions</a>
<li><a href="amdref.html#IDX366">/vol</a>
</dir>
<h2>a</h2>
<dir>
<li><a href="amdref.html#IDX286">Additions to /etc/rc.local</a>
<li><a href="amdref.html#IDX165">Aliased hostnames</a>
<li><a href="amdref.html#SEC13">Alternate locations</a>
<li><a href="amdref.html#IDX148">Amd command line options</a>
<li><a href="amdref.html#IDX284">Amq command</a>
<li><a href="amdref.html#IDX316">arch, FSinfo host attribute</a>
<li><a href="amdref.html#arch">arch, mount selector</a>
<li><a href="amdref.html#IDX362">Architecture dependent volumes</a>
<li><a href="amdref.html#IDX360">Architecture sharing</a>
<li><a href="amdref.html#IDX364">Architecture specific mounts</a>
<li><a href="amdref.html#IDX211">Atomic NFS mounts</a>
<li><a href="amdref.html#IDX254">auto, filesystem type</a>
<li><a href="amdref.html#autodir">autodir, mount selector</a>
<li><a href="amdref.html#SEC26">Automatic generation of user maps</a>
<li><a href="amdref.html#IDX150">Automount directory</a>
<li><a href="amdref.html#IDX249">Automount filesystem</a>
<li><a href="amdref.html#SEC20">Automounter configuration maps</a>
<li><a href="amdref.html#SEC8">Automounter fundamentals</a>
</dir>
<h2>b</h2>
<dir>
<li><a href="amdref.html#SEC13">Background mounts</a>
<li><a href="amdref.html#SEC11">Binding names to filesystems</a>
<li><a href="amdref.html#IDX346">bootparams, FSinfo prefix</a>
<li><a href="amdref.html#SEC4">Bug reports</a>
<li><a href="amdref.html#byte">byte, mount selector</a>
</dir>
<h2>c</h2>
<dir>
<li><a href="amdref.html#IDX152">Cache interval</a>
<li><a href="amdref.html#IDX261">cache, mount option</a>
<li><a href="amdref.html#IDX367">Catch-all mount point</a>
<li><a href="amdref.html#IDX152">Changing the interval before a filesystem times out</a>
<li><a href="amdref.html#IDX189">Cluster names</a>
<li><a href="amdref.html#IDX320">cluster, FSinfo host attribute</a>
<li><a href="amdref.html#cluster">cluster, mount selector</a>
<li><a href="amdref.html#IDX147">Command line options, Amd</a>
<li><a href="amdref.html#IDX345">Command line options, FSinfo</a>
<li><a href="amdref.html#IDX314">config, FSinfo host attribute</a>
<li><a href="amdref.html#SEC21">Configuration map types</a>
<li><a href="amdref.html#IDX292">Controlling Amd</a>
<li><a href="amdref.html#IDX172">Creating a pid file</a>
</dir>
<h2>d</h2>
<dir>
<li><a href="amdref.html#IDX191">Debug options</a>
<li><a href="amdref.html#IDX310">Defining a host, FSinfo</a>
<li><a href="amdref.html#IDX343">Defining an Amd mount map, FSinfo</a>
<li><a href="amdref.html#IDX312">Defining host attributes, FSinfo</a>
<li><a href="amdref.html#IDX125">delay, mount option</a>
<li><a href="amdref.html#IDX122">Delaying mounts from specific locations</a>
<li><a href="amdref.html#SEC21">Determining the map type</a>
<li><a href="amdref.html#IDX225">dev, mount option</a>
<li><a href="amdref.html#IDX263">Direct automount filesystem</a>
<li><a href="amdref.html#IDX265">direct, filesystem type</a>
<li><a href="amdref.html#IDX177">Discovering version information</a>
<li><a href="amdref.html#IDX293">Discovering what is going on at run-time</a>
<li><a href="amdref.html#IDX222">Disk filesystems</a>
<li><a href="amdref.html#IDX169">Displaying the process id</a>
<li><a href="amdref.html#IDX156">Domain name</a>
<li><a href="amdref.html#SEC31">Domain stripping</a>
<li><a href="amdref.html#domain">domain, mount selector</a>
<li><a href="amdref.html#SEC31">Domainname operators</a>
<li><a href="amdref.html#IDX337">dumpset, FSinfo filesystems option</a>
<li><a href="amdref.html#IDX347">dumpset, FSinfo prefix</a>
<li><a href="amdref.html#SEC10">Duplicated volumes</a>
</dir>
<h2>e</h2>
<dir>
<li><a href="amdref.html#SEC31">Environment variables</a>
<li><a href="amdref.html#IDX270">Error filesystem</a>
<li><a href="amdref.html#IDX271">error, filesystem type</a>
<li><a href="amdref.html#IDX365">Example of architecture specific mounts</a>
<li><a href="amdref.html#IDX358">Example of mounting home directories</a>
<li><a href="amdref.html#IDX324">export, FSinfo special fstype</a>
<li><a href="amdref.html#IDX333">exportfs, FSinfo mount option</a>
<li><a href="amdref.html#IDX348">exports, FSinfo prefix</a>
</dir>
<h2>f</h2>
<dir>
<li><a href="amdref.html#SEC22">File map syntactic conventions</a>
<li><a href="amdref.html#SEC22">File maps</a>
<li><a href="amdref.html#SEC9">Fileserver</a>
<li><a href="amdref.html#SEC9">Filesystem</a>
<li><a href="amdref.html#IDX304">Filesystem info package</a>
<li><a href="amdref.html#IDX255">Filesystem type; auto</a>
<li><a href="amdref.html#IDX266">Filesystem type; direct</a>
<li><a href="amdref.html#IDX272">Filesystem type; error</a>
<li><a href="amdref.html#IDX209">Filesystem type; host</a>
<li><a href="amdref.html#IDX282">Filesystem type; inherit</a>
<li><a href="amdref.html#IDX241">Filesystem type; link</a>
<li><a href="amdref.html#IDX248">Filesystem type; linkx</a>
<li><a href="amdref.html#IDX200">Filesystem type; nfs</a>
<li><a href="amdref.html#IDX215">Filesystem type; nfsx</a>
<li><a href="amdref.html#IDX230">Filesystem type; program</a>
<li><a href="amdref.html#IDX278">Filesystem type; root</a>
<li><a href="amdref.html#IDX275">Filesystem type; toplvl</a>
<li><a href="amdref.html#IDX224">Filesystem type; ufs</a>
<li><a href="amdref.html#IDX269">Filesystem type; union</a>
<li><a href="amdref.html#IDX193">Filesystem types</a>
<li><a href="amdref.html#SEC22">Flat file maps</a>
<li><a href="amdref.html#IDX295">Flushing the map cache</a>
<li><a href="amdref.html#IDX300">Forcing filesystem to time out</a>
<li><a href="amdref.html#IDX330">freq, FSinfo filesystems option</a>
<li><a href="amdref.html#IDX129">fs, mount option</a>
<li><a href="amdref.html#IDX303">FSinfo</a>
<li><a href="amdref.html#IDX315">FSinfo arch host attribute</a>
<li><a href="amdref.html#IDX342">FSinfo automount definitions</a>
<li><a href="amdref.html#IDX319">FSinfo cluster host attribute</a>
<li><a href="amdref.html#IDX344">FSinfo command line options</a>
<li><a href="amdref.html#IDX313">FSinfo config host attribute</a>
<li><a href="amdref.html#IDX336">FSinfo dumpset filesystems option</a>
<li><a href="amdref.html#IDX354">FSinfo error messages</a>
<li><a href="amdref.html#IDX321">FSinfo filesystems</a>
<li><a href="amdref.html#IDX329">FSinfo freq filesystems option</a>
<li><a href="amdref.html#IDX322">FSinfo fstype filesystems option</a>
<li><a href="amdref.html#IDX307">FSinfo grammar</a>
<li><a href="amdref.html#IDX311">FSinfo host attributes</a>
<li><a href="amdref.html#IDX309">FSinfo host definitions</a>
<li><a href="amdref.html#IDX338">FSinfo log filesystems option</a>
<li><a href="amdref.html#IDX331">FSinfo mount filesystems option</a>
<li><a href="amdref.html#IDX325">FSinfo opts filesystems option</a>
<li><a href="amdref.html#IDX317">FSinfo os host attribute</a>
<li><a href="amdref.html#IDX305">FSinfo overview</a>
<li><a href="amdref.html#IDX327">FSinfo passno filesystems option</a>
<li><a href="amdref.html#IDX340">FSinfo static mounts</a>
<li><a href="amdref.html#IDX349">fstab, FSinfo prefix</a>
<li><a href="amdref.html#IDX323">fstype, FSinfo filesystems option</a>
</dir>
<h2>g</h2>
<dir>
<li><a href="amdref.html#IDX368">Generic volume name</a>
<li><a href="amdref.html#IDX298">Global statistics</a>
<li><a href="amdref.html#IDX308">Grammar, FSinfo</a>
</dir>
<h2>h</h2>
<dir>
<li><a href="amdref.html#SEC25">Hesiod maps</a>
<li><a href="amdref.html#IDX357">Home directories</a>
<li><a href="amdref.html#IDX208">host, filesystem type</a>
<li><a href="amdref.html#host">host, mount selector</a>
<li><a href="amdref.html#hostd">hostd, mount selector</a>
<li><a href="amdref.html#IDX164">Hostname normalisation</a>
<li><a href="amdref.html#IDX350">hostname, FSinfo command line option</a>
<li><a href="amdref.html#SEC28">How keys are looked up</a>
<li><a href="amdref.html#SEC29">How locations are parsed</a>
<li><a href="amdref.html#SEC31">How to access environment variables in maps</a>
<li><a href="amdref.html#IDX178">How to discover your version of Amd</a>
<li><a href="amdref.html#IDX221">How to mount a local disk</a>
<li><a href="amdref.html#IDX220">How to mount a UFS filesystems</a>
<li><a href="amdref.html#IDX207">How to mount all NFS exported filesystems</a>
<li><a href="amdref.html#IDX213">How to mount an atomic group of NFS filesystems</a>
<li><a href="amdref.html#IDX198">How to mount and NFS filesystem</a>
<li><a href="amdref.html#IDX245">How to reference an existing part of the local name space</a>
<li><a href="amdref.html#IDX238">How to reference part of the local name space</a>
<li><a href="amdref.html#IDX183">How to select log messages</a>
<li><a href="amdref.html#SEC30">How to set default map parameters</a>
<li><a href="amdref.html#IDX252">How to set map cache parameters</a>
<li><a href="amdref.html#IDX264">How to start a direct automount point</a>
<li><a href="amdref.html#IDX253">How to start an indirect automount point</a>
<li><a href="amdref.html#SEC31">How variables are expanded</a>
</dir>
<h2>i</h2>
<dir>
<li><a href="amdref.html#IDX281">inherit, filesystem type</a>
<li><a href="amdref.html#IDX279">Inheritance filesystem</a>
<li><a href="amdref.html#IDX152">Interval before a filesystem times out</a>
<li><a href="amdref.html#SEC6">Introduction</a>
</dir>
<h2>k</h2>
<dir>
<li><a href="amdref.html#karch">karch, mount selector</a>
<li><a href="amdref.html#SEC15">Keep-alives</a>
<li><a href="amdref.html#SEC28">Key lookup</a>
<li><a href="amdref.html#key">key, mount selector</a>
</dir>
<h2>l</h2>
<dir>
<li><a href="amdref.html#SEC2">License Information</a>
<li><a href="amdref.html#IDX239">link, filesystem type</a>
<li><a href="amdref.html#IDX246">linkx, filesystem type</a>
<li><a href="amdref.html#IDX294">Listing currently mounted filesystems</a>
<li><a href="amdref.html#SEC29">Location format</a>
<li><a href="amdref.html#SEC13">Location lists</a>
<li><a href="amdref.html#IDX160">Log filename</a>
<li><a href="amdref.html#IDX181">Log message selection</a>
<li><a href="amdref.html#IDX339">log, FSinfo filesystems option</a>
<li><a href="amdref.html#SEC28">Looking up keys</a>
</dir>
<h2>m</h2>
<dir>
<li><a href="amdref.html#SEC19">Machine architecture names</a>
<li><a href="amdref.html#SEC19">Machine architectures supported by Amd</a>
<li><a href="amdref.html#SEC5">Mailing list</a>
<li><a href="amdref.html#IDX259">Map cache options</a>
<li><a href="amdref.html#IDX257">Map cache synchronising</a>
<li><a href="amdref.html#IDX250">Map cache types</a>
<li><a href="amdref.html#IDX296">Map cache, flushing</a>
<li><a href="amdref.html#SEC30">Map defaults</a>
<li><a href="amdref.html#SEC29">Map entry format</a>
<li><a href="amdref.html#SEC28">Map lookup</a>
<li><a href="amdref.html#IDX119">Map options</a>
<li><a href="amdref.html#SEC21">Map types</a>
<li><a href="amdref.html#IDX110">map, mount selector</a>
<li><a href="amdref.html#IDX351">maps, FSinfo command line option</a>
<li><a href="amdref.html#IDX228">Mount a filesystem under program control</a>
<li><a href="amdref.html#IDX359">Mount home directories</a>
<li><a href="amdref.html#SEC20">Mount information</a>
<li><a href="amdref.html#SEC21">Mount map types</a>
<li><a href="amdref.html#SEC20">Mount maps</a>
<li><a href="amdref.html#IDX262">Mount option; cache</a>
<li><a href="amdref.html#IDX126">Mount option; delay</a>
<li><a href="amdref.html#IDX226">Mount option; dev</a>
<li><a href="amdref.html#IDX130">Mount option; fs</a>
<li><a href="amdref.html#IDX232">Mount option; mount</a>
<li><a href="amdref.html#IDX137">Mount option; opts</a>
<li><a href="amdref.html#IDX140">Mount option; remopts</a>
<li><a href="amdref.html#IDX204">Mount option; rfs</a>
<li><a href="amdref.html#IDX202">Mount option; rhost</a>
<li><a href="amdref.html#IDX143">Mount option; sublink</a>
<li><a href="amdref.html#IDX146">Mount option; type</a>
<li><a href="amdref.html#IDX234">Mount option; unmount</a>
<li><a href="amdref.html#SEC13">Mount retries</a>
<li><a href="amdref.html#arch">Mount selector; arch</a>
<li><a href="amdref.html#autodir">Mount selector; autodir</a>
<li><a href="amdref.html#byte">Mount selector; byte</a>
<li><a href="amdref.html#cluster">Mount selector; cluster</a>
<li><a href="amdref.html#domain">Mount selector; domain</a>
<li><a href="amdref.html#host">Mount selector; host</a>
<li><a href="amdref.html#hostd">Mount selector; hostd</a>
<li><a href="amdref.html#karch">Mount selector; karch</a>
<li><a href="amdref.html#key">Mount selector; key</a>
<li><a href="amdref.html#IDX111">Mount selector; map</a>
<li><a href="amdref.html#os">Mount selector; os</a>
<li><a href="amdref.html#IDX114">Mount selector; path</a>
<li><a href="amdref.html#IDX117">Mount selector; wire</a>
<li><a href="amdref.html#IDX133">mount system call</a>
<li><a href="amdref.html#IDX134">mount system call flags</a>
<li><a href="amdref.html#IDX194">Mount types</a>
<li><a href="amdref.html#IDX332">mount, FSinfo filesystems option</a>
<li><a href="amdref.html#IDX231">mount, mount option</a>
<li><a href="amdref.html#IDX219">Mounting a local disk</a>
<li><a href="amdref.html#IDX218">Mounting a UFS filesystem</a>
<li><a href="amdref.html#SEC13">Mounting a volume</a>
<li><a href="amdref.html#IDX212">Mounting an atomic group of NFS filesystems</a>
<li><a href="amdref.html#IDX244">Mounting an existing part of the local name space</a>
<li><a href="amdref.html#IDX197">Mounting an NFS filesystem</a>
<li><a href="amdref.html#IDX206">Mounting entire export trees</a>
<li><a href="amdref.html#IDX237">Mounting part of the local name space</a>
<li><a href="amdref.html#IDX356">Mounting user filesystems</a>
<li><a href="amdref.html#SEC16">Multiple-threaded server</a>
</dir>
<h2>n</h2>
<dir>
<li><a href="amdref.html#SEC11">Namespace</a>
<li><a href="amdref.html#SEC23">ndbm maps</a>
<li><a href="amdref.html#IDX210">Network filesystem group</a>
<li><a href="amdref.html#IDX205">Network host filesystem</a>
<li><a href="amdref.html#SEC10">Network-wide naming</a>
<li><a href="amdref.html#IDX196">NFS</a>
<li><a href="amdref.html#SEC15">NFS ping</a>
<li><a href="amdref.html#IDX199">nfs, filesystem type</a>
<li><a href="amdref.html#IDX214">nfsx, filesystem type</a>
<li><a href="amdref.html#IDX185">NIS (YP) domain name</a>
<li><a href="amdref.html#SEC24">NIS (YP) maps</a>
<li><a href="amdref.html#IDX280">Nodes generated on a restart</a>
<li><a href="amdref.html#SEC16">Non-blocking operation</a>
<li><a href="amdref.html#IDX167">Normalising hostnames</a>
</dir>
<h2>o</h2>
<dir>
<li><a href="amdref.html#SEC3">Obtaining the source code</a>
<li><a href="amdref.html#SEC18">Operating system names</a>
<li><a href="amdref.html#SEC18">Operating systems supported by Amd</a>
<li><a href="amdref.html#SEC12">Operational principles</a>
<li><a href="amdref.html#IDX326">opts, FSinfo filesystems option</a>
<li><a href="amdref.html#IDX136">opts, mount option</a>
<li><a href="amdref.html#IDX318">os, FSinfo host attribute</a>
<li><a href="amdref.html#os">os, mount selector</a>
<li><a href="amdref.html#IDX149">Overriding defaults on the command line</a>
<li><a href="amdref.html#IDX128">Overriding the default mount point</a>
<li><a href="amdref.html#IDX158">Overriding the local domain name</a>
<li><a href="amdref.html#IDX186">Overriding the NIS (YP) domain name</a>
</dir>
<h2>p</h2>
<dir>
<li><a href="amdref.html#IDX132">Passing parameters to the mount system call</a>
<li><a href="amdref.html#IDX328">passno, FSinfo filesystems option</a>
<li><a href="amdref.html#SEC26">Password file maps</a>
<li><a href="amdref.html#IDX113">path, mount selector</a>
<li><a href="amdref.html#SEC31">Pathname operators</a>
<li><a href="amdref.html#IDX174">Picking up existing mounts</a>
<li><a href="amdref.html#IDX171">pid file, creating with -p option</a>
<li><a href="amdref.html#IDX123">Primary server</a>
<li><a href="amdref.html#IDX168">Process id</a>
<li><a href="amdref.html#IDX170">process id of Amd daemon</a>
<li><a href="amdref.html#IDX227">Program filesystem</a>
<li><a href="amdref.html#IDX229">program, filesystem type</a>
</dir>
<h2>q</h2>
<dir>
<li><a href="amdref.html#IDX297">Querying an alternate host</a>
<li><a href="amdref.html#IDX352">quiet, FSinfo command line option</a>
</dir>
<h2>r</h2>
<dir>
<li><a href="amdref.html#IDX243">Referencing an existing part of the local name space</a>
<li><a href="amdref.html#IDX236">Referencing part of the local name space</a>
<li><a href="amdref.html#IDX260">Regular expressions in maps</a>
<li><a href="amdref.html#IDX139">remopts, mount option</a>
<li><a href="amdref.html#SEC10">Replacement volumes</a>
<li><a href="amdref.html#SEC10">Replicated volumes</a>
<li><a href="amdref.html#IDX166">Resolving aliased hostnames</a>
<li><a href="amdref.html#IDX173">Restarting existing mounts</a>
<li><a href="amdref.html#IDX203">rfs, mount option</a>
<li><a href="amdref.html#IDX201">rhost, mount option</a>
<li><a href="amdref.html#IDX276">Root filesystem</a>
<li><a href="amdref.html#IDX277">root, filesystem type</a>
<li><a href="amdref.html#SEC16">RPC retries</a>
<li><a href="amdref.html#IDX283">Run-time administration</a>
<li><a href="amdref.html#IDX363">rwho servers</a>
</dir>
<h2>s</h2>
<dir>
<li><a href="amdref.html#IDX124">Secondary server</a>
<li><a href="amdref.html#IDX335">sel, FSinfo mount option</a>
<li><a href="amdref.html#IDX182">Selecting specific log messages</a>
<li><a href="amdref.html#arch">Selector; arch</a>
<li><a href="amdref.html#autodir">Selector; autodir</a>
<li><a href="amdref.html#byte">Selector; byte</a>
<li><a href="amdref.html#cluster">Selector; cluster</a>
<li><a href="amdref.html#domain">Selector; domain</a>
<li><a href="amdref.html#host">Selector; host</a>
<li><a href="amdref.html#hostd">Selector; hostd</a>
<li><a href="amdref.html#karch">Selector; karch</a>
<li><a href="amdref.html#key">Selector; key</a>
<li><a href="amdref.html#IDX112">Selector; map</a>
<li><a href="amdref.html#os">Selector; os</a>
<li><a href="amdref.html#IDX115">Selector; path</a>
<li><a href="amdref.html#IDX118">Selector; wire</a>
<li><a href="amdref.html#SEC32">Selectors</a>
<li><a href="amdref.html#SEC15">Server crashes</a>
<li><a href="amdref.html#IDX121">Setting a delay on a mount location</a>
<li><a href="amdref.html#IDX175">Setting Amd's RPC parameters</a>
<li><a href="amdref.html#IDX192">Setting debug flags</a>
<li><a href="amdref.html#SEC30">Setting default map parameters</a>
<li><a href="amdref.html#IDX251">Setting map cache parameters</a>
<li><a href="amdref.html#IDX120">Setting map options</a>
<li><a href="amdref.html#IDX131">Setting system mount options</a>
<li><a href="amdref.html#IDX138">Setting system mount options for non-local networks</a>
<li><a href="amdref.html#IDX190">Setting the cluster name</a>
<li><a href="amdref.html#IDX151">Setting the default mount directory</a>
<li><a href="amdref.html#IDX144">Setting the filesystem type option</a>
<li><a href="amdref.html#IDX152">Setting the interval before a filesystem times out</a>
<li><a href="amdref.html#IDX179">Setting the interval between unmount attempts</a>
<li><a href="amdref.html#IDX159">Setting the Kernel architecture</a>
<li><a href="amdref.html#IDX157">Setting the local domain name</a>
<li><a href="amdref.html#IDX127">Setting the local mount point</a>
<li><a href="amdref.html#IDX161">Setting the log file</a>
<li><a href="amdref.html#IDX187">Setting the NIS (YP) domain name</a>
<li><a href="amdref.html#IDX141">Setting the sublink option</a>
<li><a href="amdref.html#IDX361">Sharing a fileserver between architectures</a>
<li><a href="amdref.html#IDX256">SIGHUP signal</a>
<li><a href="amdref.html#IDX291">SIGINT signal</a>
<li><a href="amdref.html#IDX290">SIGTERM signal</a>
<li><a href="amdref.html#SEC3">Source code distribution</a>
<li><a href="amdref.html#IDX285">Starting Amd</a>
<li><a href="amdref.html#IDX341">Statically mounts filesystems, FSinfo</a>
<li><a href="amdref.html#IDX299">Statistics</a>
<li><a href="amdref.html#IDX289">Stopping Amd</a>
<li><a href="amdref.html#SEC31">Stripping the local domain name</a>
<li><a href="amdref.html#SEC9">sublink</a>
<li><a href="amdref.html#IDX142">sublink, mount option</a>
<li><a href="amdref.html#SEC19">Supported machine architectures</a>
<li><a href="amdref.html#SEC18">Supported operating systems</a>
<li><a href="amdref.html#IDX235">Symbolic link filesystem</a>
<li><a href="amdref.html#IDX242">Symbolic link filesystem II</a>
<li><a href="amdref.html#IDX240">symlink, link filesystem type</a>
<li><a href="amdref.html#IDX247">symlink, linkx filesystem type</a>
<li><a href="amdref.html#IDX258">Synchronising the map cache</a>
<li><a href="amdref.html#IDX163">syslog</a>
<li><a href="amdref.html#IDX184">syslog priorities</a>
</dir>
<h2>t</h2>
<dir>
<li><a href="amdref.html#IDX135">The mount system call</a>
<li><a href="amdref.html#IDX273">Top level filesystem</a>
<li><a href="amdref.html#IDX274">toplvl, filesystem type</a>
<li><a href="amdref.html#IDX145">type, mount option</a>
<li><a href="amdref.html#SEC21">Types of configuration map</a>
<li><a href="amdref.html#IDX195">Types of filesystem</a>
<li><a href="amdref.html#SEC21">Types of mount map</a>
</dir>
<h2>u</h2>
<dir>
<li><a href="amdref.html#IDX217">UFS</a>
<li><a href="amdref.html#IDX223">ufs, filesystem type</a>
<li><a href="amdref.html#SEC27">Union file maps</a>
<li><a href="amdref.html#IDX267">Union filesystem</a>
<li><a href="amdref.html#IDX268">union, filesystem type</a>
<li><a href="amdref.html#IDX216">Unix filesystem</a>
<li><a href="amdref.html#SEC11">Unix namespace</a>
<li><a href="amdref.html#IDX180">unmount attempt backoff interval</a>
<li><a href="amdref.html#IDX233">unmount, mount option</a>
<li><a href="amdref.html#IDX301">Unmounting a filesystem</a>
<li><a href="amdref.html#IDX355">User filesystems</a>
<li><a href="amdref.html#SEC26">User maps, automatic generation</a>
<li><a href="amdref.html#IDX306">Using FSinfo</a>
<li><a href="amdref.html#IDX162">Using syslog to log errors</a>
<li><a href="amdref.html#SEC26">Using the password file as a map</a>
</dir>
<h2>v</h2>
<dir>
<li><a href="amdref.html#SEC31">Variable expansion</a>
<li><a href="amdref.html#IDX353">verbose, FSinfo command line option</a>
<li><a href="amdref.html#IDX176">Version information</a>
<li><a href="amdref.html#IDX302">Version information at run-time</a>
<li><a href="amdref.html#IDX334">volname, FSinfo mount option</a>
<li><a href="amdref.html#SEC9">Volume</a>
<li><a href="amdref.html#SEC11">Volume binding</a>
<li><a href="amdref.html#SEC10">Volume names</a>
</dir>
<h2>w</h2>
<dir>
<li><a href="amdref.html#SEC28">Wildcards in maps</a>
<li><a href="amdref.html#IDX116">wire, mount selector</a>
</dir>
<h2>y</h2>
<dir>
<li><a href="amdref.html#IDX188">YP domain name</a>
</dir>
<p>

<hr>

This document was generated on 31 October 1997 using the
<a href="http://www.mathematik.uni-kl.de/~obachman/Texi2html/">texi2html</a>
translator version 1.51, then the top and base edited.

<hr>
<a href="amdref_toc.html">Up to <em>4.4 BSD Automounter Reference Manual - Table of Contents</em></a>
<hr>

<table width="100%"><tr><td>
  <table><tr><td>
    <a href="../../"><img
        src="../../images/NetBSD-flag.png" border="0"
        width="90" height="90" alt=""></a>
  </td><td>
    <a href="../../"><img
        src="../../images/empty.gif" border="0"
        width="1" height="1" alt="NetBSD ">Home Page</a>
  </td></tr></table>
</td><td>
  <table><tr><td>
    <a href="../../docs/"><img
        src="../../images/NetBSD-flag.png" border="0"
        width="90" height="90" alt=""></a>
  </td><td> 
    <a href="../../docs/"><img
        src="../../images/empty.gif" border="0"
        width="1" height="1" alt="NetBSD ">Documentation top level</a>
  </td></tr></table>
</td></tr></table>

<hr>
<address>
  <small>
  <a href="http://www.NetBSD.org/cgi-bin/feedback.cgi">(Contact us)</a>
  $NetBSD: amdref.html,v 1.3 2007/08/01 15:36:00 kano Exp $<br>
  <a href="../../about/disclaimer.html">Copyright &copy; 1997-2003
    The NetBSD Foundation, Inc.  ALL RIGHTS RESERVED.</a>
  </small>
</address>

</body>
</html>