1\input texinfo		@c -*-texinfo-*-
2@c
3@c $Id: amdref.texinfo,v 5.2.1.4 91/03/03 20:15:58 jsp Alpha Locker: jsp $
4@c
5@c Copyright (c) 1989 Jan-Simon Pendry
6@c Copyright (c) 1989 Imperial College of Science, Technology & Medicine
7@c Copyright (c) 1989 The Regents of the University of California.
8@c All rights reserved.
9@c
10@c This code is derived from software contributed to Berkeley by
11@c Jan-Simon Pendry at Imperial College, London.
12@c
13@c Redistribution and use in source and binary forms are permitted provided
14@c that: (1) source distributions retain this entire copyright notice and
15@c comment, and (2) distributions including binaries display the following
16@c acknowledgement:  ``This product includes software developed by the
17@c University of California, Berkeley and its contributors'' in the
18@c documentation or other materials provided with the distribution and in
19@c all advertising materials mentioning features or use of this software.
20@c Neither the name of the University nor the names of its contributors may
21@c be used to endorse or promote products derived from this software without
22@c specific prior written permission.
23@c THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
24@c WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
25@c MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
26@c
27@c	@(#)amdref.texinfo	1.1 (Berkeley) 03/17/91
28@c
29@c
30@c @setfilename ../info/amd
31@setfilename /usr/local/emacs/info/amd
32@c @smallbook
33@tex
34\overfullrule=0pt
35@end tex
36
37@settitle 4.4 BSD Automounter Reference Manual
38@c
39@titlepage
40@sp 6
41@center @titlefont{Amd}
42@sp 2
43@center @titlefont{The 4.4 BSD Automounter}
44@sp 2
45@center @titlefont{Reference Manual}
46@sp 2
47@center @authorfont{Jan-Simon Pendry}
48@sp
49@center @i{and}
50@sp
51@center @authorfont{Nick Williams}
52@sp 4
53@center Last updated March 1991
54@center Documentation for software revision 5.3 Alpha
55@page
56@c
57Copyright @copyright{} 1989 Jan-Simon Pendry
58@sp -1
59Copyright @copyright{} 1989 Imperial College of Science, Technology & Medicine
60@sp -1
61Copyright @copyright{} 1989 The Regents of the University of California.
62@sp 0
63All Rights Reserved.
64@vskip 1ex
65Permission to copy this document, or any portion of it, as
66necessary for use of this software is granted provided this
67copyright notice and statement of permission are included.
68@end titlepage
69@page
70@ifinfo
71@node Top, License, , (DIR)
72
73Amd - The 4.4 BSD Automounter
74*****************************
75
76Amd is the 4.4 BSD Automounter.  This Info file describes how
77to use and understand Amd.
78@end ifinfo
79
80@menu
81* License::                  Explains the terms and conditions for using
82                             and distributing Amd.
83* Distrib::                  How to get the latest Amd distribution.
84* Overview::                 An introduction to Automounting concepts.
85* Supported Platforms::      Machines and Systems supported by Amd.
86* Mount Maps::               Details of mount maps
87* Amd Command Line Options:: All the Amd command line options explained.
88* Filesystem Types::         The different mount types supported by Amd.
89* Run-time Administration::  How to start, stop and control Amd.
90* FSinfo::                   The FSinfo filesystem management tool.
91* Examples::                 Some examples showing how Amd might be used.
92
93Indexes
94* Index::                    An item for each concept.
95@end menu
96
97@iftex
98@unnumbered Preface
99
100This manual documents the use of the 4.4 BSD automounter---@i{Amd}.
101This is primarily a reference manual.  Unfortunately, no tutorial
102exists.
103
104This manual comes in two forms: the published form and the Info form.
105The Info form is for on-line perusal with the INFO program which is
106distributed along with GNU Emacs.  Both forms contain substantially the
107same text and are generated from a common source file, which is
108distributed with the @i{Amd} source.
109@end iftex
110
111@node License, Distrib, Top, Top
112@unnumbered License
113@cindex License Information
114
115@i{Amd} is not in the public domain; it is copyrighted and there are
116restrictions on its distribution.
117
118Redistribution and use in source and binary forms are permitted provided
119that: (1) source distributions  retain this entire  copyright notice and
120comment, and (2) distributions including  binaries display the following
121acknowledgement: ``This product  includes  software  developed  by   The
122University  of California,   Berkeley  and its  Contributors''  in   the
123documentation  or other materials provided with  the distribution and in
124all advertising materials mentioning  features  or use of this software.
125neither the name of the University nor the names of its Contributors may
126be  used   to endorse or promote   products  derived from  this software
127without specific prior written permission.
128
129THIS SOFTWARE IS  PROVIDED ``AS IS''  AND WITHOUT ANY EXPRESS OR IMPLIED
130WARRANTIES, INCLUDING,  WITHOUT  LIMITATION,  THE IMPLIED  WARRANTIES OF
131MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
132
133@node Distrib, Overview, License, Top
134@unnumbered Source Distribution
135@cindex Source code distribution
136@cindex Obtaining the source code
137
138If you have access to the Internet, you can get the latest distribution
139version of @i{Amd} from host @file{usc.edu} using anonymous FTP.  Move to
140the directory @file{/pub/amd} on that host and fetch the file @file{amd.tar.Z}.
141
142If you are in the UK, you can get the latest distribution version of
143@i{Amd} from the UKnet info-server.  Start by sending email to
144@file{info-server@@doc.ic.ac.uk}.
145
146Sites on the UK JANET network can get the latest distribution by using
147anonymous NIFTP to fetch the file @samp{<AMD>amd.tar.Z} from host
148@samp{uk.ac.imperial.doc.src}.
149
150Revision 5.2 was part of the 4.3 BSD Reno distribution.
151
152@unnumberedsec Bug Reports
153@cindex Bug reports
154
155Send all bug reports to @file{jsp@@doc.ic.ac.uk} quoting the details of
156the release and your configuration.  These can be obtained by running
157the command @samp{amd -v}.
158
159@unnumberedsec Mailing List
160@cindex Mailing list
161
162There is a mailing list for people interested in keeping uptodate with
163developments.  To subscribe, send a note to @file{amd-workers-request@@acl.lanl.gov}.
164
165@node Intro, Index, Distrib, Top
166@unnumbered Introduction
167@cindex Introduction
168
169An @dfn{automounter} maintains a cache of mounted filesystems.
170Filesystems are mounted on demand when they are first referenced,
171and unmounted after a period of inactivity.
172
173@i{Amd} may be used as a replacement for Sun's automounter.  The choice
174of which filesystem to mount can be controlled dynamically with
175@dfn{selectors}.  Selectors allow decisions of the form ``hostname is
176@var{this},'' or ``architecture is not @var{that}.''  Selectors may be
177combined arbitrarily.  @i{Amd} also supports a variety of filesystem
178types, including NFS, UFS and the novel @dfn{program} filesystem.  The
179combination of selectors and multiple filesystem types allows identical
180configuration files to be used on all machines so reducing the
181administrative overhead.
182
183@i{Amd} ensures that it will not hang if a remote server goes down.
184Moreover, @i{Amd} can determine when a remote server has become
185inaccessible and then mount replacement filesystems as and when they
186become available.
187
188@i{Amd} contains no proprietary source code and has been ported to
189numerous flavours of Unix.
190
191@node Overview, Supported Platforms, Distrib, Top
192@chapter Overview
193
194@i{Amd} maintains a cache of mounted filesystems.  Filesystems are
195@dfn{demand-mounted} when they are first referenced, and unmounted after
196a period of inactivity.  @i{Amd} may be used as a replacement for Sun's
197@b{automount}(8) program.  It contains no proprietary source code and
198has been ported to numerous flavours of Unix.  @xref{Supported Operating
199Systems}.@refill
200
201@i{Amd} was designed as the basis for experimenting with filesystem
202layout and management.  Although @i{Amd} has many direct applications it
203is loaded with additional features which have little practical use.  At
204some point the infrequently used components may be removed to streamline
205the production system.
206
207@c @i{Amd} supports the notion of @dfn{replicated} filesystems by evaluating
208@c each member of a list of possible filesystem locations in parallel.
209@c @i{Amd} checks that each cached mapping remains valid.  Should a mapping be
210@c lost -- such as happens when a fileserver goes down -- @i{Amd} automatically
211@c selects a replacement should one be available.
212@c
213@menu
214* Fundamentals::
215* Filesystems and Volumes::
216* Volume Naming::
217* Volume Binding::
218* Operational Principles::
219* Mounting a Volume::
220* Automatic Unmounting::
221* Keep-alives::
222* Non-blocking Operation::
223@end menu
224
225@node     Fundamentals, Filesystems and Volumes, Overview, Overview
226@comment  node-name,  next,  previous,  up
227@section Fundamentals
228@cindex Automounter fundamentals
229
230The fundamental concept behind @i{Amd} is the ability to separate the
231name used to refer to a file from the name used to refer to its physical
232storage location.  This allows the same files to be accessed with the
233same name regardless of where in the network the name is used.  This is
234very different from placing @file{/n/hostname} in front of the pathname
235since that includes location dependent information which may change if
236files are moved to another machine.
237
238By placing the required mappings in a centrally administered database,
239filesystems can be re-organised without requiring changes to
240configuration files, shell scripts and so on.
241
242@node     Filesystems and Volumes, Volume Naming, Fundamentals, Overview
243@comment  node-name,  next,  previous,  up
244@section Filesystems and Volumes
245@cindex Filesystem
246@cindex Volume
247@cindex Fileserver
248@cindex sublink
249
250@i{Amd} views the world as a set of fileservers, each containg one or
251more filesystems where each filesystem contains one or more
252@dfn{volumes}.  Here the term @dfn{volume} is used to refer to a
253coherent set of files such as a user's home directory or a @TeX{}
254distribution.@refill
255
256In order to access the contents of a volume, @i{Amd} must be told in
257which filesystem the volume resides and which host owns the filesystem.
258By default the host is assumed to be local and the volume is assumed to
259be the entire filesystem.  If a filesystem contains more than one
260volume, then a @dfn{sublink} is used to refer to the sub-directory
261within the filesystem where the volume can be found.
262
263@node     Volume Naming, Volume Binding, Filesystems and Volumes, Overview
264@comment  node-name,  next,  previous,  up
265@section Volume Naming
266@cindex Volume names
267@cindex Network-wide naming
268@cindex Replicated volumes
269@cindex Duplicated volumes
270@cindex Replacement volumes
271
272Volume names are defined to be unique across the entire network.  A
273volume name is the pathname to the volume's root as known by the users
274of that volume.  Since this name uniquely identifies the volume
275contents, all volumes can be named and accessed from each host, subject
276to administrative controls.
277
278Volumes may be replicated or duplicated.  Replicated volumes contain
279identical copies of the same data and reside at two or more locations in
280the network.  Each of the replicated volumes can be used
281interchangeably.  Duplicated volumes each have the same name but contain
282different, though functionally identical, data.  For example,
283@samp{/vol/tex} might be the name of a @TeX{} distribution which varied
284for each machine architecture.@refill
285
286@i{Amd} provides facilities to take advantage of both replicated and
287duplicated volumes.  Configuration options allow a single set of
288configuration data to be shared across an entire network by taking
289advantage of replicated and duplicated volumes.
290
291@i{Amd} can take advantage of replacement volumes by mounting them as
292required should an active fileserver become unavailable.
293
294@node     Volume Binding, Operational Principles, Volume Naming, Overview
295@comment  node-name,  next,  previous,  up
296@section Volume Binding
297@cindex Volume binding
298@cindex Unix namespace
299@cindex Namespace
300@cindex Binding names to filesystems
301
302Unix implements a namespace of hierarchically mounted filesystems.  Two
303forms of binding between names and files are provided.  A @dfn{hard
304link} completes the binding when the name is added to the filesystem.  A
305@dfn{soft link} delays the binding until the name is accessed.  An
306@dfn{automounter} adds a further form in which the binding of name to
307filesystem is delayed until the name is accessed.@refill
308
309The target volume, in its general form, is a tuple (host, filesystem,
310sublink) which can be used to name the physical location of any volume
311in the network.
312
313When a target is referenced, @i{Amd} ignores the sublink element and
314determines whether the required filesystem is already mounted.  This is
315done by computing the local mount point for the filesystem and checking
316for an existing filesystem mounted at the same place.  If such a
317filesystem already exists then it is assumed to be functionally
318identical to the target filesystem.  By default there is a one-to-one
319mapping between the pair (host, filesystem) and the local mount point so
320this assumption is valid.
321
322@node     Operational Principles, Mounting a Volume, Volume Binding, Overview
323@comment  node-name,  next,  previous,  up
324@section Operational Principles
325@cindex Operational principles
326
327@i{Amd} operates by introducing new mount points into the namespace.
328These are called @dfn{automount} points.  The kernel sees these
329automount points as NFS filesystems being served by @i{Amd}.  Having
330attached itself to the namespace, @i{Amd} is now able to control the
331view the rest of the system has of those mount points.  RPC calls are
332received from the kernel one at a time.
333
334When a @dfn{lookup} call is received @i{Amd} checks whether the name is
335already known.  If it is not, the required volume is mounted.  A
336symbolic link pointing to the volume root is then returned.  Once the
337symbolic link is returned, the kernel will send all other requests
338direct to the mounted filesystem.
339
340If a volume is not yet mounted, @i{Amd} consults a configuration
341@dfn{mount-map} corresponding to the automount point.  @i{Amd} then
342makes a runtime decision on what and where to mount a filesystem based
343on the information obtained from the map.
344
345@i{Amd} does not implement all the NFS requests; only those relevant
346to name binding such as @dfn{lookup}, @dfn{readlink} and @dfn{readdir}.
347Some other calls are also implemented but most simply return an error
348code; for example @dfn{mkdir} always returns ``read-only filesystem''.
349
350@node     Mounting a Volume, Automatic Unmounting, Operational Principles, Overview
351@comment  node-name,  next,  previous,  up
352@section Mounting a Volume
353@cindex Mounting a volume
354@cindex Location lists
355@cindex Alternate locations
356@cindex Mount retries
357@cindex Background mounts
358
359Each automount point has a corresponding mount map.  The mount map
360contains a list of key--value pairs.  The key is the name of the volume
361to be mounted.  The value is a list of locations describing where the
362filesystem is stored in the network.  In the source for the map the
363value would look like
364
365@display
366location1  location2  @dots{}  locationN
367@end display
368
369@i{Amd} examines each location in turn.  Each location may contain
370@dfn{selectors} which control whether @i{Amd} can use that location.
371For example, the location may be restricted to use by certain hosts.
372Those locations which cannot be used are ignored.
373
374@i{Amd} attempts to mount the filesystem described by each remaining
375location until a mount succeeds or @i{Amd} can no longer proceed.  The
376latter can occur in three ways:
377
378@itemize @bullet
379@item
380If none of the locations could be used, or if all of the locations
381caused an error, then the last error is returned.
382
383@item
384If a location could be used but was being mounted in the background then
385@i{Amd} marks that mount as being ``in progress'' and continues with
386the next request; no reply is sent to the kernel.
387
388@item
389Lastly, one or more of the mounts may have been @dfn{deferred}.  A mount
390is deferred if extra information is required before the mount can
391proceed.  When the information becomes available the mount will take
392place, but in the mean time no reply is sent to the kernel.  If the
393mount is deferred, @i{Amd} continues to try any remaining locations.
394@end itemize
395
396Once a volume has been mounted, @i{Amd} establishes a @dfn{volume
397mapping} which is used to satisfy subsequent requests.@refill
398
399@node     Automatic Unmounting, Keep-alives, Mounting a Volume, Overview
400@comment  node-name,  next,  previous,  up
401@section Automatic Unmounting
402
403To avoid an ever increasing number of filesystem mounts, @i{Amd} removes
404volume mappings which have not been used recently.  A time-to-live
405interval is associated with each mapping and when that expires the
406mapping is removed.  When the last reference to a filesystem is removed,
407that filesystem is unmounted.  If the unmount fails, for example the
408filesystem is still busy, the mapping is re-instated and its
409time-to-live interval is extended.  The global default for this grace
410period is controlled by the ``-w'' command-line option (@pxref{-w
411Option, -w}).  It is also possible to set this value on a per-mount
412basis (@pxref{opts Option, opts, opts}).@refill
413
414Filesystems can be forcefully timed out using the @i{Amq} command.
415@xref{Run-time Administration}.
416
417@node     Keep-alives, Non-blocking Operation, Automatic Unmounting, Overview
418@comment  node-name,  next,  previous,  up
419@section Keep-alives
420@cindex Keep-alives
421@cindex Server crashes
422@cindex NFS ping
423
424Use of some filesystem types requires the presence of a server on
425another machine.  If a machine crashes then it is of no concern to
426processes on that machine that the filesystem is unavailable.  However,
427to processes on a remote host using that machine as a fileserver this
428event is important.  This situation is most widely recognised when an
429NFS server crashes and the behaviour observed on client machines is that
430more and more processes hang.  In order to provide the possibility of
431recovery, @i{Amd} implements a @dfn{keep-alive} interval timer for some
432filesystem types.  Currently only NFS makes use of this service.
433
434The basis of the NFS keep-alive implementation is the observation that
435most sites maintain replicated copies of common system data such as
436manual pages, most or all programs, system source code and so on.  If
437one of those servers goes down it would be reasonable to mount one of
438the others as a replacement.
439
440The first part of the process is to keep track of which fileservers are
441up and which are down.  @i{Amd} does this by sending RPC requests to the
442servers' NFS @code{NullProc} and checking whether a reply is returned.
443While the server state is uncertain the requests are re-transmitted at
444three second intervals and if no reply is received after four attempts
445the server is marked down.  If a reply is received the fileserver is
446marked up and stays in that state for 30 seconds at which time another
447NFS ping is sent.
448
449Once a fileserver is marked down, requests continue to be sent every 30
450seconds in order to determine when the fileserver comes back up.  During
451this time any reference through @i{Amd} to the filesystems on that
452server fail with the error ``Operation would block''.  If a replacement
453volume is available then it will be mounted, otherwise the error is
454returned to the user.
455
456@c @i{Amd} keeps track of which servers are up and which are down.
457@c It does this by sending RPC requests to the servers' NFS {\sc NullProc} and
458@c checking whether a reply is returned.  If no replies are received after a
459@c short period, @i{Amd} marks the fileserver @dfn{down}.
460@c RPC requests continue to be sent so that it will notice when a fileserver
461@c comes back up.
462@c ICMP echo packets \cite{rfc:icmp} are not used because it is the availability
463@c of the NFS service that is important, not the existence of a base kernel.
464@c Whenever a reference to a fileserver which is down is made via @i{Amd}, an alternate
465@c filesystem is mounted if one is available.
466@c
467Although this action does not protect user files, which are unique on
468the network, or processes which do not access files via @i{Amd} or
469already have open files on the hung filesystem, it can prevent most new
470processes from hanging.
471
472By default, fileserver state is not maintained for NFS/TCP mounts.  The
473remote fileserver is always assumed to be up.
474@c
475@c With a suitable combination of filesystem management and mount-maps,
476@c machines can be protected against most server downtime.  This can be
477@c enhanced by allocating boot-servers dynamically which allows a diskless
478@c workstation to be quickly restarted if necessary.  Once the root filesystem
479@c is mounted, @i{Amd} can be started and allowed to mount the remainder of
480@c the filesystem from whichever fileservers are available.
481
482@node     Non-blocking Operation, , Keep-alives, Overview
483@comment  node-name,  next,  previous,  up
484@section Non-blocking Operation
485@cindex Non-blocking operation
486@cindex Multiple-threaded server
487@cindex RPC retries
488
489Since there is only one instance of @i{Amd} for each automount point,
490and usually only one instance on each machine, it is important that it
491is always available to service kernel calls.  @i{Amd} goes to great
492lengths to ensure that it does not block in a system call.  As a last
493resort @i{Amd} will fork before it attempts a system call that may block
494indefinitely, such as mounting an NFS filesystem.  Other tasks such as
495obtaining filehandle information for an NFS filesystem, are done using a
496purpose built non-blocking RPC library which is integrated with
497@i{Amd}'s task scheduler.  This library is also used to implement NFS
498keep-alives (@pxref{Keep-alives}).
499
500Whenever a mount is deferred or backgrounded, @i{Amd} must wait for it
501to complete before replying to the kernel.  However, this would cause
502@i{Amd} to block waiting for a reply to be constructed.  Rather than do
503this, @i{Amd} simply @dfn{drops} the call under the assumption that the
504kernel RPC mechanism will automatically retry the request.
505
506@node     Supported Platforms, Mount Maps, Overview, Top
507@comment  node-name,  next,  previous,  up
508@chapter Supported Platforms
509
510@i{Amd} has been ported to a wide variety of machines and operating systems.
511The table below lists those platforms supported by the current release.
512
513@menu
514* Supported Operating Systems::
515* Supported Machine Architectures::
516@end menu
517
518@node     Supported Operating Systems, Supported Machine Architectures, Supported Platforms, Supported Platforms
519@comment  node-name,  next,  previous,  up
520@section Supported Operating Systems
521@cindex Operating system names
522@cindex Operating systems supported by Amd
523@cindex Supported operating systems
524
525The following operating systems are currently supported by @i{Amd}.
526@i{Amd}'s conventional name for each system is given.
527
528@table @code
529@item acis43
5304.3 BSD for IBM RT.  Contributed by Jan-Simon Pendry @t{<jsp@@doc.ic.ac.uk>}
531@item aix3
532AIX 3.1.  Contributed by Jan-Simon Pendry @t{<jsp@@doc.ic.ac.uk>}
533@item aux
534System V for Mac-II.  Contributed by Julian Onions @t{<jpo@@cs.nott.ac.uk>}
535@item bsd44
5364.4 BSD.  Contributed by Jan-Simon Pendry @t{<jsp@@doc.ic.ac.uk>}
537@item concentrix
538Concentrix 5.0.  Contributed by Sjoerd Mullender @t{<sjoerd@@cwi.nl>}
539@item convex
540Convex OS 7.1.  Contributed by Eitan Mizrotsky @t{<eitan@@shumuji.ac.il>}
541@item dgux
542Data General DG/UX.  Contributed by Mark Davies @t{<mark@@comp.vuw.ac.nz>}
543@item fpx4
544Celerity FPX 4.1/2.  Contributed by Stephen Pope @t{<scp@@grizzly.acl.lanl.gov>}
545@item hcx
546Harris HCX/UX.  Contributed by Chris Metcalf @t{<metcalf@@masala.lcs.mit.edu>}
547@item hlh42
548HLH OTS 1.@i{x} (4.2 BSD).  Contributed by Jan-Simon Pendry @t{<jsp@@doc.ic.ac.uk>}
549@item hpux
550HP-UX 6.@i{x} or 7.0.  Contributed by Jan-Simon Pendry @t{<jsp@@doc.ic.ac.uk>}
551@item irix
552SGI Irix.  Contributed by Scott R. Presnell @t{<srp@@cgl.ucsf.edu>}
553@item next
554Mach for NeXT.  Contributed by Bill Trost @t{<trost%reed@@cse.ogi.edu>}
555@item pyrOSx
556Pyramid OSx.  Contributed by Stefan Petri @t{<petri@@tubsibr.UUCP>}
557@item riscix
558Acorn RISC iX.  Contributed by Piete Brooks @t{<pb@@cam.cl.ac.uk>}
559@item sos3
560SunOS 3.4 & 3.5.  Contributed by Jan-Simon Pendry @t{<jsp@@doc.ic.ac.uk>}
561@item sos4
562SunOS 4.@i{x}.  Contributed by Jan-Simon Pendry @t{<jsp@@doc.ic.ac.uk>}
563@item u2_2
564Ultrix 2.2.  Contributed by Piete Brooks @t{<pb@@cam.cl.ac.uk>}
565@item u3_0
566Ultrix 3.  Contributed by Piete Brooks @t{<pb@@cam.cl.ac.uk>}
567@item u4_0
568Ultrix 4.0.  Contributed by Chris Lindblad @t{<cjl@@ai.mit.edu>}
569@item umax43
570Umax 4.3 BSD.  Contributed by Sjoerd Mullender @t{<sjoerd@@cwi.nl>}
571@item utek
572Utek 4.0.  Contributed by Bill Trost @t{<trost%reed@@cse.ogi.edu>}
573@item xinu43
574mt Xinu MORE/bsd.  Contributed by Jan-Simon Pendry @t{<jsp@@doc.ic.ac.uk>}
575@end table
576
577@node     Supported Machine Architectures, , Supported Operating Systems, Supported Platforms
578@comment  node-name,  next,  previous,  up
579@section Supported Machine Architectures
580@cindex Supported machine architectures
581@cindex Machine architecture names
582@cindex Machine architectures supported by Amd
583
584@table @code
585@item alliant
586Alliant FX/4
587@item arm
588Acorn ARM
589@item aviion
590Data General AViiON
591@item encore
592Encore
593@item fps500
594FPS Model 500
595@item hp9000
596HP 9000/300 family
597@item hp9k8
598HP 9000/800 family
599@item ibm032
600IBM RT
601@item ibm6000
602IBM RISC System/6000
603@item iris4d
604SGI Iris 4D
605@item macII
606Apple Mac II
607@item mips
608MIPS RISC
609@item multimax
610Encore Multimax
611@item orion105
612HLH Orion 1/05
613@item sun3
614Sun-3 family
615@item sun4
616Sun-4 family
617@item tahoe
618Tahoe family
619@item vax
620DEC Vax
621@end table
622
623@node     Mount Maps, Amd Command Line Options, Supported Platforms, Top
624@comment  node-name,  next,  previous,  up
625@chapter Mount Maps
626@cindex Mount maps
627@cindex Automounter configuration maps
628@cindex Mount information
629
630@i{Amd} has no built-in knowledge of machines or filesystems.
631External @dfn{mount-maps} are used to provide the required information.
632Specifically, @i{Amd} needs to know when and under what conditions it
633should mount filesystems.
634
635The map entry corresponding to the requested name contains a list of
636possible locations from which to resolve the request.  Each location
637specifies filesystem type, information required by that filesystem (for
638example the block special device in the case of UFS), and some
639information describing where to mount the filesystem (@pxref{fs Option}).  A
640location may also contain @dfn{selectors} (@pxref{Selectors}).@refill
641
642@menu
643* Map Types::
644* Key Lookup::
645* Location Format::
646@end menu
647
648@node     Map Types, Key Lookup, Mount Maps, Mount Maps
649@comment  node-name,  next,  previous,  up
650@section Map Types
651@cindex Mount map types
652@cindex Map types
653@cindex Configuration map types
654@cindex Types of mount map
655@cindex Types of configuration map
656@cindex Determining the map type
657
658A mount-map provides the run-time configuration information to @i{Amd}.
659Maps can be implemented in many ways.  Some of the forms supported by
660@i{Amd} are regular files, ndbm databases, NIS maps the @dfn{Hesiod}
661name server and even the password file.
662
663A mount-map @dfn{name} is a sequence of characters.  When an automount
664point is created a handle on the mount-map is obtained.  For each map
665type configured @i{Amd} attempts to reference the a map of the
666appropriate type.  If a map is found, @i{Amd} notes the type for future
667use and deletes the reference, for example closing any open file
668descriptors.  The available maps are configure when @i{Amd} is built and
669can be displayed by running the command @samp{amd -v}.
670
671By default, @i{Amd} caches data in a mode dependent on the type of map.
672This is the same as specifying @samp{cache:=mapdefault} and selects a
673suitable default cache mode depending on the map type.  The individual
674defaults are described below.  The @var{cache} option can be specified
675on automount points to alter the caching behaviour (@pxref{Automount
676Filesystem}).@refill
677
678The following map types have been implemented, though some are not
679available on all machines.  Run the command @samp{amd -v} to obtain a
680list of map types configured on your machine.
681
682@menu
683* File maps::
684* ndbm maps::
685* NIS maps::
686* Hesiod maps::
687* Password maps::
688* Union maps::
689@end menu
690
691@node     File maps, ndbm maps, Map Types, Map Types
692@comment  node-name,  next,  previous,  up
693@subsection File maps
694@cindex File maps
695@cindex Flat file maps
696@cindex File map syntactic conventions
697
698When @i{Amd} searches a file for a map entry it does a simple scan of
699the file and supports both comments and continuation lines.
700
701Continuation lines are indicated by a backslash character (@samp{\}) as
702the last character of a line in the file.  The backslash, newline character
703@emph{and any leading white space on the following line} are discarded.  A maximum
704line length of 2047 characters is enforced after continuation lines are read
705but before comments are stripped.  Each line must end with
706a newline character; that is newlines are terminators, not separators.
707The following examples illustrate this:
708
709@example
710key     valA   valB;   \
711          valC
712@end example
713
714specifies @emph{three} locations, and is identical to
715
716@example
717key     valA   valB;   valC
718@end example
719
720However,
721
722@example
723key     valA   valB;\
724          valC
725@end example
726
727specifies only @emph{two} locations, and is identical to
728
729@example
730key     valA   valB;valC
731@end example
732
733After a complete line has been read from the file, including
734continuations, @i{Amd} determines whether there is a comment on the
735line.  A comment begins with a hash (``@samp{#}'') character and
736continues to the end of the line.  There is no way to escape or change
737the comment lead-in character.
738
739Note that continuation lines and comment support @dfn{only} apply to
740file maps, or ndbm maps built with the @code{mk-amd-map} program.
741
742When caching is enabled, file maps have a default cache mode of
743@code{all} (@pxref{Automount Filesystem}).
744
745@node     ndbm maps, NIS maps, File maps, Map Types
746@comment  node-name,  next,  previous,  up
747@subsection ndbm maps
748@cindex ndbm maps
749
750An ndbm map may be used as a fast access form of a file map.  The program,
751@code{mk-amd-map}, converts a normal map file into an ndbm database.
752This program supports the same continuation and comment conventions that
753are provided for file maps.  Note that ndbm format files may @emph{not}
754be sharable across machine architectures.  The notion of speed generally
755only applies to large maps; a small map, less than a single disk block,
756is almost certainly better implemented as a file map.
757
758ndbm maps do not support cache mode @samp{all} and, when caching is
759enabled, have a default cache mode of @samp{inc} (@pxref{Automount Filesystem}).
760
761@node     NIS maps, Hesiod maps, ndbm maps, Map Types
762@comment  node-name,  next,  previous,  up
763@subsection NIS maps
764@cindex NIS (YP) maps
765
766When using NIS (formerly YP), an @i{Amd} map is implemented directly
767by the underlying NIS map.  Comments and continuation lines are
768@emph{not} supported in the automounter and must be stripped when
769constructing the NIS server's database.
770
771NIS maps do not support cache mode @code{all} and, when caching is
772enabled, have a default cache mode of @code{inc} (@pxref{Automount Filesystem}).
773
774The following rule illustrates what could be added to your NIS @file{Makefile},
775in this case causing the @file{amd.home} map to be rebuilt:
776@example
777$(YPTSDIR)/amd.home.time: $(ETCDIR)/amd.home
778        -@@sed -e "s/#.*$$//" -e "/^$$/d" $(ETCDIR)/amd.home | \
779          awk '{  \
780                 for (i = 1; i <= NF; i++) \
781                     if (i == NF) { \
782                         if (substr($$i, length($$i), 1) == "\\") \
783                             printf("%s", substr($$i, 1, length($$i) - 1)); \
784                         else \
785                             printf("%s\n", $$i); \
786                     } \
787                     else \
788                         printf("%s ", $$i); \
789             }' | \
790        $(MAKEDBM) - $(YPDBDIR)/amd.home; \
791        touch $(YPTSDIR)/amd.home.time; \
792        echo "updated amd.home"; \
793        if [ ! $(NOPUSH) ]; then \
794                $(YPPUSH) amd.home; \
795                echo "pushed amd.home"; \
796        else \
797                : ; \
798        fi
799@end example
800
801Here @code{$(YPTSDIR)} contains the time stamp files, and @code{$(YPDBDIR)} contains
802the dbm format NIS files.
803
804@node     Hesiod maps, Password maps, NIS maps, Map Types
805@comment  node-name,  next,  previous,  up
806@subsection Hesiod maps
807@cindex Hesiod maps
808
809When the map name begins with the string @samp{hesiod.} lookups are made
810using the @dfn{Hesiod} name server.  The string following the dot is
811used as a name qualifier and is prepended with the key being located.
812The entire string is then resolved in the @code{automount} context.  For
813example, if the the key is @samp{jsp} and map name is
814@samp{hesiod.homes} then @dfn{Hesiod} is asked to resolve
815@samp{jsp.homes.automount}.
816
817Hesiod maps do not support cache mode @samp{all} and, when caching is
818enabled, have a default cache mode of @samp{inc} (@pxref{Automount Filesystem}).
819
820The following is an example of a @dfn{Hesiod} map entry:
821
822@example
823jsp.homes.automount HS TXT "rfs:=/home/charm;rhost:=charm;sublink:=jsp"
824njw.homes.automount HS TXT "rfs:=/home/dylan/dk2;rhost:=dylan;sublink:=njw"
825@end example
826
827@node     Password maps, Union maps, Hesiod maps, Map Types
828@comment  node-name,  next,  previous,  up
829@subsection Password maps
830@cindex Password file maps
831@cindex /etc/passwd maps
832@cindex User maps, automatic generation
833@cindex Automatic generation of user maps
834@cindex Using the password file as a map
835
836The password map support is unlike the four previous map types.  When
837the map name is the string @file{/etc/passwd} @i{Amd} can lookup a user
838name in the password file and re-arrange the home directory field to
839produce a usable map entry.
840
841@i{Amd} assumes the home directory has the format
842`@t{/}@i{anydir}@t{/}@i{dom1}@t{/../}@i{domN}@t{/}@i{login}'.
843@c @footnote{This interpretation is not necessarily exactly what you want.}
844It breaks this string into a map entry where @code{$@{rfs@}} has the
845value `@t{/}@i{anydir}@t{/}@i{domN}', @code{$@{rhost@}} has the value
846`@i{domN}@t{.}@i{...}@t{.}@i{dom1}', and @code{$@{sublink@}} has the
847value @samp{login}.@refill
848
849Thus if the password file entry was
850
851@example
852/home/achilles/jsp
853@end example
854
855the map entry used by @i{Amd} would be
856
857@example
858rfs:=/home/achilles;rhost:=achilles;sublink:=jsp
859@end example
860
861Similarly, if the password file entry was
862
863@example
864/home/cc/sugar/mjh
865@end example
866
867the map entry used by @i{Amd} would be
868
869@example
870rfs:=/home/sugar;rhost:=sugar.cc;sublink:=jsp
871@end example
872
873@node     Union maps, Map Types, Password maps, Map Types
874@comment  node-name,  next,  previous,  up
875@subsection Union maps
876@cindex Union file maps
877
878The union map support is provided specifically for use with the union
879filesystem, @pxref{Union Filesystem}.
880
881It is identified by the string @samp{union:} which is followed by a
882colon separated list of directories.  The directories are read in order,
883and the names of all entries are recorded in the map cache.  Later
884directories take precedence over earlier ones.  The union filesystem
885type then uses the map cache to determine the union of the names in all
886the directories.
887
888@c subsection Gdbm
889
890@node     Key Lookup, Location Format, Map Types, Mount Maps
891@comment  node-name,  next,  previous,  up
892@section How keys are looked up
893@cindex Key lookup
894@cindex Map lookup
895@cindex Looking up keys
896@cindex How keys are looked up
897@cindex Wildcards in maps
898
899The key is located in the map whose type was determined when the
900automount point was first created.  In general the key is a pathname
901component.  In some circumstances this may be modified by variable
902expansion (@pxref{Variable Expansion}) and prefixing.  If the automount
903point has a prefix, specified by the @var{pref} option, then that is
904prepended to the search key before the map is searched.
905
906If the map cache is a @samp{regexp} cache then the key is treated as an
907egrep-style regular expression, otherwise a normal string comparison is
908made.
909
910If the key cannot be found then a @dfn{wildcard} match is attempted.
911@i{Amd} repeatedly strips the basename from the key, appends @samp{/*} and
912attempts a lookup.  Finally, @i{Amd} attempts to locate the special key @samp{*}.
913
914@group
915For example, the following sequence would be checked if @file{home/dylan/dk2} was
916being located:
917
918@example
919   home/dylan/dk2
920   home/dylan/*
921   home/*
922   *
923@end example
924@end group
925
926At any point when a wildcard is found, @i{Amd} proceeds as if an exact
927match had been found and the value field is then used to resolve the
928mount request, otherwise an error code is propagated back to the kernel.
929(@pxref{Filesystem Types}).@refill
930
931@node     Location Format, , Key Lookup, Mount Maps
932@comment  node-name,  next,  previous,  up
933@section Location Format
934@cindex Location format
935@cindex Map entry format
936@cindex How locations are parsed
937
938The value field from the lookup provides the information required to
939mount a filesystem.  The information is parsed according to the syntax
940shown below.
941
942@display
943@i{location-list}:
944                  @i{location-selection}
945                  @i{location-list} @i{white-space} @t{||} @i{white-space} @i{location-selection}
946@i{location-selection}:
947                  @i{location}
948                  @i{location-selection} @i{white-space} @i{location}
949@i{location}:
950                  @i{location-info}
951                  @t{-}@i{location-info}
952                  @t{-}
953@i{location-info}:
954                  @i{sel-or-opt}
955                  @i{location-info}@t{;}@i{sel-or-opt}
956                  @t{;}
957@i{sel-or-opt}:
958                  @i{selection}
959                  @i{opt-ass}
960@i{selection}:
961                  selector@t{==}@i{value}
962                  selector@t{!=}@i{value}
963@i{opt-ass}:
964                  option@t{:=}@i{value}
965@i{white-space}:
966                  space
967                  tab
968@end display
969
970Note that unquoted whitespace is not allowed in a location description.
971White space is only allowed, and is mandatory, where shown with non-terminal
972@samp{white-space}.
973
974A @dfn{location-selection} is a list of possible volumes with which to
975satisfy the request.  @dfn{location-selection}s are separated by the
976@samp{||} operator.  The effect of this operator is to prevent use of
977location-selections to its right if any of the location-selections on
978its left were selected whether or not any of them were successfully
979mounted (@pxref{Selectors}).@refill
980
981The location-selection, and singleton @dfn{location-list},
982@samp{type:=ufs;dev:=/dev/xd1g} would inform @i{Amd} to mount a UFS
983filesystem from the block special device @file{/dev/xd1g}.
984
985The @dfn{sel-or-opt} component is either the name of an option required
986by a specific filesystem, or it is the name of a built-in, predefined
987selector such as the architecture type.  The value may be quoted with
988double quotes @samp{"}, for example
989@samp{type:="ufs";dev:="/dev/xd1g"}.  These quotes are stripped when the
990value is parsed and there is no way to get a double quote into a value
991field.  Double quotes are used to get white space into a value field,
992which is needed for the program filesystem (@pxref{Program Filesystem}).@refill
993
994@menu
995* Map Defaults::
996* Variable Expansion::
997* Selectors::
998* Map Options::
999@end menu
1000
1001@node     Map Defaults, Variable Expansion, Location Format, Location Format
1002@comment  node-name,  next,  previous,  up
1003@subsection Map Defaults
1004@cindex Map defaults
1005@cindex How to set default map parameters
1006@cindex Setting default map parameters
1007
1008A location beginning with a dash @samp{-} is used to specify default
1009values for subsequent locations.  Any previously specified defaults in
1010the location-list are discarded.  The default string can be empty in
1011which case no defaults apply.
1012
1013The location @samp{-fs:=/mnt;opts:=ro} would set the local mount point
1014to @file{/mnt} and cause mounts to be read-only by default.  Defaults
1015specified this way are appended to, and so override, any global map
1016defaults given with @samp{/defaults}).
1017@c
1018@c A @samp{/defaults} value @dfn{gdef} and a location list
1019@c \begin{quote}
1020@c $@samp{-}@dfn{def}_a $\verb*+ +$ @dfn{loc}_{a_1} $\verb*+ +$ @dfn{loc}_{a_2} $\verb*+ +$ @samp{-}@dfn{def}_b $\verb*+ +$ @dfn{loc}_{b_1} \ldots$
1021@c \end{quote}
1022@c is equivalent to
1023@c \begin{quote}
1024@c $@samp{-}@dfn{gdef}@samp{;}@dfn{def}_a $\verb*+ +$ @dfn{loc}_{a_1} $\verb*+ +$ @dfn{loc}_{a_2} $\verb*+ +$ @samp{-}@dfn{gdef}@samp{;}@dfn{def}_b $\verb*+ +$ @dfn{loc}_{b_1} \ldots$
1025@c \end{quote}
1026@c which is equivalent to
1027@c \begin{quote}
1028@c $@dfn{gdef}@samp{;}@dfn{def}_a@samp{;}@dfn{loc}_{a_1} $\verb*+ +$@dfn{gdef}@samp{;}@dfn{def}_a@samp{;}@dfn{loc}_{a_2} $\verb*+ +$@dfn{gdef}@samp{;}@dfn{def}_b@samp{;}@dfn{loc}_{b_1} \ldots$
1029@c\end{quote}
1030
1031@node     Variable Expansion, Selectors, Map Defaults, Location Format
1032@comment  node-name,  next,  previous,  up
1033@subsection Variable Expansion
1034@cindex Variable expansion
1035@cindex How variables are expanded
1036@cindex Pathname operators
1037@cindex Domain stripping
1038@cindex Domainname operators
1039@cindex Stripping the local domain name
1040@cindex Environment variables
1041@cindex How to access environment variables in maps
1042
1043To allow generic location specifications @i{Amd} does variable expansion
1044on each location and also on some of the option strings.  Any option or
1045selector appearing in the form @code{$@dfn{var}} is replaced by the
1046current value of that option or selector.  For example, if the value of
1047@code{$@{key@}} was @samp{bin}, @code{$@{autodir@}} was @samp{/a} and
1048@code{$@{fs@}} was `@t{$@{autodir@}}@t{/local/}@t{$@{key@}}' then
1049after expansion @code{$@{fs@}} would have the value @samp{/a/local/bin}.
1050Any environment variable can be accessed in a similar way.@refill
1051
1052Two pathname operators are available when expanding a variable.  If the
1053variable name begins with @samp{/} then only the last component of
1054then pathname is substituted.  For example, if @code{$@{path@}} was
1055@samp{/foo/bar} then @code{$@{/path@}} would be expanded to @samp{bar}.
1056Similarly, if the variable name ends with @samp{/} then all but the
1057last component of the pathname is substituted.  In the previous example,
1058@code{$@{path/@}} would be expanded to @samp{/foo}.@refill
1059
1060Two domain name operators are also provided.  If the variable name
1061begins with @samp{.} then only the domain part of the name is
1062substituted.  For example, if @code{$@{rhost@}} was
1063@samp{swan.doc.ic.ac.uk} then @code{$@{.rhost@}} would be expanded to
1064@samp{doc.ic.ac.uk}.  Similarly, if the variable name ends with @samp{.}
1065then only the host component is substituted.  In the previous example,
1066@code{$@{rhost.@}} would be expanded to @samp{swan}.@refill
1067
1068Variable expansion is a two phase process.  Before a location is parsed,
1069all references to selectors, @i{eg} @code{$@{path@}}, are expanded.  The
1070location is then parsed, selections are evaluated and option assignments
1071recorded.  If there were no selections or they all succeeded the
1072location is used and the values of the following options are expanded in
1073the order given: @var{sublink}, @var{rfs}, @var{fs}, @var{opts},
1074@var{mount} and @var{unmount}.
1075
1076Note that expansion of option values is done after @dfn{all} assignments
1077have been completed and not in a purely left to right order as is done
1078by the shell.  This generally has the desired effect but care must be
1079taken if one of the options references another, in which case the
1080ordering can become significant.
1081
1082There are two special cases concerning variable expansion:
1083
1084@enumerate
1085@item
1086before a map is consulted, any selectors in the name received
1087from the kernel are expanded.  For example, if the request from the
1088kernel was for `@t{$@{arch@}}@t{.bin}' and the machine architecture
1089was @samp{vax}, the value given to @code{$@{key@}} would be
1090@samp{vax.bin}.@refill
1091
1092@item
1093the value of @code{$@{rhost@}} is expanded and normalized before the
1094other options are expanded.  The normalization process strips any local
1095sub-domain components.  For example, if @code{$@{domain@}} was
1096@samp{Berkeley.EDU} and @code{$@{rhost@}} was initially
1097@samp{snow.Berkeley.EDU}, after the normalization it would simply be
1098@samp{snow}.  Hostname normalization is currently done in a
1099@emph{case-dependent} manner.@refill
1100@end enumerate
1101
1102@node     Selectors, Map Options, Variable Expansion, Location Format
1103@comment  node-name,  next,  previous,  up
1104@subsection Selectors
1105@cindex Selectors
1106
1107Selectors are used to control the use of a location.  It is possible to
1108share a mount map between many machines in such a way that filesystem
1109location, architecture and operating system differences are hidden from
1110the users.  A selector of the form @samp{arch==sun3;os==sos4} would only
1111apply on Sun-3s running SunOS 4.x.
1112
1113Selectors are evaluated left to right.  If a selector fails then that
1114location is ignored.  Thus the selectors form a conjunction and the
1115locations form a disjunction.  If all the locations are ignored or
1116otherwise fail then @i{Amd} uses the @dfn{error} filesystem
1117(@pxref{Error Filesystem}).  This is equivalent to having a location
1118@samp{type:=error} at the end of each mount-map entry.@refill
1119
1120The selectors currently implemented are:
1121
1122@table @samp
1123@cindex arch, mount selector
1124@cindex Mount selector; arch
1125@cindex Selector; arch
1126@item arch
1127the machine architecture which was automatically determined at compile
1128time.  The architecture type can be displayed by running the command
1129@samp{amd -v}.  @xref{Supported Machine Architectures}.@refill
1130
1131@item autodir
1132@cindex autodir, mount selector
1133@cindex Mount selector; autodir
1134@cindex Selector; autodir
1135the default directory under which to mount filesystems.  This may be
1136changed by the ``-a'' command line option.  See the @var{fs} option.
1137
1138@item byte
1139@cindex byte, mount selector
1140@cindex Mount selector; byte
1141@cindex Selector; byte
1142the machine's byte ordering.  This is either @samp{little}, indicating
1143little-endian, or @samp{big}, indicating big-endian.  One possible use
1144is to share @samp{rwho} databases (@pxref{rwho servers}).  Another is to
1145share ndbm databases, however this use can be considered a courageous
1146juggling act.
1147
1148@item cluster
1149@cindex cluster, mount selector
1150@cindex Mount selector; cluster
1151@cindex Selector; cluster
1152is provided as a hook for the name of the local cluster.  This can be
1153used to decide which servers to use for copies of replicated
1154filesystems.  @code{$@{cluster@}} defaults to the value of
1155@code{$@{domain@}} unless a different value is set with the ``-C''
1156command line option.
1157
1158@item domain
1159@cindex domain, mount selector
1160@cindex Mount selector; domain
1161@cindex Selector; domain
1162the local domain name as specified by the ``-d'' command line option.
1163See @samp{host}.
1164
1165@item host
1166@cindex host, mount selector
1167@cindex Mount selector; host
1168@cindex Selector; host
1169the local hostname as determined by @b{gethostname}(2).  If no domain
1170name was specified on the command line and the hostname contains a
1171period @samp{.} then the string before the period is used as the
1172host name, and the string after the period is assigned to
1173@code{$@{domain@}}.  For example, if the hostname is
1174@samp{styx.doc.ic.ac.uk} then @code{host} would be @samp{styx} and
1175@code{domain} would be @samp{doc.ic.ac.uk}.  @code{hostd} would be
1176@samp{styx.doc.ic.ac.uk}.@refill
1177
1178@item hostd
1179@cindex hostd, mount selector
1180@cindex Mount selector; hostd
1181@cindex Selector; hostd
1182is @code{$@{host@}} and @code{$@{domain@}} concatenated with a
1183@samp{.} inserted between them if required.  If @code{$@{domain@}}
1184is an empty string then @code{$@{host@}} and @code{$@{hostd@}} will be
1185identical.
1186
1187@item karch
1188@cindex karch, mount selector
1189@cindex Mount selector; karch
1190@cindex Selector; karch
1191is provided as a hook for the kernel architecture.  This is used on
1192SunOS 4, for example, to distinguish between different @samp{/usr/kvm}
1193volumes.  @code{$@{karch@}} defaults to the value of @code{$@{arch@}}
1194unless a different value is set with the ``-k'' command line option.
1195
1196@item os
1197@cindex os, mount selector
1198@cindex Mount selector; os
1199@cindex Selector; os
1200the operating system.  Like the machine architecture, this is
1201automatically determined at compile time.  The operating system name can
1202be displayed by running the command @samp{amd -v}.  @xref{Supported
1203Operating Systems}.@refill
1204
1205@end table
1206
1207The following selectors are also provided.  Unlike the other selectors,
1208they vary for each lookup.  Note that when the name from the kernel is
1209expanded prior to a map lookup, these selectors are all defined as empty
1210strings.
1211
1212@table @samp
1213@item key
1214@cindex key, mount selector
1215@cindex Mount selector; key
1216@cindex Selector; key
1217the name being resolved.  For example, if @file{/home} is an automount
1218point, then accessing @file{/home/foo} would set @code{$@{key@}} to the
1219string @samp{foo}.  The key is prefixed by the @var{pref} option set in
1220the parent mount point.  The default prefix is an empty string.  If the
1221prefix was @file{blah/} then @code{$@{key@}} would be set to
1222@file{blah/foo}.@refill
1223
1224@item map
1225@cindex map, mount selector
1226@cindex Mount selector; map
1227@cindex Selector; map
1228the name of the mount map being used.
1229
1230@item path
1231@cindex path, mount selector
1232@cindex Mount selector; path
1233@cindex Selector; path
1234the full pathname of the name being resolved.  For example
1235@file{/home/foo} in the example above.
1236
1237@item wire
1238@cindex wire, mount selector
1239@cindex Mount selector; wire
1240@cindex Selector; wire
1241the name of the network to which the primary network interface is
1242attached.  If a symbolic name cannot be found in the networks or hosts
1243database then dotted IP address format is used.  This value is also
1244output by the ``-v'' option.
1245
1246@end table
1247
1248Selectors can be negated by using @samp{!=} instead of @samp{==}.  For
1249example to select a location on all non-Vax machines the selector
1250@samp{arch!=vax} would be used.
1251
1252@node     Map Options,  , Selectors, Location Format
1253@comment  node-name,  next,  previous,  up
1254@subsection Map Options
1255@cindex Map options
1256@cindex Setting map options
1257
1258Options are parsed concurrently with selectors.  The difference is that
1259when an option is seen the string following the @samp{:=} is
1260recorded for later use.  As a minimum the @var{type} option must be
1261specified.  Each filesystem type has other options which must also be
1262specified.  @xref{Filesystem Types}, for details on the filesystem
1263specific options.@refill
1264
1265Superfluous option specifications are ignored and are not reported
1266as errors.
1267
1268The following options apply to more than one filesystem type.
1269
1270@menu
1271* delay Option::
1272* fs Option::
1273* opts Option::
1274* sublink Option::
1275* type Option::
1276@end menu
1277
1278@node     delay Option, fs Option, Map Options, Map Options
1279@comment  node-name,  next,  previous,  up
1280@subsubsection delay Option
1281@cindex Setting a delay on a mount location
1282@cindex Delaying mounts from specific locations
1283@cindex Primary server
1284@cindex Secondary server
1285@cindex delay, mount option
1286@cindex Mount option; delay
1287
1288The delay, in seconds, before an attempt will be made to mount from the current location.
1289Auxilliary data, such as network address, file handles and so on are computed
1290regardless of this value.
1291
1292A delay can be used to implement the notion of primary and secondary file servers.
1293The secondary servers would have a delay of a few seconds,
1294thus giving the primary servers a chance to respond first.
1295
1296@node     fs Option, opts Option, delay Option, Map Options
1297@comment  node-name,  next,  previous,  up
1298@subsubsection fs Option
1299@cindex Setting the local mount point
1300@cindex Overriding the default mount point
1301@cindex fs, mount option
1302@cindex Mount option; fs
1303
1304The local mount point.  The semantics of this option vary between
1305filesystems.
1306
1307For NFS and UFS filesystems the value of @code{$@{fs@}} is used as the
1308local mount point.  For other filesystem types it has other meanings
1309which are described in the section describing the respective filesystem
1310type.  It is important that this string uniquely identifies the
1311filesystem being mounted.  To satisfy this requirement, it should
1312contain the name of the host on which the filesystem is resident and the
1313pathname of the filesystem on the local or remote host.
1314
1315The reason for requiring the hostname is clear if replicated filesystems
1316are considered.  If a fileserver goes down and a replacement filesystem
1317is mounted then the @dfn{local} mount point @dfn{must} be different from
1318that of the filesystem which is hung.  Some encoding of the filesystem
1319name is required if more than one filesystem is to be mounted from any
1320given host.
1321
1322If the hostname is first in the path then all mounts from a particular
1323host will be gathered below a single directory.  If that server goes
1324down then the hung mount points are less likely to be accidentally
1325referenced, for example when @b{getwd}(3) traverses the namespace to
1326find the pathname of the current directory.
1327
1328The @samp{fs} option defaults to
1329@code{$@{autodir@}/$@{rhost@}$@{rfs@}}.  In addition,
1330@samp{rhost} defaults to the local host name (@code{$@{host@}}) and
1331@samp{rfs} defaults to the value of @code{$@{path@}}, which is the full
1332path of the requested file; @samp{/home/foo} in the example above
1333(@pxref{Selectors}).  @code{$@{autodir@}} defaults to @samp{/a} but may
1334be changed with the ``-a'' command line option.  Sun's automounter
1335defaults to @samp{/tmp_mnt}.  Note that there is no @samp{/} between
1336the @code{$@{rhost@}} and @code{$@{rfs@}} since @code{$@{rfs@}} begins
1337with a @samp{/}.@refill
1338
1339@node     opts Option, sublink Option, fs Option, Map Options
1340@comment  node-name,  next,  previous,  up
1341@subsubsection opts Option
1342@cindex Setting system mount options
1343@cindex Passing parameters to the mount system call
1344@cindex mount system call
1345@cindex mount system call flags
1346@cindex The mount system call
1347@cindex opts, mount option
1348@cindex Mount option; opts
1349
1350The options to pass to the mount system call.  A leading @samp{-} is
1351silently ignored.  The mount options supported generally correspond to
1352those used by @b{mount}(8) and are listed below.  Some additional
1353pseudo-options are interpreted by @i{Amd} and are also listed.
1354
1355Unless specifically overridden, each of the system default mount options
1356applies.  Any options not recognised are ignored.  If no options list is
1357supplied the string @samp{rw,defaults} is used and all the system
1358default mount options apply.  Options which are not applicable for a
1359particular operating system are silently ignored.  For example, only 4.4
1360BSD is known to implement the @code{compress} and @code{spongy} options.
1361
1362@table @code
1363@item compress
1364Use NFS compression protocol.
1365@item grpid
1366Use BSD directory group-id semantics.
1367@item intr
1368Allow keyboard interrupts on hard mounts.
1369@item noconn
1370Don't make a connection on datagram transports.
1371@item nocto
1372No close-to-open consistency.
1373@item nodevs
1374Don't allow local special devices on this filesystem.
1375@item nosuid
1376Don't allow set-uid or set-gid executables on this filesystem.
1377@item quota
1378Enable quota checking on this mount.
1379@item retrans=@i{n}
1380The number of NFS retransmits made before a user error is generated by a
1381@samp{soft} mounted filesystem, and before a @samp{hard} mounted
1382filesystem reports @samp{NFS server @dfn{yoyo} not responding still
1383trying}.
1384@item ro
1385Mount this filesystem readonly.
1386@item rsize=@var{n}
1387The NFS read packet size.  You may need to set this if you are using
1388NFS/UDP through a gateway.
1389@item soft
1390Give up after @dfn{retrans} retransmissions.
1391@item spongy
1392Like @samp{soft} for status requests, and @samp{hard} for data transfers.
1393@item tcp
1394Use TCP/IP instead of UDP/IP, ignored if the NFS implementation does not
1395support TCP/IP mounts.
1396@item timeo=@var{n}
1397The NFS timeout, in tenth-seconds, before a request is retransmitted.
1398@item wsize=@var{n}
1399The NFS write packet size.  You may need to set this if you are using
1400NFS/UDP through a gateway.
1401@end table
1402
1403The following options are implemented by @i{Amd}, rather than being
1404passed to the kernel.
1405
1406@table @code
1407@item nounmount
1408Configures the mount so that its time-to-live will
1409never expire.  This is also the default for some filesystem types.
1410@c
1411@c Implementation broken:
1412@item ping=@var{n}
1413The interval, in seconds, between keep-alive pings.  When four
1414consecutive pings have failed the mount point is marked as hung.  This
1415interval defaults to 30 seconds.  If the ping interval is less then or
1416equal to zero, no pings are sent and the host is assumed to be always
1417up.  By default, pings are not sent for an NFS/TCP mount.
1418@item retry=@var{n}
1419The number of times to retry the mount system call.
1420@item utimeout=@var{n}
1421The interval, in seconds, by which the mount's
1422time-to-live is extended after an unmount attempt
1423has failed.  In fact the interval is extended before the unmount is
1424attempted to avoid thrashing.  The default value is 120 seconds (two
1425minutes) or as set by the ``-w'' command line option.
1426@end table
1427
1428@node     sublink Option, type Option, opts Option, Map Options
1429@comment  node-name,  next,  previous,  up
1430@subsubsection sublink Option
1431@cindex Setting the sublink option
1432@cindex sublink, mount option
1433@cindex Mount option; sublink
1434
1435The subdirectory within the mounted filesystem to which the reference
1436should point.  This can be used to prevent duplicate mounts in cases
1437where multiple directories in the same mounted filesystem are used.
1438
1439@node     type Option, Map Options, sublink Option, Map Options
1440@comment  node-name,  next,  previous,  up
1441@subsubsection type Option
1442@cindex Setting the filesystem type option
1443@cindex type, mount option
1444@cindex Mount option; type
1445
1446The filesystem type to be used.  @xref{Filesystem Types}, for a full
1447description of each type.@refill
1448
1449@node     Amd Command Line Options, Filesystem Types, Mount Maps, Top
1450@comment  node-name,  next,  previous,  up
1451@chapter @i{Amd} Command Line Options
1452@cindex Command line options, Amd
1453@cindex Amd command line options
1454@cindex Overriding defaults on the command line
1455
1456Many of @i{Amd}'s parameters can be set from the command line.  The
1457command line is also used to specify automount points and maps.
1458
1459The general format of a command line is
1460
1461@example
1462amd [@i{options}] { @i{directory} @i{map-name} [-@i{map-options}] } ...
1463@end example
1464
1465For each directory and map-name given, @i{Amd} establishes an
1466automount point.  The @dfn{map-options} may be any sequence of options
1467or selectors---@pxref{Location Format}.  The @dfn{map-options}
1468apply only to @i{Amd}'s mount point.
1469
1470@samp{type:=toplvl;cache:=mapdefault;fs:=$@{map@}} is the default value for the
1471map options.  Default options for a map are read from a special entry in
1472the map whose key is the string @samp{/defaults}.  When default options
1473are given they are prepended to any options specified in the mount-map
1474locations as explained in.  @xref{Map Defaults}, for more details.
1475
1476The @dfn{options} are any combination of those listed below.
1477
1478Once the command line has been parsed, the automount points are mounted.
1479The mount points are created if they do not already exist, in which case they
1480will be removed when @i{Amd} exits.
1481Finally, @i{Amd} disassociates itself from its controlling terminal and
1482forks into the background.
1483
1484Note: Even if @i{Amd} has been built with @samp{-DDEBUG} it will still
1485background itself and disassociate itself from the controlling terminal.
1486To use a debugger it is necessary to specify @samp{-D nodaemon} on the
1487command line.
1488
1489@menu
1490* -a Option::	Automount directory.
1491* -c Option::	Cache timeout interval.
1492* -d Option::	Domain name.
1493* -k Option::	Kernel architecture.
1494* -l Option::	Log file.
1495* -n Option::	Hostname normalisation.
1496* -p Option::	Output process id.
1497* -r Option::	Restart existing mounts.
1498* -t Option::	Kernel RPC timeout.
1499* -v Option::	Version information.
1500* -w Option::	Wait interval after failed unmount.
1501* -x Option::	Log options.
1502* -y Option::	NIS domain.
1503* -C-Option::	Cluster name.
1504* -D-Option::	Debug flags.
1505@end menu
1506
1507@node     -a Option, -c Option, Amd Command Line Options, Amd Command Line Options
1508@comment  node-name,  next,  previous,  up
1509@section @code{-a} @var{directory}
1510@cindex Automount directory
1511@cindex Setting the default mount directory
1512
1513Specifies the default mount directory.  This option changes the variable
1514@code{$@{autodir@}} which otherwise defaults to @file{/a}.  For example,
1515some sites prefer @file{/amd}.
1516
1517@example
1518amd -a /amd ...
1519@end example
1520
1521@node     -c Option, -d Option, -a Option, Amd Command Line Options
1522@comment  node-name,  next,  previous,  up
1523@section @code{-c} @var{cache-interval}
1524@cindex Cache interval
1525@cindex Interval before a filesystem times out
1526@cindex Setting the interval before a filesystem times out
1527@cindex Changing the interval before a filesystem times out
1528
1529Selects the period, in seconds, for which a name is cached by @i{Amd}.
1530If no reference is made to the volume in this period, @i{Amd} discards
1531the volume name to filesystem mapping.
1532
1533Once the last reference to a filesystem has been removed, @i{Amd}
1534attempts to unmount the filesystem.  If the unmount fails the interval
1535is extended by a further period as specified by the @samp{-w} command
1536line option or by the @samp{utimeout} mount option.
1537
1538The default @dfn{cache-interval} is 300 seconds (five minutes).
1539
1540@node     -d Option, -k Option, -a Option, Amd Command Line Options
1541@comment  node-name,  next,  previous,  up
1542@section @code{-d} @var{domain}
1543@cindex Domain name
1544@cindex Setting the local domain name
1545@cindex Overriding the local domain name
1546
1547Specifies the host's domain.  This sets the internal variable
1548@code{$@{domain@}} and affects the @code{$@{hostd@}} variable.
1549
1550If this option is not specified and the hostname already contains the
1551local domain then that is used, otherwise the default value of
1552@code{$@{domain@}} is @samp{unknown.domain}.
1553
1554For example, if the local domain was @samp{doc.ic.ac.uk}, @i{Amd} could
1555be started as follows:
1556
1557@example
1558amd -d doc.ic.ac.uk ...
1559@end example
1560
1561@node     -k Option, -l Option, -d Option, Amd Command Line Options
1562@comment  node-name,  next,  previous,  up
1563@section @code{-k} @var{kernel-architecture}
1564@cindex Setting the Kernel architecture
1565
1566Specifies the kernel architecture of the system.  This is usually the
1567output of @samp{arch -k} and its only effect is to set the variable
1568@code{$@{karch@}}.  If this option is not given, @code{$@{karch@}} has
1569the same value as @code{$@{arch@}}.
1570
1571This would be used as follows:
1572
1573@example
1574amd -k `arch -k` ...
1575@end example
1576
1577@node     -l Option, -n Option, -k Option, Amd Command Line Options
1578@comment  node-name,  next,  previous,  up
1579@section @code{-l} @var{log-option}
1580@cindex Log filename
1581@cindex Setting the log file
1582@cindex Using syslog to log errors
1583@cindex syslog
1584
1585Selects the form of logging to be made.  Two special @dfn{log-options}
1586are recognised.
1587
1588@enumerate
1589@item
1590If @dfn{log-option} is the string @samp{syslog}, @i{Amd} will use the
1591@b{syslog}(3) mechanism.@refill
1592
1593@item
1594If @dfn{log-option} is the string @samp{/dev/stderr}, @i{Amd} will use
1595standard error, which is also the default target for log messages.  To
1596implement this, @i{Amd} simulates the effect of the @samp{/dev/fd}
1597driver.
1598@end enumerate
1599
1600Any other string is taken as a filename to use for logging.  Log
1601messages are appended to the file if it already exists, otherwise a new
1602file is created.  The file is opened once and then held open, rather
1603than being re-opened for each message.
1604
1605If the @samp{syslog} option is specified but the system does not support
1606syslog or if the named file cannot be opened or created, @i{Amd} will
1607use standard error.  Error messages generated before @i{Amd} has
1608finished parsing the command line are printed on standard error.
1609
1610Using @samp{syslog} is usually best, in which case @i{Amd} would be
1611started as follows:
1612
1613@example
1614amd -l syslog ...
1615@end example
1616
1617@node     -n Option, -p Option, -l Option, Amd Command Line Options
1618@comment  node-name,  next,  previous,  up
1619@section @code{-n}
1620@cindex Hostname normalisation
1621@cindex Aliased hostnames
1622@cindex Resolving aliased hostnames
1623@cindex Normalising hostnames
1624
1625Normalises the remote hostname before using it.  Normalisation is done
1626by replacing the value of @code{$@{rhost@}} with the primary name
1627returned by a hostname lookup.
1628
1629This option should be used if several names are used to refer to a
1630single host in a mount map.
1631
1632@node     -p Option, -t Option, -n Option, Amd Command Line Options
1633@comment  node-name,  next,  previous,  up
1634@section @code{-p}
1635@cindex Process id
1636@cindex Displaying the process id
1637@cindex process id of Amd daemon
1638@cindex pid file, creating with -p option
1639@cindex Creating a pid file
1640
1641Causes @i{Amd}'s process id to be printed on standard output.
1642This can be redirected to a suitable file for use with kill:
1643
1644@example
1645amd -p > /var/run/amd.pid ...
1646@end example
1647
1648This option only has an affect if @i{Amd} is running in daemon mode.
1649If @i{Amd} is started with the @code{-D nodaemon} debug flag, this
1650option is ignored.
1651
1652@node     -r Option, -t Option, -p Option, Amd Command Line Options
1653@comment  node-name,  next,  previous,  up
1654@section @code{-r}
1655@cindex Restarting existing mounts
1656@cindex Picking up existing mounts
1657
1658Tells @i{Amd} to restart existing mounts (@pxref{Inheritance Filesystem}).
1659@c @dfn{This option will be made the default in the next release.}
1660
1661@node     -t Option, -v Option, -r Option, Amd Command Line Options
1662@comment  node-name,  next,  previous,  up
1663@section @code{-t} @var{timeout.retransmit}
1664@cindex Setting Amd's RPC parameters
1665
1666Specifies the RPC @dfn{timeout} and @dfn{retransmit} intervals used by
1667the kernel to communicate to @i{Amd}.  These are used to set the
1668@samp{timeo} and @samp{retrans} mount options.
1669
1670@i{Amd} relies on the kernel RPC retransmit mechanism to trigger mount
1671retries.  The value of this parameter changes the retry interval.  Too
1672long an interval gives poor interactive response, too short an interval
1673causes excessive retries.
1674
1675@node     -v Option, -w Option, -t Option, Amd Command Line Options
1676@comment  node-name,  next,  previous,  up
1677@section @code{-v}
1678@cindex Version information
1679@cindex Discovering version information
1680@cindex How to discover your version of Amd
1681
1682Print version information on standard error and then exit.  The output
1683is of the form:
1684
1685@example
1686amd 5.2.1.11 of 91/03/17 18:04:05 5.3Alpha11 #0: Sun Mar 17 18:07:28 GMT 1991
1687Built by pendry@@vangogh.Berkeley.EDU for a hp300 running bsd44 (big-endian).
1688Map support for: root, passwd, union, file, error.
1689FS: ufs, nfs, nfsx, host, link, program, union, auto, direct, toplvl, error.
1690Primary network is 128.32.130.0.
1691@end example
1692
1693The information includes the version number, release date and name of
1694the release.  The architecture (@pxref{Supported Machine Architectures}),
1695operating system (@pxref{Supported Operating Systems})
1696and byte ordering are also printed as they appear in the @code{$@{os@}},
1697@code{$@{arch@}} and @code{$@{byte@}} variables.@refill
1698
1699@node     -w Option, -x Option, -v Option, Amd Command Line Options
1700@comment  node-name,  next,  previous,  up
1701@section @code{-w} @var{wait-timeout}
1702@cindex Setting the interval between unmount attempts
1703@cindex unmount attempt backoff interval
1704
1705Selects the interval in seconds between unmount attempts after the
1706initial time-to-live has expired.
1707
1708This defaults to 120 seconds (two minutes).
1709
1710@node     -x Option, -y Option, -w Option, Amd Command Line Options
1711@comment  node-name,  next,  previous,  up
1712@section @code{-x} @var{opts}
1713@cindex Log message selection
1714@cindex Selecting specific log messages
1715@cindex How to select log messages
1716@cindex syslog priorities
1717
1718Specifies the type and verbosity of log messages.  @dfn{opts} is
1719a comma separated list selected from the following options:
1720
1721@table @code
1722@item fatal
1723Fatal errors
1724@item error
1725Non-fatal errors
1726@item user
1727Non-fatal user errors
1728@item warn
1729Recoverable errors
1730@item warning
1731Alias for @code{warn}
1732@item info
1733Information messages
1734@item map
1735Mount map usage
1736@item stats
1737Additional statistics
1738@item all
1739All of the above
1740@end table
1741
1742Initially a set of default logging flags is enabled.  This is as if
1743@samp{-x all,nomap,nostats} had been selected.  The command line is
1744parsed and logging is controlled by the ``-x'' option.  The very first
1745set of logging flags is saved and can not be subsequently disabled using
1746@i{Amq}.  This default set of options is useful for general production
1747use.@refill
1748
1749The @samp{info} messages include details of what is mounted and
1750unmounted and when filesystems have timed out.  If you want to have the
1751default set of messages without the @samp{info} messages then you simply
1752need @samp{-x noinfo}.  The messages given by @samp{user} relate to
1753errors in the mount maps, so these are useful when new maps are
1754installed.  The following table lists the syslog priorites used for each
1755of the message types.@refill
1756
1757@table @code
1758@item fatal
1759LOG_CRIT
1760@item error
1761LOG_ERR
1762@item user
1763LOG_WARNING
1764@item warning
1765LOG_WARNING
1766@item info
1767LOG_INFO
1768@item debug
1769LOG_DEBUG
1770@item map
1771LOG_DEBUG
1772@item stats
1773LOG_INFO
1774@end table
1775
1776
1777The options can be prefixed by the string @samp{no} to indicate
1778that this option should be turned off.  For example, to obtain all
1779but @samp{info} messages the option @samp{-x all,noinfo} would be used.
1780
1781If @i{Amd} was built with debugging enabled the @code{debug} option is
1782automatically enabled regardless of the command line options.
1783
1784@node     -y Option, -C-Option, -x Option, Amd Command Line Options
1785@comment  node-name,  next,  previous,  up
1786@section @code{-y} @var{NIS-domain}
1787@cindex NIS (YP) domain name
1788@cindex Overriding the NIS (YP) domain name
1789@cindex Setting the NIS (YP) domain name
1790@cindex YP domain name
1791
1792Selects an alternate NIS domain.  This is useful for debugging and
1793cross-domain shared mounting.  If this flag is specified, @i{Amd}
1794immediately attempts to bind to a server for this domain.
1795@c @i{Amd} refers to NIS maps when it starts, unless the ``-m'' option
1796@c is specified, and whenever required in a mount map.
1797
1798@node     -C-Option, -D-Option, -y Option, Amd Command Line Options
1799@comment  node-name,  next,  previous,  up
1800@section @code{-C} @var{cluster-name}
1801@cindex Cluster names
1802@cindex Setting the cluster name
1803
1804Specifies the name of the cluster of which the local machine is a member.
1805The only effect is to set the variable @code{$@{cluster@}}.
1806The @dfn{cluster-name} is will usually obtained by running another command which uses
1807a database to map the local hostname into a cluster name.
1808@code{$@{cluster@}} can then be used as a selector to restrict mounting of
1809replicated data.
1810If this option is not given, @code{$@{cluster@}} has the same value as @code{$@{domain@}}.
1811This would be used as follows:
1812
1813@example
1814amd -C `clustername` ...
1815@end example
1816
1817@node     -D-Option, , -C-Option, Amd Command Line Options
1818@comment  node-name,  next,  previous,  up
1819@section @code{-D} @var{opts}
1820@cindex Debug options
1821@cindex Setting debug flags
1822
1823Controls the verbosity and coverage of the debugging trace; @dfn{opts}
1824is a comma separated list of debugging options.  The ``-D'' option is
1825only available if @i{Amd} was compiled with @samp{-DDEBUG}.  The memory
1826debugging facilities are only available if @i{Amd} was compiled with
1827@samp{-DDEBUG_MEM} (in addition to @samp{-DDEBUG}).
1828
1829The most common options to use are @samp{-D trace} and @samp{-D test}
1830(which turns on all the useful debug options).  See the program source
1831for a more detailed explanation of the available options.
1832
1833@node     Filesystem Types, Run-time Administration, Amd Command Line Options, Top
1834@comment  node-name,  next,  previous,  up
1835@chapter Filesystem Types
1836@cindex Filesystem types
1837@cindex Mount types
1838@cindex Types of filesystem
1839
1840To mount a volume, @i{Amd} must be told the type of filesystem to be
1841used.  Each filesystem type typically requires additional information
1842such as the fileserver name for NFS.
1843
1844From the point of view of @i{Amd}, a @dfn{filesystem} is anything that
1845can resolve an incoming name lookup.  An important feature is support
1846for multiple filesystem types.  Some of these filesystems are
1847implemented in the local kernel and some on remote fileservers, whilst
1848the others are implemented internally by @i{Amd}.@refill
1849
1850The two common filesystem types are UFS and NFS.  Four other user
1851accessible filesystems (@samp{link}, @samp{program}, @samp{auto} and
1852@samp{direct}) are also implemented internally by @i{Amd} and these are
1853described below.  There are two additional filesystem types internal to
1854@i{Amd} which are not directly accessible to the user (@samp{inherit}
1855and @samp{error}).  Their use is described since they may still have an
1856effect visible to the user.@refill
1857
1858@menu
1859* Network Filesystem::		A single NFS filesystem.
1860* Network Host Filesystem::	NFS mount a host's entire export tree.
1861* Network Filesystem Group::	An atomic group of NFS filesystems.
1862* Unix Filesystem::		Native disk filesystem.
1863* Program Filesystem::		Generic Program mounts.
1864* Symbolic Link Filesystem::	Local link referencing existing filesystem.
1865* Automount Filesystem::
1866* Direct Automount Filesystem::
1867* Union Filesystem::
1868* Error Filesystem::
1869* Top-level Filesystem::
1870* Root Filesystem::
1871* Inheritance Filesystem::
1872@end menu
1873
1874@node     Network Filesystem, Network Host Filesystem, Filesystem Types, Filesystem Types
1875@comment  node-name,  next,  previous,  up
1876@section Network Filesystem (@samp{type:=nfs})
1877@cindex NFS
1878@cindex Mounting an NFS filesystem
1879@cindex How to mount and NFS filesystem
1880@cindex nfs, filesystem type
1881@cindex Filesystem type; nfs
1882
1883The @dfn{nfs} filesystem type provides access to Sun's NFS.
1884
1885@noindent
1886The following options must be specified:
1887
1888@table @code
1889@cindex rhost, mount option
1890@cindex Mount option; rhost
1891@item rhost
1892the remote fileserver.  This must be an entry in the hosts database.  IP
1893addresses are not accepted.  The default value is taken
1894from the local host name (@code{$@{host@}}) if no other value is
1895specified.
1896
1897@cindex rfs, mount option
1898@cindex Mount option; rfs
1899@item rfs
1900the remote filesystem.
1901If no value is specified for this option, an internal default of
1902@code{$@{path@}} is used.
1903@end table
1904
1905NFS mounts require a two stage process.  First, the @dfn{file handle} of
1906the remote file system must be obtained from the server.  Then a mount
1907system call must be done on the local system.  @i{Amd} keeps a cache
1908of file handles for remote file systems.  The cache entries have a
1909lifetime of a few minutes.
1910
1911If a required file handle is not in the cache, @i{Amd} sends a request
1912to the remote server to obtain it.  @i{Amd} @dfn{does not} wait for
1913a response; it notes that one of the locations needs retrying, but
1914continues with any remaining locations.  When the file handle becomes
1915available, and assuming none of the other locations was successfully
1916mounted, @i{Amd} will retry the mount.  This mechanism allows several
1917NFS filesystems to be mounted in parallel.
1918@c @footnote{The mechanism
1919@c is general, however NFS is the only filesystem
1920@c for which the required hooks have been written.}
1921The first one which responds with a valid file handle will be used.
1922
1923@noindent
1924An NFS entry might be:
1925
1926@example
1927jsp  host!=charm;type:=nfs;rhost:=charm;rfs:=/home/charm;sublink:=jsp
1928@end example
1929
1930The mount system call and any unmount attempts are always done
1931in a new task to avoid the possibilty of blocking @i{Amd}.
1932
1933@node     Network Host Filesystem, Network Filesystem Group, Network Filesystem, Filesystem Types
1934@comment  node-name,  next,  previous,  up
1935@section Network Host Filesystem (@samp{type:=host})
1936@cindex Network host filesystem
1937@cindex Mounting entire export trees
1938@cindex How to mount all NFS exported filesystems
1939@cindex host, filesystem type
1940@cindex Filesystem type; host
1941
1942@c NOTE: the current implementation of the @dfn{host} filesystem type
1943@c sometimes fails to maintain a consistent view of the remote mount tree.
1944@c This happens when the mount times out and only some of the remote mounts
1945@c are successfully unmounted.  To prevent this from occuring, use the
1946@c @samp{nounmount} mount option.
1947
1948The @dfn{host} filesystem allows access to the entire export tree of an
1949NFS server.  The implementation is layered above the @samp{nfs}
1950implementation so keep-alives work in the same way.  The only option
1951which needs to specified is @samp{rhost} which is the name of the
1952fileserver to mount.
1953
1954The @samp{host} filesystem type works by querying the mount daemon on
1955the given fileserver to obtain its export list.  @i{Amd} then obtains
1956filehandles for each of the exported filesystems.  Any errors at this
1957stage cause that particular filesystem to be ignored.  Finally each
1958filesystem is mounted.  Again, errors are logged but ignored.  One
1959common reason for mounts to fail is that the mount point does not exist.
1960Although @i{Amd} attempts to automatically create the mount point, it
1961may be on a remote filesystem to which @i{Amd} does not have write
1962permission.
1963
1964When an attempt to unmount a @samp{host} filesystem mount fails, @i{Amd}
1965remounts any filesystems which had succesfully been unmounted.  To do
1966this @i{Amd} queries the mount daemon again and obtains a fresh copy of
1967the export list.  @i{Amd} then tries to mount any exported filesystems
1968which are not currently mounted.
1969
1970Sun's automounter provides a special @samp{-hosts} map.  To achieve the
1971same effect with @i{Amd} requires two steps.  First a mount map must
1972be created as follows:
1973
1974@example
1975/defaults  type:=host;fs:=$@{autodir@}/$@{rhost@}/root;rhost:=$@{key@}
1976*          opts:=rw,nosuid,grpid
1977@end example
1978
1979@noindent
1980and then start @i{Amd} with the following command
1981
1982@example
1983amd /n net.map
1984@end example
1985
1986@noindent
1987where @samp{net.map} is the name of map described above.  Note that the
1988value of @code{$@{fs@}} is overridden in the map.  This is done to avoid
1989a clash between the mount tree and any other filesystem already mounted
1990from the same fileserver.
1991
1992If different mount options are needed for different hosts then
1993additional entries can be added to the map, for example
1994
1995@example
1996host2       opts:=ro,nosuid,soft
1997@end example
1998
1999@noindent
2000would soft mount @samp{host2} read-only.
2001
2002@node     Network Filesystem Group, Unix Filesystem, Network Host Filesystem, Filesystem Types
2003@comment  node-name,  next,  previous,  up
2004@section Network Filesystem Group (@samp{type:=nfsx})
2005@cindex Network filesystem group
2006@cindex Atomic NFS mounts
2007@cindex Mounting an atomic group of NFS filesystems
2008@cindex How to mount an atomic group of NFS filesystems
2009@cindex nfsx, filesystem type
2010@cindex Filesystem type; nfsx
2011
2012The @dfn{nfsx} filesystem allows a group of filesystems to be mounted
2013from a single NFS server.  The implementation is layered above the
2014@samp{nfs} implementation so keep-alives work in the same way.
2015
2016The options are the same as for the @samp{nfs} filesystem with one
2017difference.
2018
2019@noindent
2020The following options must be specified:
2021
2022@table @code
2023@item rhost
2024the remote fileserver.  This must be an entry in the hosts database.  IP
2025addresses are not accepted.  The default value is taken from the local
2026host name (@code{$@{host@}}) if no other value is specified.
2027
2028@item rfs
2029as a list of filesystems to mount.  The list is in the form of a comma
2030separated strings.
2031@end table
2032
2033@noindent
2034For example:
2035
2036@example
2037pub      type:=nfsx;rhost:=gould;rfs:=/public,/,graphics,usenet
2038@end example
2039
2040The first string defines the root of the tree, and is applied as a
2041prefix to the remaining members of the list which define the individual
2042filesystems.  The first string is @emph{not} used as a filesystem name.
2043A parallel operation is used to determine the local mount points to
2044ensure a consistent layout of a tree of mounts.
2045
2046Here, the @emph{three} filesystems, @samp{/public},
2047@samp{/public/graphics} and @samp{/public/usenet}, would be mounted.@refill
2048
2049@node     Unix Filesystem, Program Filesystem, Network Filesystem Group, Filesystem Types
2050@comment  node-name,  next,  previous,  up
2051@section Unix Filesystem (@samp{type:=ufs})
2052@cindex Unix filesystem
2053@cindex UFS
2054@cindex Mounting a UFS filesystem
2055@cindex Mounting a local disk
2056@cindex How to mount a UFS filesystems
2057@cindex How to mount a local disk
2058@cindex Disk filesystems
2059@cindex ufs, filesystem type
2060@cindex Filesystem type; ufs
2061
2062The @dfn{ufs} filesystem type provides access to the system's
2063standard disk filesystem---usually a derivative of the Berkeley Fast Filesystem.
2064
2065@noindent
2066The following option must be specified:
2067
2068@table @code
2069@cindex dev, mount option
2070@cindex Mount option; dev
2071@item dev
2072the block special device to be mounted.
2073@end table
2074
2075A UFS entry might be:
2076
2077@example
2078jsp   host==charm;type:=ufs;dev:=/dev/xd0g;sublink:=jsp
2079@end example
2080
2081@node     Program Filesystem, Symbolic Link Filesystem, Unix Filesystem, Filesystem Types
2082@comment  node-name,  next,  previous,  up
2083@section Program Filesystem (@samp{type:=program})
2084@cindex Program filesystem
2085@cindex Mount a filesystem under program control
2086@cindex program, filesystem type
2087@cindex Filesystem type; program
2088
2089The @dfn{program} filesystem type allows a program to be run whenever a
2090mount or unmount is required.  This allows easy addition of support for
2091other filesystem types, such as MIT's Remote Virtual Disk (RVD)
2092which has a programmatic interface via the commands
2093@samp{rvdmount} and @samp{rvdunmount}.
2094
2095@noindent
2096The following options must be specified:
2097
2098@table @code
2099@cindex mount, mount option
2100@cindex Mount option; mount
2101@item mount
2102the program which will perform the mount.
2103
2104@cindex unmount, mount option
2105@cindex Mount option; unmount
2106@item unmount
2107the program which will perform the unmount.
2108@end table
2109
2110The exit code from these two programs is interpreted as a Unix error
2111code.  As usual, exit code zero indicates success.  To execute the
2112program @i{Amd} splits the string on whitespace to create an array of
2113substrings.  Single quotes @samp{'} can be used to quote whitespace
2114if that is required in an argument.  There is no way to escape or change
2115the quote character.
2116
2117To run the program @samp{rvdmount} with a host name and filesystem as
2118arguments would be specified by @samp{mount:="/etc/rvdmount rvdmount
2119fserver $@{path@}"}.
2120
2121The first element in the array is taken as the pathname of the program
2122to execute.  The other members of the array form the argument vector to
2123be passed to the program, @dfn{including argument zero}.  This means
2124that the split string must have at least two elements.  The program is
2125directly executed by @i{Amd}, not via a shell.  This means that scripts
2126must begin with a @code{#!} interpreter specification.
2127
2128If a filesystem type is to be heavily used, it may be worthwhile adding
2129a new filesystem type into @i{Amd}, but for most uses the program
2130filesystem should suffice.
2131
2132When the program is run, standard input and standard error are inherited
2133from the current values used by @i{Amd}.  Standard output is a
2134duplicate of standard error.  The value specified with the ``-l''
2135command line option has no effect on standard error.
2136
2137@node     Symbolic Link Filesystem, Automount Filesystem, Program Filesystem, Filesystem Types
2138@comment  node-name,  next,  previous,  up
2139@section Symbolic Link Filesystem (@samp{type:=link})
2140@cindex Symbolic link filesystem
2141@cindex Referencing part of the local name space
2142@cindex Mounting part of the local name space
2143@cindex How to reference part of the local name space
2144@cindex link, filesystem type
2145@cindex symlink, link filesystem type
2146@cindex Filesystem type; link
2147
2148Each filesystem type creates a symbolic link to point from the volume
2149name to the physical mount point.  The @samp{link} filesystem does the
2150same without any other side effects.  This allows any part of the
2151machines name space to be accessed via @i{Amd}.
2152
2153One common use for the symlink filesystem is @file{/homes} which can be
2154made to contain an entry for each user which points to their
2155(auto-mounted) home directory.  Although this may seem rather expensive,
2156it provides a great deal of administrative flexibility.
2157
2158@noindent
2159The following option must be defined:
2160
2161@table @code
2162@item fs
2163The value of @var{fs} option specifies the destination of the link, as
2164modified by the @var{sublink} option.  If @var{sublink} is non-null, it
2165is appended to @code{$@{fs@}}@code{/} and the resulting string is used
2166as the target.
2167@end table
2168
2169The @samp{link} filesystem can be though of as identical to the
2170@samp{ufs} filesystem but without actually mounting anything.
2171
2172An example entry might be:
2173
2174@example
2175jsp   host==charm;type:=link;fs:=/home/charm;sublink:=jsp
2176@end example
2177which would return a symbolic link pointing to @file{/home/charm/jsp}.
2178
2179@node     Automount Filesystem, Direct Automount Filesystem, Symbolic Link Filesystem, Filesystem Types
2180@comment  node-name,  next,  previous,  up
2181@section Automount Filesystem (@samp{type:=auto})
2182@cindex Automount filesystem
2183@cindex Map cache types
2184@cindex Setting map cache parameters
2185@cindex How to set map cache parameters
2186@cindex How to start an indirect automount point
2187@cindex auto, filesystem type
2188@cindex Filesystem type; auto
2189@cindex SIGHUP signal
2190@cindex Map cache synchronising
2191@cindex Synchronising the map cache
2192@cindex Map cache options
2193@cindex Regular expressions in maps
2194
2195The @dfn{auto} filesystem type creates a new automount point below an
2196existing automount point.  Top-level automount points appear as system
2197mount points.  An automount mount point can also appear as a
2198sub-directory of an existing automount point.  This allows some
2199additional structure to be added, for example to mimic the mount tree of
2200another machine.
2201
2202The following options may be specified:
2203
2204@table @code
2205@cindex cache, mount option
2206@cindex Mount option; cache
2207@item cache
2208specifies whether the data in this mount-map should be
2209cached.  The default value is @samp{none}, in which case
2210no caching is done in order to conserve memory.
2211However, better performance and reliability can be obtained by caching
2212some or all of a mount-map.
2213
2214If the cache option specifies @samp{all},
2215the entire map is enumerated when the mount point is created.
2216
2217If the cache option specifies @samp{inc}, caching is done incrementally
2218as and when data is required.
2219Some map types do not support cache mode @samp{all}, in which case @samp{inc}
2220is used whenever @samp{all} is requested.
2221
2222Caching can be entirely disabled by using cache mode @samp{none}.
2223
2224If the cache option specifies @samp{regexp} then the entire map will be
2225enumerated and each key will be treated as an egrep-style regular
2226expression.  The order in which a cached map is searched does not
2227correspond to the ordering in the source map so the regular expressions
2228should be mutually exclusive to avoid confusion.
2229
2230Each mount map type has a default cache type, usually @samp{inc}, which
2231can be selected by specifying @samp{mapdefault}.
2232
2233The cache mode for a mount map can only be selected on the command line.
2234Starting @i{Amd} with the command:
2235
2236@example
2237amd /homes hesiod.homes -cache:=inc
2238@end example
2239
2240will cause @samp{/homes} to be automounted using the @dfn{Hesiod} name
2241server with local incremental caching of all succesfully resolved names.
2242
2243All cached data is forgotten whenever @i{Amd} receives a @samp{SIGHUP}
2244signal and, if cache @samp{all} mode was selected, the cache will be
2245reloaded.  This can be used to inform @i{Amd} that a map has been
2246updated.  In addition, whenever a cache lookup fails and @i{Amd} needs
2247to examine a map, the map's modify time is examined.  If the cache is
2248out of date with respect to the map then it is flushed as if a
2249@samp{SIGHUP} had been received.
2250
2251An additional option (@samp{sync}) may be specified to force @i{Amd} to
2252check the map's modify time whenever a cached entry is being used.  For
2253example, an incremental, synchronised cache would be created by the
2254following command:
2255
2256@example
2257amd /homes hesiod.homes -cache:=inc,sync
2258@end example
2259
2260@item fs
2261specifies the name of the mount map to use for the new mount point.
2262
2263Arguably this should have been specified with the @code{$@{rfs@}} option but
2264we are now stuck with it due to historical accident.
2265
2266@c %If the string @samp{.} is used then the same map is used;
2267@c %in addition the lookup prefix is set to the name of the mount point followed
2268@c %by a slash @samp{/}.
2269@c %This is the same as specifying @samp{fs:=\$\{map\};pref:=\$\{key\}/}.
2270@c
2271
2272@item pref
2273alters the name that is looked up in the mount map.  If
2274@code{$@{pref@}}, the @dfn{prefix}, is non-null then it is prepended to
2275the name requested by the kernel @dfn{before} the map is searched.
2276@end table
2277
2278The server @samp{dylan.doc.ic.ac.uk} has two user disks:
2279@samp{/dev/dsk/2s0} and @samp{/dev/dsk/5s0}.  These are accessed as
2280@samp{/home/dylan/dk2} and @samp{/home/dylan/dk5} respectively.  Since
2281@samp{/home} is already an automount point, this naming is achieved with
2282the following map entries:@refill
2283
2284@example
2285dylan        type:=auto;fs:=$@{map@};pref:=$@{key@}/
2286dylan/dk2    type:=ufs;dev:=/dev/dsk/2s0
2287dylan/dk5    type:=ufs;dev:=/dev/dsk/5s0
2288@end example
2289
2290@node     Direct Automount Filesystem, Union Filesystem, Automount Filesystem, Filesystem Types
2291@comment  node-name,  next,  previous,  up
2292@section Direct Automount Filesystem (@samp{type:=direct})
2293@cindex Direct automount filesystem
2294@cindex How to start a direct automount point
2295@cindex direct, filesystem type
2296@cindex Filesystem type; direct
2297
2298The @dfn{direct} filesystem is almost identical to the automount
2299filesystem.  Instead of appearing to be a directory of mount points, it
2300appears as a symbolic link to a mounted filesystem.  The mount is done
2301at the time the link is accessed.  @xref{Automount Filesystem} for a
2302list of required options.
2303
2304Direct automount points are created by specifying the @samp{direct}
2305filesystem type on the command line:
2306
2307@example
2308amd ... /usr/man auto.direct -type:=direct
2309@end example
2310
2311where @samp{auto.direct} would contain an entry such as:
2312
2313@example
2314usr/man    -type:=nfs;rfs:=/usr/man \
2315           rhost:=man-server1  rhost:=man-server2
2316@end example
2317
2318In this example, @samp{man-server1} and @samp{man-server2} are file
2319servers which export copies of the manual pages.  Note that the key
2320which is looked up is the name of the automount point without the
2321leading @samp{/}.
2322
2323@node     Union Filesystem, Error Filesystem, Direct Automount Filesystem, Filesystem Types
2324@comment  node-name,  next,  previous,  up
2325@section Union Filesystem (@samp{type:=union})
2326@cindex Union filesystem
2327@cindex union, filesystem type
2328@cindex Filesystem type; union
2329
2330The @dfn{union} filesystem type allows the contents of several
2331directories to be merged and made visible in a single directory.  This
2332can be used to overcome one of the major limitations of the Unix mount
2333mechanism which only allows complete directories to be mounted.
2334
2335For example, supposing @file{/tmp} and @file{/var/tmp} were to be merged
2336into a new directory called @file{/mtmp}, with files in @file{/var/tmp}
2337taking precedence.  The following command could be used to achieve this
2338effect:
2339
2340@example
2341amd ... /mtmp union:/tmp:/var/tmp -type:=union
2342@end example
2343
2344Currently, the unioned directories must @emph{not} be automounted.  That
2345would cause a deadlock.  This seriously limits the current usefulness of
2346this filesystem type and the problem will be addressed in a future
2347release of @i{Amd}.
2348
2349Files created in the union directory are actually created in the last
2350named directory.  This is done by creating a wildcard entry which points
2351to the correct directory.  The wildcard entry is visible if the union
2352directory is listed, so allowing you to see which directory has
2353priority.
2354
2355The files visible in the union directory are computed at the time
2356@i{Amd} is started, and are not kept uptodate with respect to the
2357underlying directories.  Similarly, if a link is removed, for example
2358with the @samp{rm} command, it will be lost forever.
2359
2360@node     Error Filesystem, Top-level Filesystem, Direct Automount Filesystem, Filesystem Types
2361@comment  node-name,  next,  previous,  up
2362@section Error Filesystem (@samp{type:=error})
2363@cindex Error filesystem
2364@cindex error, filesystem type
2365@cindex Filesystem type; error
2366
2367The @dfn{error} filesystem type is used internally as a catch-all in
2368the case where none of the other filesystems was selected, or some other
2369error occurred.
2370Lookups and mounts always fail with ``No such file or directory''.
2371All other operations trivially succeed.
2372
2373The error filesystem is not directly accessible.
2374
2375@node     Top-level Filesystem, Root Filesystem, Error Filesystem, Filesystem Types
2376@comment  node-name,  next,  previous,  up
2377@section Top-level Filesystem (@samp{type:=toplvl})
2378@cindex Top level filesystem
2379@cindex toplvl, filesystem type
2380@cindex Filesystem type; toplvl
2381
2382The @dfn{toplvl} filesystems is derived from the @samp{auto} filesystem
2383and is used to mount the top-level automount nodes.  Requests of this
2384type are automatically generated from the command line arguments and
2385can also be passed in by using the ``-M'' option of the @dfn{Amq} command.
2386
2387@node     Root Filesystem, Inheritance Filesystem, Top-level Filesystem, Filesystem Types
2388@comment  node-name,  next,  previous,  up
2389@section Root Filesystem
2390@cindex Root filesystem
2391@cindex root, filesystem type
2392@cindex Filesystem type; root
2393
2394The @dfn{root} (@samp{type:=root}) filesystem type acts as an internal
2395placeholder onto which @i{Amd} can pin @samp{toplvl} mounts.  Only one
2396node of this type need ever exist and one is created automatically
2397during startup.  The effect of creating a second root node is undefined.
2398
2399@node     Inheritance Filesystem, , Root Filesystem, Filesystem Types
2400@comment  node-name,  next,  previous,  up
2401@section Inheritance Filesystem
2402@cindex Inheritance filesystem
2403@cindex Nodes generated on a restart
2404@cindex inherit, filesystem type
2405@cindex Filesystem type; inherit
2406
2407The @dfn{inheritance} (@samp{type:=inherit}) filesystem is not directly
2408accessible.  Instead, internal mount nodes of this type are
2409automatically generated when @i{Amd} is started with the ``-r'' option.
2410At this time the system mount table is scanned to locate any filesystems
2411which are already mounted.  If any reference to these filesystems is
2412made through @i{Amd} then instead of attempting to mount it, @i{Amd}
2413simulates the mount and @dfn{inherits} the filesystem.  This allows a
2414new version of @i{Amd} to be installed on a live system simply by
2415killing the old daemon with @code{SIGTERM} and starting the new one.@refill
2416
2417This filesystem type is not generally visible externally, but it is
2418possible that the output from @samp{amq -m} may list @samp{inherit} as
2419the filesystem type.  This happens when an inherit operation cannot
2420be completed for some reason, usually because a fileserver is down.
2421
2422@node     Run-time Administration, Examples, Filesystem Types, Top
2423@comment  node-name,  next,  previous,  up
2424@chapter Run-time Administration
2425@cindex Run-time administration
2426@cindex Amq command
2427
2428@menu
2429* Starting Amd::
2430* Stopping Amd::
2431* Controlling Amd::
2432@end menu
2433
2434@node     Starting Amd, Stopping Amd, Run-time Administration, Run-time Administration
2435@comment  node-name,  next,  previous,  up
2436@section Starting @i{Amd}
2437@cindex Starting Amd
2438@cindex Additions to /etc/rc.local
2439@cindex /etc/rc.local additions
2440@cindex /etc/amd.start
2441
2442@i{Amd} is best started from @samp{/etc/rc.local}:
2443
2444@example
2445if [ -f /etc/amd.start ]; then
2446        sh /etc/amd.start; (echo -n ' amd')      >/dev/console
2447fi
2448@end example
2449
2450@noindent
2451The shell script, @samp{amd.start}, contains:
2452
2453@example
2454#!/bin/sh -
2455PATH=/etc:/bin:/usr/bin:/usr/ucb:$PATH export PATH
2456
2457#
2458# Either name of logfile or "syslog"
2459#
2460LOGFILE=syslog
2461#LOGFILE=/var/log/amd
2462
2463#
2464# Figure out whether domain name is in host name
2465# If the hostname is just the machine name then
2466# pass in the name of the local domain so that the
2467# hostnames in the map are domain stripped correctly.
2468#
2469case `hostname` in
2470*.*) dmn= ;;
2471*) dmn='-d doc.ic.ac.uk'
2472esac
2473
2474#
2475# Zap earlier log file
2476#
2477case "$LOGFILE" in
2478*/*)
2479        mv "$LOGFILE" "$LOGFILE"-
2480        > "$LOGFILE"
2481        ;;
2482syslog)
2483        : nothing
2484        ;;
2485esac
2486
2487cd /usr/sbin
2488#
2489# -r            restart
2490# -d dmn        local domain
2491# -w wait       wait between unmount attempts
2492# -l log        logfile or "syslog"
2493#
2494eval ./amd -r $dmn -w 240 -l "$LOGFILE" \
2495        /homes amd.homes -cache:=inc \
2496        /home amd.home -cache:=inc \
2497        /vol amd.vol -cache:=inc \
2498        /n amd.net -cache:=inc
2499@end example
2500
2501If the list of automount points and maps is contained in a file or NIS map
2502it is easily incorporated onto the command line:
2503
2504@example
2505...
2506eval ./amd -r $dmn -w 240 -l "$LOGFILE" `ypcat -k auto.master`
2507@end example
2508
2509@node     Stopping Amd, Controlling Amd, Starting Amd, Run-time Administration
2510@comment  node-name,  next,  previous,  up
2511@section Stopping @i{Amd}
2512@cindex Stopping Amd
2513@cindex SIGTERM signal
2514@cindex SIGINT signal
2515
2516@i{Amd} stops in response to two signals.
2517
2518@table @samp
2519@item SIGTERM
2520causes the top-level automount points to be unmounted and then @i{Amd}
2521to exit.  Any automounted filesystems are left mounted.  They can be
2522recovered by restarting @i{Amd} with the ``-r'' command line option.@refill
2523
2524@item SIGINT
2525causes @i{Amd} to attempt to unmount any filesystems which it has
2526automounted, in addition to the actions of @samp{SIGTERM}.  This signal
2527is primarly used for debugging.@refill
2528@end table
2529
2530Actions taken for other signals are undefined.
2531
2532@node     Controlling Amd, Run-time Administration, Stopping Amd, Run-time Administration
2533@comment  node-name,  next,  previous,  up
2534@section Controlling @i{Amd}
2535@cindex Controlling Amd
2536@cindex Discovering what is going on at run-time
2537@cindex Listing currently mounted filesystems
2538
2539It is sometimes desirable or necessary to exercise external control
2540over some of @i{Amd}'s internal state.  To support this requirement,
2541@i{Amd} implements an RPC interface which is used by the @dfn{Amq} program.
2542A variety of information is available.
2543
2544@i{Amq} generally applies an operation, specified by a single letter option,
2545to a list of mount points.  The default operation is to obtain statistics
2546about each mount point.  This is similar to the output shown above
2547but includes information about the number and type of accesses to each
2548mount point.
2549
2550@menu
2551* Amq default::    Default command behaviour.
2552* Amq -f option::  Flusing the map cache.
2553* Amq -h option::  Controlling a non-local host.
2554* Amq -m option::  Obtaining mount statistics.
2555* Amq -M-option::  Mounting a volume.
2556* Amq -s option::  Obtaining global statistics.
2557* Amq -u option::  Forcing volumes to time out.
2558* Amq -v option::  Version information.
2559@end menu
2560
2561@node     Amq default, Amq -f option, Controlling Amd, Controlling Amd
2562@comment  node-name,  next,  previous,  up
2563@subsection @i{Amq} default information
2564
2565With no arguments, @dfn{Amq} obtains a brief list of all existing
2566mounts created by @i{Amd}.  This is different from the list displayed by
2567@b{df}(1) since the latter only includes system mount points.
2568
2569@noindent
2570The output from this option includes the following information:
2571
2572@itemize @bullet
2573@item
2574the automount point,
2575@item
2576the filesystem type,
2577@item
2578the mount map or mount information,
2579@item
2580the internal, or system mount point.
2581@end itemize
2582
2583@noindent
2584For example:
2585
2586@example
2587/            root   "root"                    sky:(pid75)
2588/homes       toplvl /usr/local/etc/amd.homes  /homes
2589/home        toplvl /usr/local/etc/amd.home   /home
2590/homes/jsp   nfs    charm:/home/charm         /a/charm/home/charm/jsp
2591/homes/phjk  nfs    toytown:/home/toytown     /a/toytown/home/toytown/ai/phjk
2592@end example
2593
2594@noindent
2595If an argument is given then statistics for that volume name will
2596be output.  For example:
2597
2598@example
2599What            Uid   Getattr Lookup RdDir   RdLnk   Statfs Mounted@@
2600/homes          0     1196    512    22      0       30     90/09/14 12:32:55
2601/homes/jsp      0     0       0      0       1180    0      90/10/13 12:56:58
2602@end example
2603
2604@table @code
2605@item What
2606the volume name.
2607
2608@item Uid
2609ignored.
2610
2611@item Getattr
2612the count of NFS @dfn{getattr} requests on this node.  This should only be
2613non-zero for directory nodes.
2614
2615@item Lookup
2616the count of NFS @dfn{lookup} requests on this node.  This should only be
2617non-zero for directory nodes.
2618
2619@item RdDir
2620the count of NFS @dfn{readdir} requests on this node.  This should only
2621be non-zero for directory nodes.
2622
2623@item RdLnk
2624the count of NFS @dfn{readlink} requests on this node.  This should be
2625zero for directory nodes.
2626
2627@item Statfs
2628the could of NFS @dfn{statfs} requests on this node.  This should only
2629be non-zero for top-level automount points.
2630
2631@item Mounted@@
2632the date and time the volume name was first referenced.
2633@end table
2634
2635@node     Amq -f option, Amq -h option, Amq default, Controlling Amd
2636@comment  node-name,  next,  previous,  up
2637@subsection @i{Amq} -f option
2638@cindex Flushing the map cache
2639@cindex Map cache, flushing
2640
2641The ``-f'' option causes @i{Amd} to flush the internal mount map cache.
2642This is useful for Hesiod maps since @i{Amd} will not automatically
2643notice when they have been updated.  The map cache can also be
2644synchronised with the map source by using the @samp{sync} option
2645(@pxref{Automount Filesystem}).@refill
2646
2647@node     Amq -h option, Amq -m option, Amq -f option, Controlling Amd
2648@comment  node-name,  next,  previous,  up
2649@subsection @i{Amq} -h option
2650@cindex Querying an alternate host
2651
2652By default the local host is used.  In an HP-UX cluster the root server
2653is used since that is the only place in the cluster where @i{Amd} will
2654be running.  To query @i{Amd} on another host the ``-h'' option should
2655be used.
2656
2657@node     Amq -m option, Amq -M-option, Amq -h option, Controlling Amd
2658@comment  node-name,  next,  previous,  up
2659@subsection @i{Amq} -m option
2660
2661The ``-m'' option displays similar information about mounted
2662filesystems, rather than automount points.  The output includes the
2663following information:
2664
2665@itemize @bullet
2666@item
2667the mount information,
2668@item
2669the mount point,
2670@item
2671the filesystem type,
2672@item
2673the number of references to this filesystem,
2674@item
2675the server hostname,
2676@item
2677the state of the file server,
2678@item
2679any error which has occured.
2680@end itemize
2681
2682For example:
2683
2684@example
2685"root"           truth:(pid602)     root   1 localhost is up
2686hesiod.home      /home              toplvl 1 localhost is up
2687hesiod.vol       /vol               toplvl 1 localhost is up
2688hesiod.homes     /homes             toplvl 1 localhost is up
2689amy:/home/amy    /a/amy/home/amy    nfs    5 amy is up
2690swan:/home/swan  /a/swan/home/swan  nfs    0 swan is up (Permission denied)
2691ex:/home/ex      /a/ex/home/ex      nfs    0 ex is down
2692@end example
2693
2694When the reference count is zero the filesystem is not mounted but
2695the mount point and server information is still being maintained
2696by @i{Amd}.
2697
2698@node     Amq -M-option, Amq -s option, Amq -m option, Controlling Amd
2699@comment  node-name,  next,  previous,  up
2700@subsection @i{Amq} -M option
2701
2702The ``-M'' option passes a new map entry to @i{Amd} and waits for it to
2703be evaluated, possibly causing a mount.  For example, the following
2704command would cause @samp{/home/toytown} on host @samp{toytown} to be
2705mounted locally on @samp{/mnt/toytown}.
2706
2707@example
2708amq -M '/mnt/toytown type:=nfs;rfs:=/home/toytown;rhost:=toytown;fs:=$@{key@}'
2709@end example
2710
2711@i{Amd} applies some simple security checks before allowing this
2712operation.  The check tests whether the incoming request is from a
2713privileged UDP port on the local machine.  ``Permission denied'' is
2714returned if the check fails.
2715
2716A future release of @i{Amd} will include code to allow the @b{mount}(8)
2717command to mount automount points:
2718
2719@example
2720mount -t amd /vol hesiod.vol
2721@end example
2722
2723This will then allow @i{Amd} to be controlled from the standard system
2724filesystem mount list.
2725
2726@node     Amq -s option, Amq -u option, Amq -M-option, Controlling Amd
2727@comment  node-name,  next,  previous,  up
2728@subsection @i{Amq} -s option
2729@cindex Global statistics
2730@cindex Statistics
2731
2732The ``-s'' option displays global statistics.  If any other options are specified
2733or any filesystems named then this option is ignored.  For example:
2734
2735@example
2736requests  stale     mount     mount     unmount
2737deferred  fhandles  ok        failed    failed
27381054      1         487       290       7017
2739@end example
2740
2741@table @samp
2742@item Deferred requests
2743are those for which an immediate reply could not be constructed.  For
2744example, this would happen if a background mount was required.
2745
2746@item Stale filehandles
2747counts the number of times the kernel passes a stale filehandle to @i{Amd}.
2748Large numbers indicate problems.
2749
2750@item Mount ok
2751counts the number of automounts which were successful.
2752
2753@item Mount failed
2754counts the number of automounts which failed.
2755
2756@item Unmount failed
2757counts the number of times a filesystem could not be unmounted.  Very
2758large numbers here indicate that the time between unmount attempts
2759should be increased.
2760@end table
2761
2762@node     Amq -u option, Amq -v option, Amq -s option, Controlling Amd
2763@comment  node-name,  next,  previous,  up
2764@subsection @i{Amq} -u option
2765@cindex Forcing filesystem to time out
2766@cindex Unmounting a filesystem
2767
2768The ``-u'' option causes the time-to-live interval of the named mount
2769points to be expired, thus causing an unmount attempt.  This is the only
2770safe way to unmount an automounted filesystem.  It is not possible to
2771unmount a filesystem which has been mounted with the @samp{nounmount}
2772flag.
2773
2774@c The ``-H'' option informs @i{Amd} that the specified mount point has hung -
2775@c as if its keepalive timer had expired.
2776
2777@node     Amq -v option, Other Amq options, Amq -u option, Controlling Amd
2778@comment  node-name,  next,  previous,  up
2779@subsection @i{Amq} -v option
2780@cindex Version information at run-time
2781
2782The ``-v'' option displays the version of @i{Amd} in a similar way to
2783@i{Amd}'s ``-v'' option.
2784
2785@node     Other Amq options, Controlling Amd, Amq -v option, Controlling Amd
2786@comment  node-name,  next,  previous,  up
2787@subsection Other @i{Amq} options
2788
2789Three other operations are implemented.  These modify the state of
2790@i{Amd} as a whole, rather than any particular filesystem.  The ``-l'',
2791``-x'' and ``-D'' options have exactly the same effect as @i{Amd}'s
2792corresponding command line options.  The ``-l'' option is rejected by
2793@i{Amd} in the current version for obvious security reasons.  When
2794@i{Amd} receives a ``-x''flag it limits the log options being modified
2795to those which were not enabled at startup.  This prevents a user
2796turning @emph{off} any logging option which was specified at startup,
2797though any which have been turned off since then can still be turned
2798off.  The ``-D'' option has a similar behaviour.
2799
2800@node     FSinfo, Examples, Run-time Administration, Top
2801@comment  node-name,  next,  previous,  up
2802@chapter FSinfo
2803@cindex FSinfo
2804@cindex Filesystem info package
2805
2806@menu
2807* FSinfo Overview::                 Introduction to FSinfo.
2808* Using FSinfo::                    Basic concepts.
2809* FSinfo Grammar::                  Language syntax, semantics and examples.
2810* FSinfo host definitions::         Defining a new host.
2811* FSinfo host attributes::          Definable host attributes.
2812* FSinfo filesystems::              Defining locally attached filesystems.
2813* FSinfo static mounts::            Defining additional static mounts.
2814* FSinfo automount definitions::
2815* FSinfo command line options::
2816* FSinfo errors::
2817@end menu
2818
2819@node     FSinfo Overview, Using FSinfo, FSinfo, FSinfo
2820@comment  node-name,  next,  previous,  up
2821@section @i{FSinfo} overview
2822@cindex FSinfo overview
2823
2824@i{FSinfo} is a filesystem management tool.  It has been designed to
2825work with @i{Amd} to help system administrators keep track of the ever
2826increasing filesystem namespace under their control.
2827
2828The purpose of @i{FSinfo} is to generate all the important standard
2829filesystem data files from a single set of input data.  Starting with a
2830single data source guarantees that all the generated files are
2831self-consistent.  One of the possible output data formats is a set of
2832@i{Amd} maps which can be used amongst the set of hosts described in the
2833input data.
2834
2835@i{FSinfo} implements a declarative language.  This language is
2836specifically designed for describing filesystem namespace and physical
2837layouts.  The basic declaration defines a mounted filesystem including
2838its device name, mount point, and all the volumes and access
2839permissions.  @i{FSinfo} reads this information and builds an internal
2840map of the entire network of hosts.  Using this map, many different data
2841formats can be produced including @file{/etc/fstab},
2842@file{/etc/exports}, @i{Amd} mount maps and
2843@file{/etc/bootparams}.@refill
2844
2845@node     Using FSinfo, FSinfo Grammar, FSinfo Overview, FSinfo
2846@comment  node-name,  next,  previous,  up
2847@section Using @i{FSinfo}
2848@cindex Using FSinfo
2849
2850The basic strategy when using @i{FSinfo} is to gather all the
2851information about all disks on all machines into one set of
2852declarations.  For each machine being managed, the following data is
2853required:
2854
2855@itemize @bullet
2856@item
2857Hostname
2858@item
2859List of all filesystems and, optionally, their mount points.
2860@item
2861Names of volumes stored on each filesystem.
2862@item
2863NFS export information for each volume.
2864@item
2865The list of static filesystem mounts.
2866@end itemize
2867
2868The following information can also be entered into the same
2869configuration files so that all data can be kept in one place.
2870
2871@itemize @bullet
2872@item
2873List of network interfaces
2874@item
2875IP address of each interface
2876@item
2877Hardware address of each interface
2878@item
2879Dumpset to which each filesystem belongs
2880@item
2881and more @dots{}
2882@end itemize
2883
2884To generate @i{Amd} mount maps, the automount tree must also be defined
2885(@pxref{FSinfo automount definitions}).  This will have been designed at
2886the time the volume names were allocated.  Some volume names will not be
2887automounted, so @i{FSinfo} needs an explicit list of which volumes
2888should be automounted.@refill
2889
2890Hostnames are required at several places in the @i{FSinfo} language.  It
2891is important to stick to either fully qualified names or unqualified
2892names.  Using a mixture of the two will inevitably result in confusion.
2893
2894Sometimes volumes need to be referenced which are not defined in the set
2895of hosts being managed with @i{FSinfo}.  The required action is to add a
2896dummy set of definitions for the host and volume names required.  Since
2897the files generated for those particular hosts will not be used on them,
2898the exact values used is not critical.
2899
2900@node     FSinfo Grammar, FSinfo, Using FSinfo, FSinfo
2901@comment  node-name,  next,  previous,  up
2902@section @i{FSinfo} grammar
2903@cindex FSinfo grammar
2904@cindex Grammar, FSinfo
2905
2906@i{FSinfo} has a relatively simple grammar.  Distinct syntactic
2907constructs exist for each of the different types of data, though they
2908share a common flavour.  Several conventions are used in the grammar
2909fragments below.
2910
2911The notation, @i{list(}@t{xxx}@i{)}, indicates a list of zero or more
2912@t{xxx}'s.  The notation, @i{opt(}@t{xxx}@i{)}, indicates zero or one
2913@t{xxx}.  Items in double quotes, @i{eg} @t{"host"}, represent input
2914tokens.  Items in angle brackets, @i{eg} @var{<hostname>}, represent
2915strings in the input.  Strings need not be in double quotes, except to
2916differentiate them from reserved words.  Quoted strings may include the
2917usual set of C ``@t{\}'' escape sequences with one exception: a
2918backslash-newline-whitespace sequence is squashed into a single space
2919character.  To defeat this feature, put a further backslash at the start
2920of the second line.
2921
2922At the outermost level of the grammar, the input consists of a
2923sequence of host and automount declarations.  These declarations are
2924all parsed before they are analyzed.  This means they can appear in
2925any order and cyclic host references are possible.
2926
2927@example
2928fsinfo      : @i{list(}fsinfo_attr@i{)} ;
2929
2930fsinfo_attr : host | automount ;
2931@end example
2932
2933@menu
2934* FSinfo host definitions::
2935* FSinfo automount definitions::
2936@end menu
2937
2938@node FSinfo host definitions, FSinfo host attributes, FSinfo grammar, FSinfo
2939@comment  node-name,  next,  previous,  up
2940@section @i{FSinfo} host definitions
2941@cindex FSinfo host definitions
2942@cindex Defining a host, FSinfo
2943
2944A host declaration consists of three parts: a set of machine attribute
2945data, a list of filesystems physically attached to the machine, and a
2946list of additional statically mounted filesystems.
2947
2948@example
2949host        : "host" host_data @i{list(}filesystem@i{@i{)}} @i{list(}mount@i{@i{)}} ;
2950@end example
2951
2952Each host must be declared in this way exactly once.  Such things as the
2953hardware address, the architecture and operating system types and the
2954cluster name are all specified within the @dfn{host data}.
2955
2956All the disks the machine has should then be described in the @dfn{list
2957of filesystems}.  When describing disks, you can specify what
2958@dfn{volname} the disk/partition should have and all such entries are
2959built up into a dictionary which can then be used for building the
2960automounter maps.
2961
2962The @dfn{list of mounts} specifies all the filesystems that should be
2963statically mounted on the machine.
2964
2965@menu
2966* FSinfo host attributes::
2967* FSinfo filesystems::
2968* FSinfo static mounts::
2969@end menu
2970
2971@node FSinfo host attributes, FSinfo filesystems, FSinfo host definitions , FSinfo host definitions
2972@comment  node-name,  next,  previous,  up
2973@section @i{FSinfo} host attributes
2974@cindex FSinfo host attributes
2975@cindex Defining host attributes, FSinfo
2976
2977The host data, @dfn{host_data}, always includes the @dfn{hostname}.  In
2978addition, several other host attributes can be given.
2979
2980@example
2981host_data   : @var{<hostname>}
2982            | "@{" @i{list(}host_attrs@i{)} "@}" @var{<hostname>}
2983            ;
2984
2985host_attrs  : host_attr "=" @var{<string>}
2986            | netif
2987            ;
2988
2989host_attr   : "config"
2990            | "arch"
2991            | "os"
2992            | "cluster"
2993            ;
2994@end example
2995
2996The @dfn{hostname} is, typically, the fully qualified hostname of the
2997machine.
2998
2999Examples:
3000
3001@example
3002host dylan.doc.ic.ac.uk
3003
3004host @{
3005    os = hpux
3006    arch = hp300
3007@} dougal.doc.ic.ac.uk
3008@end example
3009
3010The options that can be given as host attributes are shown below.
3011
3012@menu
3013* netif Option:		FSinfo host netif:
3014* arch Option:		FSinfo host arch:
3015* os Option:		FSinfo host os:
3016* cluster Option:	FSinfo host cluster:
3017@end menu
3018
3019@node FSinfo host netif, FSinfo host arch, , FSinfo host attributes
3020@comment  node-name,  next,  previous,  up
3021@subsection netif Option
3022
3023This defines the set of network interfaces configured on the machine.
3024The interface attributes collected by @i{FSinfo} are the IP address,
3025subnet mask and hardware address.  Multiple interfaces may be defined
3026for hosts with several interfaces by an entry for each interface.  The
3027values given are sanity checked, but are currently unused for anything
3028else.
3029
3030@example
3031netif       : "netif" @var{<string>} "@{" @i{list(}netif_attrs@i{)} "@}" ;
3032
3033netif_attrs : netif_attr "=" @var{<string>} ;
3034
3035netif_attr  : "inaddr" | "netmask" | "hwaddr" ;
3036@end example
3037
3038Examples:
3039
3040@example
3041netif ie0 @{
3042    inaddr  = 129.31.81.37
3043    netmask = 0xfffffe00
3044    hwaddr  = "08:00:20:01:a6:a5"
3045@}
3046
3047netif ec0 @{ @}
3048@end example
3049
3050@node FSinfo host config, FSinfo host arch, FSinfo host netif, FSinfo host attributes
3051@comment  node-name,  next,  previous,  up
3052@subsection config Option
3053@cindex FSinfo config host attribute
3054@cindex config, FSinfo host attribute
3055
3056This option allows you to specify configuration variables for the
3057startup scripts (@file{rc} scripts).  A simple string should immediately
3058follow the keyword.
3059
3060Example:
3061
3062@example
3063config "NFS_SERVER=true"
3064config "ZEPHYR=true"
3065@end example
3066
3067This option is currently unsupported.
3068
3069@node FSinfo host arch, FSinfo host os, FSinfo host config, FSinfo host attributes
3070@comment  node-name,  next,  previous,  up
3071@subsection arch Option
3072@cindex FSinfo arch host attribute
3073@cindex arch, FSinfo host attribute
3074
3075This defines the architecture of the machine.  For example:
3076
3077@example
3078arch = hp300
3079@end example
3080
3081This is intended to be of use when building architecture specific
3082mountmaps, however, the option is currently unsupported.
3083
3084@node FSinfo host os, FSinfo host cluster, FSinfo host arch, FSinfo host attributes
3085@comment  node-name,  next,  previous,  up
3086@subsection os Option
3087@cindex FSinfo os host attribute
3088@cindex os, FSinfo host attribute
3089
3090This defines the operating system type of the host.  For example:
3091
3092@example
3093os = hpux
3094@end example
3095
3096This information is used when creating the @file{fstab} files, for
3097example in choosing which format to use for the @file{fstab} entries
3098within the file.
3099
3100@node FSinfo host cluster, , FSinfo host os, FSinfo host attributes
3101@comment  node-name,  next,  previous,  up
3102@subsection cluster Option
3103@cindex FSinfo cluster host attribute
3104@cindex cluster, FSinfo host attribute
3105
3106This is used for specifying in which cluster the machine belongs.  For
3107example:
3108
3109@example
3110cluster = "theory"
3111@end example
3112
3113The cluster is intended to be used when generating the automount maps,
3114although it is currently unsupported.
3115
3116@node FSinfo filesystems, FSinfo static mounts, FSinfo host attributes, FSinfo host definitions
3117@comment  node-name,  next,  previous,  up
3118@section @i{FSinfo} filesystems
3119@cindex FSinfo filesystems
3120
3121The list of physically attached filesystems follows the machine
3122attributes.  These should define all the filesystems available from this
3123machine, whether exported or not.  In addition to the device name,
3124filesystems have several attributes, such as filesystem type, mount
3125options, and @samp{fsck} pass number which are needed to generate
3126@file{fstab} entries.
3127
3128@example
3129filesystem  : "fs" @var{<device>} "@{" @i{list(}fs_data@i{)} "@}" ;
3130
3131fs_data     : fs_data_attr "=" @var{<string>}
3132            | mount
3133            ;
3134
3135fs_data_attr
3136            : "fstype" | "opts" | "passno"
3137            | "freq" | "dumpset" | "log"
3138            ;
3139@end example
3140
3141Here, @var{<device>} is the device name of the disk (for example,
3142@file{/dev/dsk/2s0}).  The device name is used for building the mount
3143maps and for the @file{fstab} file.  The attributes that can be
3144specified are shown in the following section.
3145
3146The @i{FSinfo} configuration file for @code{dylan.doc.ic.ac.uk} is listed below.
3147
3148@example
3149host dylan.doc.ic.ac.uk
3150
3151fs /dev/dsk/0s0 {
3152	fstype = swap
3153}
3154
3155fs /dev/dsk/0s0 {
3156	fstype = hfs
3157	opts = rw,noquota,grpid
3158	passno = 0;
3159	freq = 1;
3160	mount / { }
3161}
3162
3163fs /dev/dsk/1s0 {
3164	fstype = hfs
3165	opts = defaults
3166	passno = 1;
3167	freq = 1;
3168	mount /usr {
3169		local {
3170			exportfs "dougal eden dylan zebedee brian"
3171			volname /nfs/hp300/local
3172		}
3173	}
3174}
3175
3176fs /dev/dsk/2s0 {
3177	fstype = hfs
3178	opts = defaults
3179	passno = 1;
3180	freq = 1;
3181	mount default {
3182		exportfs "toytown_clients hangers_on"
3183		volname /home/dylan/dk2
3184	}
3185}
3186
3187fs /dev/dsk/3s0 {
3188	fstype = hfs
3189	opts = defaults
3190	passno = 1;
3191	freq = 1;
3192	mount default {
3193		exportfs "toytown_clients hangers_on"
3194		volname /home/dylan/dk3
3195	}
3196}
3197
3198fs /dev/dsk/5s0 {
3199	fstype = hfs
3200	opts = defaults
3201	passno = 1;
3202	freq = 1;
3203	mount default {
3204		exportfs "toytown_clients hangers_on"
3205		volname /home/dylan/dk5
3206	}
3207}
3208@end example
3209
3210@menu
3211* fstype Option:	FSinfo filesystems fstype:
3212* opts Option:		FSinfo filesystems opts:
3213* passno Option:	FSinfo filesystems passno:
3214* freq Option:		FSinfo filesystems freq:
3215* mount Option:		FSinfo filesystems mount:
3216* dumpset Option:	FSinfo filesystems dumpset:
3217* log Option:		FSinfo filesystems log:
3218@end menu
3219
3220@node FSinfo filesystems fstype, FSinfo filesystems opts, , FSinfo filesystems
3221@comment  node-name,  next,  previous,  up
3222@subsection fstype Option
3223@cindex FSinfo fstype filesystems option
3224@cindex fstype, FSinfo filesystems option
3225@cindex export, FSinfo special fstype
3226
3227This specifies the type of filesystem being declared and will be placed
3228into the @file{fstab} file as is.  The value of this option will be
3229handed to @code{mount} as the filesystem type---it should have such
3230values as @code{4.2}, @code{nfs} or @code{swap}.  The value is not
3231examined for correctness.
3232
3233There is one special case.  If the filesystem type is specified as
3234@samp{export} then the filesystem information will not be added to the
3235host's @file{fstab} information, but it will still be visible on the
3236network.  This is useful for defining hosts which contain referenced
3237volumes but which are not under full control of @i{FSinfo}.
3238
3239Example:
3240
3241@example
3242fstype = swap
3243@end example
3244
3245@node FSinfo filesystems opts, FSinfo filesystems passno,FSinfo filesystems fstype, FSinfo filesystems
3246@comment  node-name,  next,  previous,  up
3247@subsection opts Option
3248@cindex FSinfo opts filesystems option
3249@cindex opts, FSinfo filesystems option
3250
3251This defines any options that should be given to @b{mount}(8) in the
3252@file{fstab} file.  For example:
3253
3254@example
3255opts = rw,nosuid,grpid
3256@end example
3257
3258@node FSinfo filesystems passno, FSinfo filesystems freq, FSinfo filesystems opts, FSinfo filesystems
3259@comment  node-name,  next,  previous,  up
3260@subsection passno Option
3261@cindex FSinfo passno filesystems option
3262@cindex passno, FSinfo filesystems option
3263
3264This defines the @b{fsck}(8) pass number in which to check the
3265filesystem.  This value will be placed into the @file{fstab} file.
3266
3267Example:
3268
3269@example
3270passno = 1
3271@end example
3272
3273@node FSinfo filesystems freq, FSinfo filesystems mount, FSinfo filesystems passno, FSinfo filesystems
3274@comment  node-name,  next,  previous,  up
3275@subsection freq Option
3276@cindex FSinfo freq filesystems option
3277@cindex freq, FSinfo filesystems option
3278
3279This defines the interval (in days) between dumps.  The value is placed
3280as is into the @file{fstab} file.
3281
3282Example:
3283
3284@example
3285freq = 3
3286@end example
3287
3288@node FSinfo filesystems mount, FSinfo filesystems dumpset, FSinfo filesystems freq, FSinfo filesystems
3289@comment  node-name,  next,  previous,  up
3290@subsection mount Option
3291@cindex FSinfo mount filesystems option
3292@cindex mount, FSinfo filesystems option
3293@cindex exportfs, FSinfo mount option
3294@cindex volname, FSinfo mount option
3295@cindex sel, FSinfo mount option
3296
3297This defines the mountpoint at which to place the filesystem.  If the
3298mountpoint of the filesystem is specified as @code{default}, then the
3299filesystem will be mounted in the automounter's tree under its volume
3300name and the mount will automatically be inherited by the automounter.
3301
3302Following the mountpoint, namespace information for the filesystem may
3303be described.  The options that can be given here are @code{exportfs},
3304@code{volname} and @code{sel}.
3305
3306The format is:
3307
3308@example
3309mount       : "mount" vol_tree ;
3310
3311vol_tree    : @i{list(}vol_tree_attr@i{)} ;
3312
3313vol_tree_attr
3314            :  @var{<string>} "@{" @i{list(}vol_tree_info@i{)} vol_tree "@}" ;
3315
3316vol_tree_info
3317            : "exportfs" @var{<export-data>}
3318            | "volname" @var{<volname>}
3319            | "sel" @var{<selector-list>}
3320            ;
3321@end example
3322
3323Example:
3324
3325@example
3326mount default @{
3327    exportfs "dylan dougal florence zebedee"
3328    volname /vol/andrew
3329@}
3330@end example
3331
3332In the above example, the filesystem currently being declared will have
3333an entry placed into the @file{exports} file allowing the filesystem to
3334be exported to the machines @code{dylan}, @code{dougal}, @code{florence}
3335and @code{zebedee}.  The volume name by which the filesystem will be
3336referred to remotely, is @file{/vol/andrew}.  By declaring the
3337mountpoint to be @code{default}, the filesystem will be mounted on the
3338local machine in the automounter tree, where @i{Amd} will automatically
3339inherit the mount as @file{/vol/andrew}.@refill
3340
3341@table @samp
3342@item exportfs
3343a string defining which machines the filesystem may be exported to.
3344This is copied, as is, into the @file{exports} file---no sanity checking
3345is performed on this string.@refill
3346
3347@item volname
3348a string which declares the remote name by which to reference the
3349filesystem.  The string is entered into a dictionary and allows you to
3350refer to this filesystem in other places by this volume name.@refill
3351
3352@item sel
3353a string which is placed into the automounter maps as a selector for the
3354filesystem.@refill
3355
3356@end table
3357
3358@node FSinfo filesystems dumpset, FSinfo filesystems log, FSinfo filesystems mount, FSinfo filesystems
3359@comment  node-name,  next,  previous,  up
3360@subsection dumpset Option
3361@cindex FSinfo dumpset filesystems option
3362@cindex dumpset, FSinfo filesystems option
3363
3364This provides support for Imperial College's local file backup tools and
3365is not documented further here.
3366
3367@node FSinfo filesystems log, , FSinfo filesystems dumpset, FSinfo filesystems
3368@comment  node-name,  next,  previous,  up
3369@subsection log Option
3370@cindex FSinfo log filesystems option
3371@cindex log, FSinfo filesystems option
3372
3373Specifies the log device for the current filesystem. This is ignored if
3374not required by the particular filesystem type.
3375
3376@node FSinfo static mounts, FSinfo automount definitions , FSinfo filesystems, FSinfo host definitions
3377@comment  node-name,  next,  previous,  up
3378@section @i{FSinfo} static mounts
3379@cindex FSinfo static mounts
3380@cindex Statically mounts filesystems, FSinfo
3381
3382Each host may also have a number of statically mounted filesystems.  For
3383example, the host may be a diskless workstation in which case it will
3384have no @code{fs} declarations.  In this case the @code{mount}
3385declaration is used to determine from where its filesystems will be
3386mounted.  In addition to being added to the @file{fstab} file, this
3387information can also be used to generate a suitable @file{bootparams}
3388file.@refill
3389
3390@example
3391mount       : "mount" @var{<volname>} @i{list(}localinfo@i{)} ;
3392
3393localinfo   : localinfo_attr @var{<string>} ;
3394
3395localinfo_attr
3396            : "as"
3397            | "from"
3398            | "fstype"
3399            | "opts"
3400            ;
3401@end example
3402
3403The filesystem specified to be mounted will be searched for in the
3404dictionary of volume names built when scanning the list of hosts'
3405definitions.
3406
3407The attributes have the following semantics:
3408@table @samp
3409@item from @var{machine}
3410mount the filesystem from the machine with the hostname of
3411@dfn{machine}.@refill
3412
3413@item as @var{mountpoint}
3414mount the filesystem locally as the name given, in case this is
3415different from the advertised volume name of the filesystem.
3416
3417@item opts @var{options}
3418native @b{mount}(8) options.
3419
3420@item fstype @var{type}
3421type of filesystem to be mounted.
3422@end table
3423
3424An example:
3425
3426@example
3427mount /export/exec/hp300/local as /usr/local
3428@end example
3429
3430If the mountpoint specified is either @file{/} or @file{swap}, the
3431machine will be considered to be booting off the net and this will be
3432noted for use in generating a @file{bootparams} file for the host which
3433owns the filesystems.
3434
3435@node FSinfo automount definitions, FSinfo Command Line Options, FSinfo static mounts, FSinfo
3436@comment  node-name,  next,  previous,  up
3437@section Defining an @i{Amd} Mount Map in @i{FSinfo}
3438@cindex FSinfo automount definitions
3439@cindex Defining an Amd mount map, FSinfo
3440
3441The maps used by @i{Amd} can be constructed from @i{FSinfo} by defining
3442all the automount trees.  @i{FSinfo} takes all the definitions found and
3443builds one map for each top level tree.
3444
3445The automount tree is usually defined last.  A single automount
3446configuration will usually apply to an entire management domain.  One
3447@code{automount} declaration is needed for each @i{Amd} automount point.
3448@i{FSinfo} determines whether the automount point is @dfn{direct}
3449(@pxref{Direct Automount Filesystem}) or @dfn{indirect}
3450(@pxref{Top-level Filesystem}).  Direct automount points are
3451distinguished by the fact that there is no underlying
3452@dfn{automount_tree}.@refill
3453
3454@example
3455automount   : "automount" opt(auto_opts@i{)} automount_tree ;
3456
3457auto_opts   : "opts" @var{<mount-options>} ;
3458
3459automount_tree
3460            : @i{list(}automount_attr@i{)}
3461            ;
3462
3463automount_attr
3464            : @var{<string>} "=" @var{<volname>}
3465            | @var{<string>} "->" @var{<symlink>}
3466            | @var{<string>} "@{" automount_tree "@}"
3467            ;
3468@end example
3469
3470If @var{<mount-options>} is given, then it is the string to be placed in
3471the maps for @i{Amd} for the @code{opts} option.
3472
3473A @dfn{map} is typically a tree of filesystems, for example @file{home}
3474normally contains a tree of filesystems representing other machines in
3475the network.
3476
3477A map can either be given as a name representing an already defined
3478volume name, or it can be a tree.  A tree is represented by placing
3479braces after the name.  For example, to define a tree @file{/vol}, the
3480following map would be defined:
3481
3482@example
3483automount /vol @{ @}
3484@end example
3485
3486Within a tree, the only items that can appear are more maps.
3487For example:
3488
3489@example
3490automount /vol @{
3491    andrew @{ @}
3492    X11 @{ @}
3493@}
3494@end example
3495
3496In this case, @i{FSinfo} will look for volumes named @file{/vol/andrew}
3497and @file{/vol/X11} and a map entry will be generated for each.  If the
3498volumes are defined more than once, then @i{FSinfo} will generate
3499a series of alternate entries for them in the maps.@refill
3500
3501Instead of a tree, either a link (@var{name} @code{->}
3502@var{destination}) or a reference can be specified (@var{name} @code{=}
3503@var{destination}).  A link creates a symbolic link to the string
3504specified, without further processing the entry.  A reference will
3505examine the destination filesystem and optimise the reference.  For
3506example, to create an entry for @code{njw} in the @file{/homes} map,
3507either of the two forms can be used:@refill
3508
3509@example
3510automount /homes @{
3511    njw -> /home/dylan/njw
3512@}
3513@end example
3514
3515or
3516
3517@example
3518automount /homes @{
3519    njw = /home/dylan/njw
3520@}
3521@end example
3522
3523In the first example, when @file{/homes/njw} is referenced from @i{Amd},
3524a link will be created leading to @file{/home/dylan/njw} and the
3525automounter will be referenced a second time to resolve this filename.
3526The map entry would be:
3527
3528@example
3529njw type:=link;fs:=/home/dylan/njw
3530@end example
3531
3532In the second example, the destination directory is analysed and found
3533to be in the filesystem @file{/home/dylan} which has previously been
3534defined in the maps. Hence the map entry will look like:
3535
3536@example
3537njw rhost:=dylan;rfs:=/home/dylan;sublink:=njw
3538@end example
3539
3540Creating only one symbolic link, and one access to @i{Amd}.
3541
3542@c ---------------------------------------------
3543@node FSinfo Command Line Options, FSinfo errors, FSinfo automount definitions, FSinfo
3544@comment  node-name,  next,  previous,  up
3545@section @i{FSinfo} Command Line Options
3546@cindex FSinfo command line options
3547@cindex Command line options, FSinfo
3548
3549@i{FSinfo} is started from the command line by using the command:
3550
3551@example
3552fsinfo [@i{options}] files ...
3553@end example
3554
3555The input to @i{FSinfo} is a single set of definitions of machines and
3556automount maps.  If multiple files are given on the command-line, then
3557the files are concatenated together to form the input source.  The files
3558are passed individually through the C pre-processor before being parsed.
3559
3560Several options define a prefix for the name of an output file.  If the
3561prefix is not specified no output of that type is produced.  The suffix
3562used will correspond either to the hostname to which a file belongs, or
3563to the type of output if only one file is produced.  Dumpsets and the
3564@file{bootparams} file are in the latter class.  To put the output into
3565a subdirectory simply put a @file{/} at the end of the prefix, making
3566sure that the directory has already been made before running
3567@samp{fsinfo}.
3568
3569@menu
3570* -a FSinfo Option::	Amd automount directory:
3571* -b FSinfo Option::	Prefix for bootparams files.
3572* -d FSinfo Option::	Prefix for dumpset data files.
3573* -e FSinfo Option::	Prefix for exports files.
3574* -f FSinfo Option::	Prefix for fstab files.
3575* -h FSinfo Option::	Local hostname.
3576* -m FSinfo Option::	Prefix for automount maps.
3577* -q FSinfo Option::	Ultra quiet mode.
3578* -v FSinfo Option::	Verbose mode.
3579* -I FSinfo Option::	Define new #include directory.
3580* -D FSinfo Option::	Define macro.
3581* -U FSinfo Option::	Undefine macro.
3582@end menu
3583
3584@node -a FSinfo Option, -b FSinfo Option, FSinfo Command Line Options, FSinfo Command Line Options
3585@comment  node-name,  next,  previous,  up
3586@subsection @code{-a} @var{autodir}
3587
3588Specifies the directory name in which to place the automounter's
3589mountpoints.  This defaults to @file{/a}.  Some sites have the autodir set
3590to be @file{/amd}, and this would be achieved by:
3591
3592@example
3593fsinfo -a /amd ...
3594@end example
3595
3596@node -b FSinfo Option, -d FSinfo Option, -a FSinfo Option, FSinfo Command Line Options
3597@comment  node-name,  next,  previous,  up
3598@subsection @code{-b} @var{bootparams}
3599@cindex bootparams, FSinfo prefix
3600
3601This specifies the prefix for the @file{bootparams} filename.  If it is
3602not given, then the file will not be generated.  The @file{bootparams}
3603file will be constructed for the destination machine and will be placed
3604into a file named @file{bootparams} and prefixed by this string.  The
3605file generated contains a list of entries describing each diskless
3606client that can boot from the destination machine.
3607
3608As an example, to create a @file{bootparams} file in the directory
3609@file{generic}, the following would be used:
3610
3611@example
3612fsinfo -b generic/ ...
3613@end example
3614
3615@node -d FSinfo Option, -e FSinfo Option, -b FSinfo Option, FSinfo Command Line Options
3616@comment  node-name,  next,  previous,  up
3617@subsection @code{-d} @var{dumpsets}
3618@cindex dumpset, FSinfo prefix
3619
3620This specifies the prefix for the @file{dumpsets} file.  If it is not
3621specified, then the file will not be generated.  The file will be for
3622the destination machine and will be placed into a filename
3623@file{dumpsets}, prefixed by this string.  The @file{dumpsets} file is
3624for use by Imperial College's local backup system.
3625
3626For example, to create a dumpsets file in the directory @file{generic},
3627then you would use the following:
3628
3629@example
3630fsinfo -d generic/ ...
3631@end example
3632
3633@node -e FSinfo Option, -f FSinfo Option, -d FSinfo Option, FSinfo Command Line Options
3634@comment  node-name,  next,  previous,  up
3635@subsection @code{-e} @var{exportfs}
3636@cindex exports, FSinfo prefix
3637
3638Defines the prefix for the @file{exports} files.  If it is not given,
3639then the file will not be generated.  For each machine defined in the
3640configuration files as having disks, an @file{exports} file is
3641constructed and given a filename determined by the name of the machine,
3642prefixed with this string.  If a machine is defined as diskless, then no
3643@file{exports} file will be created for it.  The files contain entries
3644for directories on the machine that may be exported to clients.
3645
3646Example: To create the @file{exports} files for each diskful machine
3647and place them into the directory @file{exports}:
3648
3649@example
3650fsinfo -e exports/ ...
3651@end example
3652
3653@node -f FSinfo Option, -h FSinfo Option, -e FSinfo Option, FSinfo Command Line Options
3654@comment  node-name,  next,  previous,  up
3655@subsection @code{-f} @var{fstab}
3656@cindex fstab, FSinfo prefix
3657
3658This defines the prefix for the @file{fstab} files.  The files will only
3659be created if this prefix is defined.  For each machine defined in the
3660configuration files, a @file{fstab} file is created with the filename
3661determined by prefixing this string with the name of the machine.  These
3662files contain entries for filesystems and partitions to mount at boot
3663time.
3664
3665Example, to create the files in the directory @file{fstabs}:
3666
3667@example
3668fsinfo -f fstabs/ ...
3669@end example
3670
3671@node -h FSinfo Option, -m FSinfo Option, -f FSinfo Option, FSinfo Command Line Options
3672@comment  node-name,  next,  previous,  up
3673@subsection @code{-h} @var{hostname}
3674@cindex hostname, FSinfo command line option
3675
3676Defines the hostname of the destination machine to process for.  If this
3677is not specified, it defaults to the local machine name, as returned by
3678@b{gethostname}(2).
3679
3680Example:
3681
3682@example
3683fsinfo -h dylan.doc.ic.ac.uk ...
3684@end example
3685
3686@node -m FSinfo Option, -q FSinfo Option, -h FSinfo Option, FSinfo Command Line Options
3687@comment  node-name,  next,  previous,  up
3688@subsection @code{-m} @var{mount-maps}
3689@cindex maps, FSinfo command line option
3690
3691Defines the prefix for the automounter files.  The maps will only be
3692produced if this prefix is defined.  The mount maps suitable for the
3693network defined by the configuration files will be placed into files
3694with names calculated by prefixing this string to the name of each map.
3695
3696For example, to create the automounter maps and place them in the
3697directory @file{automaps}:
3698
3699@example
3700fsinfo -m automaps/ ...
3701@end example
3702
3703@node -q FSinfo Option, -v FSinfo Option, -m FSinfo Option, FSinfo Command Line Options
3704@comment  node-name,  next,  previous,  up
3705@subsection @code{-q}
3706@cindex quiet, FSinfo command line option
3707
3708Selects quiet mode.  @i{FSinfo} suppress the ``running commentary'' and
3709only outputs any error messages which are generated.
3710
3711@node -v FSinfo Option, -D-FSinfo Option, -q FSinfo Option, FSinfo Command Line Options
3712@comment  node-name,  next,  previous,  up
3713@subsection @code{-v}
3714@cindex verbose, FSinfo command line option
3715
3716Selects verbose mode.  When this is activated, the program will display
3717more messages, and display all the information discovered when
3718performing the semantic analysis phase.  Each verbose message is output
3719to @file{stdout} on a line starting with a @samp{#} character.
3720
3721@node -D-FSinfo Option, -I FSinfo Option, -v FSinfo Option, FSinfo Command Line Options
3722@comment  node-name,  next,  previous,  up
3723@subsection @code{-D} @var{name[=defn]}
3724
3725Defines a symbol @dfn{name} for the preprocessor when reading the
3726configuration files.  Equivalent to @code{#define} directive.
3727
3728@node -I FSinfo Option, -U FSinfo Option, -D-FSinfo Option, FSinfo Command Line Options
3729@comment  node-name,  next,  previous,  up
3730@subsection @code{-I} @var{directory}
3731
3732This option is passed into the preprocessor for the configuration files.
3733It specifies directories in which to find include files
3734
3735@node -U FSinfo Option, , -I FSinfo Option, FSinfo Command Line Options
3736@comment  node-name,  next,  previous,  up
3737@subsection @code{-U} @var{name}
3738
3739Removes any initial definition of the symbol @dfn{name}.  Inverse of the
3740@code{-D} option.
3741
3742@node FSinfo errors, , FSinfo command line options, FSinfo
3743@comment  node-name,  next,  previous,  up
3744@section Errors produced by @i{FSinfo}
3745@cindex FSinfo error messages
3746
3747The following table documents the errors and warnings which @i{FSinfo} may produce.
3748
3749@table @t
3750
3751@item can't open @var{filename} for writing
3752Occurs if any errors are encountered when opening an output file.@refill
3753
3754@item unknown host attribute
3755Occurs if an unrecognised keyword is used when defining a host.@refill
3756
3757@item unknown filesystem attribute
3758Occurs if an unrecognised keyword is used when defining a host's
3759filesystems.@refill
3760
3761@item not allowed '/' in a directory name
3762When reading the configuration input, if there is a filesystem
3763definition which contains a pathname with multiple directories for any
3764part of the mountpoint element, and it is not a single absolute path,
3765then this message will be produced by the parser.@refill
3766
3767@item unknown directory attribute
3768If an unknown keyword is found while reading the definition of a hosts's
3769filesystem mount option.
3770
3771@item unknown mount attribute
3772Occurs if an unrecognised keyword is found while parsing the list of
3773static mounts.@refill
3774
3775@item " expected
3776Occurs if an unescaped newline is found in a quoted string.
3777
3778@item unknown \ sequence
3779Occurs if an unknown escape sequence is found inside a string.  Within a
3780string, you can give the standard C escape sequences for strings, such
3781as newlines and tab characters.@refill
3782
3783@item @var{filename}: cannot open for reading
3784If a file specified on the command line as containing configuration data
3785could not be opened.@refill
3786
3787@item end of file within comment
3788A comment was unterminated before the end of one of the configuration
3789files.
3790
3791@item host field "@var{field-name}" already set
3792If duplicate definitions are given for any of the fields with a host
3793definition.
3794
3795@item duplicate host @var{hostname}!
3796If a host has more than one definition.
3797
3798@item netif field @var{field-name} already set
3799Occurs if you attempt to define an attribute of an interface more than
3800once.
3801
3802@item malformed IP dotted quad: @var{address}
3803If the Internet address of an interface is incorrectly specified.  An
3804Internet address definition is handled to @b{inet_addr}(3N) to see if it
3805can cope.  If not, then this message will be displayed.
3806
3807@item malformed netmask: @var{netmask}
3808If the netmask cannot be decoded as though it were a hexadecimal number,
3809then this message will be displayed.  It will typically be caused by
3810incorrect characters in the @var{netmask} value.@refill
3811
3812@item fs field "@var{field-name}" already set
3813Occurs when multiple definitions are given for one of the attributes of a
3814host's filesystem.
3815
3816@item mount tree field "@var{field-name}" already set
3817Occurs when the @var{field-name} is defined more than once during the
3818definition of a filesystems mountpoint.
3819
3820@item mount field "@var{field-name}" already set
3821Occurs when a static mount has multiple definitions of the same field.
3822
3823@item no disk mounts on @var{hostname}
3824If there are no static mounts, nor local disk mounts specified for a
3825machine, this message will be displayed.
3826
3827@item @var{host}:@var{device} needs field "@var{field-name}"
3828Occurs when a filesystem is missing a required field. @var{field-name} could
3829be one of @code{fstype}, @code{opts}, @code{passno} or
3830@code{mount}.@refill
3831
3832@item @var{filesystem} has a volname but no exportfs data
3833Occurs when a volume name is declared for a file system, but the string
3834specifying what machines the filesystem can be exported to is
3835missing.
3836
3837@item sub-directory @var{directory} of @var{directory-tree} starts with '/'
3838Within the filesystem specification for a host, if an element
3839@var{directory} of the mountpoint begins with a @samp{/} and it is not
3840the start of the tree.@refill
3841
3842@item @var{host}:@var{device} has no mount point
3843Occurs if the @samp{mount} option is not specified for a host's
3844filesystem.@refill
3845
3846@item @var{host}:@var{device} has more than one mount point
3847Occurs if the mount option for a host's filesystem specifies multiple
3848trees at which to place the mountpoint.@refill
3849
3850@item no volname given for @var{host}:@var{device}
3851Occurs when a filesystem is defined to be mounted on @file{default}, but
3852no volume name is given for the file system, then the mountpoint cannot
3853be determined.@refill
3854
3855@item @var{host}:mount field specified for swap partition
3856Occurs if a mountpoint is given for a filesystem whose type is declared
3857to be @code{swap}.@refill
3858
3859@item ambiguous mount: @var{volume} is a replicated filesystem
3860If several filesystems are declared as having the same volume name, they
3861will be considered replicated filesystems.  To mount a replicated
3862filesystem statically, a specific host will need to be named, to say
3863which particular copy to try and mount, else this error will
3864result.@refill
3865
3866@item cannot determine localname since volname @var{volume} is not uniquely defined
3867If a volume is replicated and an attempt is made to mount the filesystem
3868statically without specifying a local mountpoint, @i{FSinfo} cannot
3869calculate a mountpoint, as the desired pathname would be
3870ambiguous.@refill
3871
3872@item volname @var{volume} is unknown
3873Occurs if an attempt is made to mount or reference a volume name which
3874has not been declared during the host filesystem definitions.@refill
3875
3876@item volname @var{volume} not exported from @var{machine}
3877Occurs if you attempt to mount the volume @var{volume} from a machine
3878which has not declared itself to have such a filesystem
3879available.@refill
3880
3881@item network booting requires both root and swap areas
3882Occurs if a machine has mount declarations for either the root partition
3883or the swap area, but not both.  You cannot define a machine to only
3884partially boot via the network.@refill
3885
3886@item unknown volname @var{volume} automounted @i{[} on <name> @i{]}
3887Occurs if @var{volume} is used in a definition of an automount map but the volume
3888name has not been declared during the host filesystem definitions.@refill
3889
3890@item not allowed '/' in a directory name
3891Occurs when a pathname with multiple directory elements is specified as
3892the name for an automounter tree.  A tree should only have one name at
3893each level.
3894
3895@item @var{device} has duplicate exportfs data
3896Produced if the @samp{exportfs} option is used multiple times within the
3897same branch of a filesytem definition. For example, if you attempt to
3898set the @samp{exportfs} data at different levels of the mountpoint
3899directory tree.@refill
3900
3901@item sub-directory of @var{directory-tree} is named "default"
3902@samp{default} is a keyword used to specify if a mountpoint should be
3903automatically calculated by @i{FSinfo}.  If you attempt to specify a
3904directory name as this, it will use the filename of @file{default} but
3905will produce this warning.@refill
3906
3907@item pass number for @var{host}:@var{device} is non-zero
3908Occurs if @var{device} has its @samp{fstype} declared to be @samp{swap}
3909or @samp{export} and the @b{fsck}(8) pass number is set. Swap devices should not be
3910fsck'd.  @xref{FSinfo filesystems fstype}@refill
3911
3912@item dump frequency for @var{host}:@var{device} is non-zero
3913Occurs if @var{device} has its @samp{fstype} declared to be @samp{swap}
3914or @samp{export} and the @samp{dump} option is set to a value greater
3915than zero.  Swap devices should not be dumped.@refill
3916
3917@end table
3918
3919@node     Examples, Internals, FSinfo, Top
3920@comment  node-name,  next,  previous,  up
3921@chapter Examples
3922
3923@menu
3924* User Filesystems::
3925* Home Directories::
3926* Architecture Sharing::
3927* Wildcard names::
3928* rwho servers::
3929* /vol::
3930@end menu
3931
3932@node     User Filesystems, Home Directories, Starting Amd, Examples
3933@comment  node-name,  next,  previous,  up
3934@section User Filesystems
3935@cindex User filesystems
3936@cindex Mounting user filesystems
3937
3938With more than one fileserver, the directories most frequently
3939cross-mounted are those containing user home directories.  A common
3940convention used at Imperial College is to mount the user disks under
3941@t{/home/}@i{machine}.
3942
3943Typically, the @samp{/etc/fstab} file contained a long list of entries
3944such as:
3945
3946@example
3947@i{machine}:/home/@i{machine} /home/@i{machine} nfs ...
3948@end example
3949
3950for each fileserver on the network.
3951
3952There are numerous problems with this system.  The mount list can become
3953quite large and some of the machines may be down when a system is
3954booted.  When a new fileserver is installed, @samp{/etc/fstab} must be
3955updated on every machine, the mount directory created and the filesystem
3956mounted.
3957
3958In many environments most people use the same few workstations, but
3959it is convenient to go to a colleague's machine and access your own
3960files.  When a server goes down, it can cause a process on a client
3961machine to hang.  By minimising the mounted filesystems to only include
3962those actively being used, there is less chance that a filesystem will
3963be mounted when a server goes down.
3964
3965The following is a short extract from a map taken from a research fileserver
3966at Imperial College.
3967
3968Note the entry for @samp{localhost} which is used for users such as
3969the operator (@samp{opr}) who have a home directory on most machine as
3970@samp{/home/localhost/opr}.
3971
3972@example
3973/defaults       opts:=rw,intr,grpid,nosuid
3974charm           host!=$@{key@};type:=nfs;rhost:=$@{key@};rfs:=/home/$@{key@} \
3975                host==$@{key@};type:=ufs;dev:=/dev/xd0g
3976#
3977...
3978
3979#
3980localhost       type:=link;fs:=$@{host@}
3981...
3982#
3983# dylan has two user disks so have a
3984# top directory in which to mount them.
3985#
3986dylan           type:=auto;fs:=$@{map@};pref:=$@{key@}/
3987#
3988dylan/dk2       host!=dylan;type:=nfs;rhost:=dylan;rfs:=/home/$@{key@} \
3989                host==dylan;type:=ufs;dev:=/dev/dsk/2s0
3990#
3991dylan/dk5       host!=dylan;type:=nfs;rhost:=dylan;rfs:=/home/$@{key@} \
3992                host==dylan;type:=ufs;dev:=/dev/dsk/5s0
3993...
3994#
3995toytown         host!=$@{key@};type:=nfs;rhost:=$@{key@};rfs:=/home/$@{key@} \
3996                host==$@{key@};type:=ufs;dev:=/dev/xy1g
3997...
3998#
3999zebedee         host!=$@{key@};type:=nfs;rhost:=$@{key@};rfs:=/home/$@{key@} \
4000                host==$@{key@};type:=ufs;dev:=/dev/dsk/1s0
4001#
4002# Just for access...
4003#
4004gould           type:=auto;fs:=$@{map@};pref:=$@{key@}/
4005gould/staff     host!=gould;type:=nfs;rhost:=gould;rfs:=/home/$@{key@}
4006#
4007gummo           host!=$@{key@};type:=nfs;rhost:=$@{key@};rfs:=/home/$@{key@}
4008...
4009@end example
4010
4011This map is shared by most of the machines listed so on those
4012systems any of the user disks is accessible via a consistent name.
4013@i{Amd} is started with the following command
4014
4015@example
4016amd /home amd.home
4017@end example
4018
4019Note that when mounting a remote filesystem, the @dfn{automounted}
4020mount point is referenced, so that the filesystem will be mounted if
4021it is not yet (at the time the remote @samp{mountd} obtains the file handle).
4022
4023@node     Home Directories, Architecture Sharing, User Filesystems, Examples
4024@comment  node-name,  next,  previous,  up
4025@section Home Directories
4026@cindex Home directories
4027@cindex Example of mounting home directories
4028@cindex Mount home directories
4029
4030One convention for home directories is to locate them in @samp{/homes}
4031so user @samp{jsp}'s home directory is @samp{/homes/jsp}.  With more
4032than a single fileserver it is convenient to spread user files across
4033several machines.  All that is required is a mount-map which converts
4034login names to an automounted directory.
4035
4036Such a map might be started by the command:
4037
4038@example
4039amd /homes amd.homes
4040@end example
4041
4042where the map @samp{amd.homes} contained the entries:
4043
4044@example
4045/defaults   type:=link   # All the entries are of type:=link
4046jsp         fs:=/home/charm/jsp
4047njw         fs:=/home/dylan/dk5/njw
4048...
4049phjk        fs:=/home/toytown/ai/phjk
4050sjv         fs:=/home/ganymede/sjv
4051@end example
4052
4053Whenever a login name is accessed in @samp{/homes} a symbolic link
4054appears pointing to the real location of that user's home directory.  In
4055this example, @samp{/homes/jsp} would appear to be a symbolic link
4056pointing to @samp{/home/charm/jsp}.  Of course, @samp{/home} would also
4057be an automount point.
4058
4059This system causes an extra level of symbolic links to be used.
4060Although that turns out to be relatively inexpensive, an alternative is
4061to directly mount the required filesystems in the @samp{/homes}
4062map.  The required map is simple, but long, and its creation is best automated.
4063The entry for @samp{jsp} could be:
4064
4065@example
4066jsp   -sublink:=$@{key@};rfs:=/home/charm \
4067               host==charm;type:=ufs;dev:=/dev/xd0g \
4068               host!=charm;type:=nfs;rhost:=charm
4069@end example
4070
4071This map can become quite big if it contains a large number of entries.
4072By combining two other features of @i{Amd} it can be greatly simplified.
4073
4074First the UFS partitions should be mounted under the control of
4075@samp{/etc/fstab}, taking care that they are mounted in the same place
4076that @i{Amd} would have automounted them.  In most cases this would be
4077something like @samp{/a/@dfn{host}/home/@dfn{host}} and
4078@samp{/etc/fstab} on host @samp{charm} would have a line:@refill
4079
4080@example
4081/dev/xy0g /a/charm/home/charm 4.2 rw,nosuid,grpid 1 5
4082@end example
4083
4084The map can then be changed to:
4085
4086@example
4087/defaults    type:=nfs;sublink:=$@{key@};opts:=rw,intr,nosuid,grpid
4088jsp          rhost:=charm;rfs:=/home/charm
4089njw          rhost:=dylan;rfs:=/home/dylan/dk5
4090...
4091phjk         rhost:=toytown;rfs:=/home/toytown;sublink:=ai/$@{key@}
4092sjv          rhost:=ganymede;rfs:=/home/ganymede
4093@end example
4094
4095This map operates as usual on a remote machine (@i{ie} @code{$@{host@}}
4096not equal to @code{$@{rhost@}}).  On the machine where the filesystem is
4097stored (@i{ie} @code{$@{host@}} equal to @code{$@{rhost@}}), @i{Amd}
4098will construct a local filesystem mount point which corresponds to the
4099name of the locally mounted UFS partition.  If @i{Amd} is started with
4100the ``-r'' option then instead of attempting an NFS mount, @i{Amd} will
4101simply inherit the UFS mount (@pxref{Inheritance Filesystem}).  If
4102``-r'' is not used then a loopback NFS mount will be made.  This type of
4103mount is known to cause a deadlock on many systems.
4104
4105@node     Architecture Sharing, Wildcard Names, Home Directories, Examples
4106@comment  node-name,  next,  previous,  up
4107@section Architecture Sharing
4108@cindex Architecture sharing
4109@cindex Sharing a fileserver between architectures
4110@cindex Architecture dependent volumes
4111
4112@c %At the moment some of the research machines have sets of software
4113@c %mounted in @samp{/vol}.  This contains subdirectories for \TeX,
4114@c %system sources, local sources, prolog libraries and so on.
4115Often a filesystem will be shared by machines of different architectures.
4116Separate trees can be maintained for the executable images for each
4117architecture, but it may be more convenient to have a shared tree,
4118with distinct subdirectories.
4119
4120A shared tree might have the following structure on the fileserver (called
4121@samp{fserver} in the example):
4122
4123@example
4124local/tex
4125local/tex/fonts
4126local/tex/lib
4127local/tex/bin
4128local/tex/bin/sun3
4129local/tex/bin/sun4
4130local/tex/bin/hp9000
4131...
4132@end example
4133
4134In this example, the subdirectories of @samp{local/tex/bin} should be
4135hidden when accessed via the automount point (conventionally @samp{/vol}).
4136A mount-map for @samp{/vol} to achieve this would look like:
4137
4138@example
4139/defaults   rfs:=/vol;sublink:=$@{key@};rhost:=fserver;type:=link
4140tex         type:=auto;fs:=$@{map@};pref:=$@{key@}/
4141tex/fonts   host!=fserver;type:=nfs \
4142            host==fserver;fs:=/usr/local
4143tex/lib     host!=fserver;type:=nfs \
4144            host==fserver;fs:=/usr/local
4145tex/bin     -sublink:=$@{key@}/$@{arch2@} host!=fserver;type:=nfs \
4146            host:=fserver;fs:=/usr/local
4147@end example
4148
4149When @samp{/vol/tex/bin} is referenced, the current machine architecture
4150is automatically appended to the path by the @code{$@{sublink@}}
4151variable.  This means that users can have @samp{/vol/tex/bin} in their
4152@samp{PATH} without concern for architecture dependencies.
4153
4154@node     Wildcard Names, rwho servers, Architecture Sharing, Examples
4155@comment  node-name,  next,  previous,  up
4156@section Wildcard names & Replicated Servers
4157
4158By using the wildcard facility, @i{Amd} can @dfn{overlay} an existing
4159directory with additional entries.
4160The system files are usually mounted under @samp{/usr}.  If instead
4161@i{Amd} is mounted on @samp{/usr}, additional
4162names can be overlayed to augment or replace names in the ``master'' @samp{/usr}.
4163A map to do this would have the form:
4164
4165@example
4166local  type:=auto;fs:=local-map
4167share  type:=auto;fs:=share-map
4168*      -type:=nfs;rfs:=/export/exec/$@{arch@};sublink:="$@{key@}" \
4169        rhost:=fserv1  rhost:=fserv2  rhost:=fserv3
4170@end example
4171
4172Note that the assignment to @code{$@{sublink@}} is surrounded by double
4173quotes to prevent the incoming key from causing the map to be
4174misinterpreted.  This map has the effect of directing any access to
4175@samp{/usr/local} or @samp{/usr/share} to another automount point.
4176
4177In this example, it is assumed that the @samp{/usr} files are replicated
4178on three fileservers: @samp{fserv1}, @samp{fserv2} and @samp{fserv3}.
4179For any references other than to @samp{local} and @samp{share} one of
4180the servers is used and a symbolic link to
4181@t{$@{autodir@}/$@{rhost@}/export/exec/$@{arch@}/@i{whatever}} is
4182returned once an appropriate filesystem has been mounted.@refill
4183
4184@node     rwho servers, /vol, Wildcard Names, Examples
4185@comment  node-name,  next,  previous,  up
4186@section @samp{rwho} servers
4187@cindex rwho servers
4188@cindex Architecture specific mounts
4189@cindex Example of architecture specific mounts
4190
4191The @samp{/usr/spool/rwho} directory is a good candidate for automounting.
4192For efficiency reasons it is best to capture the rwho data on a small
4193number of machines and then mount that information onto a large number
4194of clients.  The data written into the rwho files is byte order dependent
4195so only servers with the correct byte ordering can be used by a client:
4196
4197@example
4198/defaults         type:=nfs
4199usr/spool/rwho    -byte==little;rfs:=/usr/spool/rwho \
4200                      rhost:=vaxA  rhost:=vaxB \
4201                  || -rfs:=/usr/spool/rwho \
4202                      rhost:=sun4  rhost:=hp300
4203@end example
4204
4205@node     /vol, , rwho servers, Examples
4206@comment  node-name,  next,  previous,  up
4207@section @samp{/vol}
4208@cindex /vol
4209@cindex Catch-all mount point
4210@cindex Generic volume name
4211
4212@samp{/vol} is used as a catch-all for volumes which do not have other
4213conventional names.
4214
4215Below is part of the @samp{/vol} map for the domain @samp{doc.ic.ac.uk}.
4216The @samp{r+d} tree is used for new or experimental software that needs
4217to be available everywhere without installing it on all the fileservers.
4218Users wishing to try out the new software then simply include
4219@samp{/vol/r+d/{bin,ucb}} in their path.@refill
4220
4221The main tree resides on one host @samp{gould.doc.ic.ac.uk}, which has
4222different @samp{bin}, @samp{etc}, @samp{lib} and @samp{ucb}
4223sub-directories for each machine architecture.  For example,
4224@samp{/vol/r+d/bin} for a Sun-4 would be stored in the sub-directory
4225@samp{bin/sun4} of the filesystem @samp{/usr/r+d}.  When it was accessed
4226a symbolic link pointing to @samp{/a/gould/usr/r+d/bin/sun4} would be
4227returned.@refill
4228
4229@example
4230/defaults    type:=nfs;opts:=rw,grpid,nosuid,intr,soft
4231wp           -opts:=rw,grpid,nosuid;rhost:=charm \
4232             host==charm;type:=link;fs:=/usr/local/wp \
4233             host!=charm;type:=nfs;rfs:=/vol/wp
4234...
4235#
4236src          -opts:=rw,grpid,nosuid;rhost:=charm \
4237             host==charm;type:=link;fs:=/usr/src \
4238             host!=charm;type:=nfs;rfs:=/vol/src
4239#
4240r+d          type:=auto;fs:=$@{map@};pref:=r+d/
4241# per architecture bin,etc,lib&ucb...
4242r+d/bin      rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=$@{/key@}/$@{arch@}
4243r+d/etc      rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=$@{/key@}/$@{arch@}
4244r+d/include  rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=$@{/key@}
4245r+d/lib      rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=$@{/key@}/$@{arch@}
4246r+d/man      rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=$@{/key@}
4247r+d/src      rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=$@{/key@}
4248r+d/ucb      rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=$@{/key@}/$@{arch@}
4249# hades pictures
4250pictures     -opts:=rw,grpid,nosuid;rhost:=thpfs \
4251             host==thpfs;type:=link;fs:=/nbsd/pictures \
4252             host!=thpfs;type:=nfs;rfs:=/nbsd;sublink:=pictures
4253# hades tools
4254hades        -opts:=rw,grpid,nosuid;rhost:=thpfs \
4255             host==thpfs;type:=link;fs:=/nbsd/hades \
4256             host!=thpfs;type:=nfs;rfs:=/nbsd;sublink:=hades
4257# bsd tools for hp.
4258bsd          -opts:=rw,grpid,nosuid;arch==hp9000;rhost:=thpfs \
4259             host==thpfs;type:=link;fs:=/nbsd/bsd \
4260             host!=thpfs;type:=nfs;rfs:=/nbsd;sublink:=bsd
4261@end example
4262
4263@node     Internals, Acknowledgements & Trademarks, Examples, Top
4264@comment  node-name,  next,  previous,  up
4265@chapter Internals
4266
4267@menu
4268* Log Messages::
4269@end menu
4270
4271@node     Log Messages, , Internals, Internals
4272@comment  node-name,  next,  previous,  up
4273@section Log Messages
4274
4275In the following sections a brief explanation is given of some of the
4276log messages made by @i{Amd}.  Where the message is in @samp{typewriter}
4277font, it corresponds exactly to the message produced by @i{Amd}.  Words
4278in @dfn{italic} are replaced by an appropriate string.  Variables,
4279@code{$@{var@}}, indicate that the value of the appropriate variable is
4280output.
4281
4282Log messages are either sent direct to a file,
4283or logged via the @b{syslog}(3) mechanism.
4284Messages are logged with facility @samp{LOG_DAEMON} when using @b{syslog}(3).
4285In either case, entries in the file are of the form:
4286@example
4287@i{date-string}  @i{hostname} @t{amd[}@i{pid}@t{]}  @i{message}
4288@end example
4289
4290@menu
4291* Fatal errors::
4292* Info messages::
4293@end menu
4294
4295@node     Fatal errors, Info messages, Log Messages, Log Messages
4296@comment  node-name,  next,  previous,  up
4297@subsection Fatal errors
4298
4299@i{Amd} attempts to deal with unusual events.  Whenever it is not
4300possible to deal with such an error, @i{Amd} will log an appropriate
4301message and, if it cannot possibly continue, will either exit or abort.
4302These messages are selected by @samp{-x fatal} on the command line.
4303When @b{syslog}(3) is being used, they are logged with level
4304@samp{LOG_FATAL}.  Even if @i{Amd} continues to operate it is likely to
4305remain in a precarious state and should be restarted at the earliest
4306opportunity.
4307
4308@table @asis
4309@item @t{Attempting to inherit not-a-filesystem}
4310The prototype mount point created during a filesystem restart did not
4311contain a reference to the restarted filesystem.  This erorr ``should
4312never happen''.
4313
4314@item @t{Can't bind to domain "@i{NIS-domain}"}
4315A specific NIS domain was requested on the command line, but no server
4316for that domain is available on the local net.
4317
4318@item @t{Can't determine IP address of this host (@i{hostname})}
4319When @i{Amd} starts it determines its own IP address.  If this lookup
4320fails then @i{Amd} cannot continue.  The hostname it looks up is that
4321obtained returned by @b{gethostname}(2) system call.
4322
4323@item @t{Can't find root file handle for @i{automount point}}
4324@i{Amd} creates its own file handles for the automount points.  When it
4325mounts itself as a server, it must pass these file handles to the local
4326kernel.  If the filehandle is not obtainable the mount point is ignored.
4327This error ``should never happen''.
4328
4329@item @t{Must be root to mount filesystems (euid = @i{euid})}
4330To prevent embarrassment, @i{Amd} makes sure it has appropriate system
4331privileges.  This amounts to having an euid of 0.  The check is made
4332after argument processing complete to give non-root users a chance to
4333access the ``-v'' option.
4334
4335@item @t{No work to do - quitting}
4336No automount points were given on the command line and so there is no
4337work to do.
4338
4339@item @t{Out of memory in realloc}
4340While attempting to realloc some memory, the memory space available to
4341@i{Amd} was exhausted.  This is an unrecoverable error.
4342
4343@item @t{Out of memory}
4344While attempting to malloc some memory, the memory space available to
4345@i{Amd} was exhausted.  This is an unrecoverable error.
4346
4347@item @t{cannot create rpc/udp service}
4348Either the NFS or AMQ endpoint could not be created.
4349
4350@item @t{gethostname:} @i{description}
4351The @b{gethostname}(2) system call failed during startup.
4352
4353@item @t{host name is not set}
4354The @b{gethostname}(2) system call returned a zero length host name.
4355This can happen if @i{Amd} is started in single user mode just after
4356booting the system.
4357
4358@item @t{ifs_match called!}
4359An internal error occurred while restarting a pre-mounted filesystem.
4360This error ``should never happen''.
4361
4362@item @t{mount_afs:} @i{description}
4363An error occured while @i{Amd} was mounting itself.
4364
4365@item @t{run_rpc failed}
4366Somehow the main NFS server loop failed.  This error ``should never
4367happen''.
4368
4369@item @t{unable to free rpc arguments in amqprog_1}
4370The incoming arguments to the AMQ server could not be free'ed.
4371
4372@item @t{unable to free rpc arguments in nfs_program_1}
4373The incoming arguments to the NFS server could not be free'ed.
4374
4375@item @t{unable to register (AMQ_PROGRAM, AMQ_VERSION, udp)}
4376The AMQ server could not be registered with the local portmapper or the
4377internal RPC dispatcher.
4378
4379@item @t{unable to register (NFS_PROGRAM, NFS_VERSION, 0)}
4380The NFS server could not be registered with the internal RPC dispatcher.
4381
4382@end table
4383
4384@node     Info messages, , Fatal errors, Log Messages
4385@comment  node-name,  next,  previous,  up
4386@subsection Info messages
4387
4388@i{Amd} generates information messages to record state changes.  These
4389messages are selected by @samp{-x info} on the command line.  When
4390@b{syslog}(3) is being used, they are logged with level @samp{LOG_INFO}.
4391
4392The messages listed below can be generated and are in a format suitable
4393for simple statistical analysis.  @dfn{mount-info} is the string
4394that is displayed by @dfn{Amq} in its mount information column and
4395placed in the system mount table.
4396
4397@table @asis
4398@item @t{mount of "@t{$@{@i{path}@}}" on @t{$@{@i{fs}@}} timed out}
4399Attempts to mount a filesystem for the given automount point have failed
4400to complete within 30 seconds.
4401
4402@item @t{"@t{$@{@i{path}@}}" forcibly timed out}
4403An automount point has been timed out by the @i{Amq} command.
4404
4405@item @t{restarting @i{mount-info} on @t{$@{@i{fs}@}}}
4406A pre-mounted file system has been noted.
4407
4408@item @t{"@t{$@{@i{path}@}}" has timed out}
4409No access to the automount point has been made within the timeout
4410period.
4411
4412@item @t{file server @t{$@{@i{rhost}@}} is down - timeout of "@t{$@{@i{path}@}}" ignored}
4413An automount point has timed out, but the corresponding file server is
4414known to be down.  This message is only produced once for each mount
4415point for which the server is down.
4416
4417@item @t{Re-synchronizing cache for map @t{$@{@i{map}@}}}
4418The named map has been modified and the internal cache is being re-synchronized.
4419
4420@item @t{Filehandle denied for "@t{$@{@i{rhost}@}}:@t{$@{@i{rfs}@}}"}
4421The mount daemon refused to return a file handle for the requested filesystem.
4422
4423@item @t{Filehandle error for "$@{@i{rhost}@}:$@{@i{rfs}@}":} @i{description}
4424The mount daemon gave some other error for the requested filesystem.
4425
4426@item @t{file server @t{$@{@i{rhost}@}} type nfs starts up}
4427A new NFS file server has been referenced and is known to be up.
4428
4429@item @t{file server @t{$@{@i{rhost}@}} type nfs starts down}
4430A new NFS file server has been referenced and is known to be down.
4431
4432@item @t{file server @t{$@{@i{rhost}@}} type nfs is up}
4433An NFS file server that was previously down is now up.
4434
4435@item @t{file server @t{$@{@i{rhost}@}} type nfs is down}
4436An NFS file server that was previously up is now down.
4437
4438@item @t{Finishing with status @i{exit-status}}
4439@i{Amd} is about to exit with the given exit status.
4440
4441@item @t{@i{mount-info} mounted fstype @t{$@{@i{type}@}} on @t{$@{@i{fs}@}}}
4442A new file system has been mounted.
4443
4444@item @t{@i{mount-info} restarted fstype @t{$@{@i{type}@}} on @t{$@{@i{fs}@}}}
4445@i{Amd} is using a pre-mounted filesystem to satisfy a mount request.
4446
4447@item @t{@i{mount-info} unmounted fstype @t{$@{@i{type}@}} from @t{$@{@i{fs}@}}}
4448A file system has been unmounted.
4449
4450@item @t{@i{mount-info} unmounted fstype @t{$@{@i{type}@}} from @t{$@{@i{fs}@}} link @t{$@{@i{fs}@}}/@t{$@{@i{sublink}@}}}
4451A file system of which only a sub-directory was in use has been unmounted.
4452
4453@end table
4454
4455@node     Acknowledgements & Trademarks, Index, Internals, Top
4456@comment  node-name,  next,  previous,  up
4457@unnumbered Acknowledgements & Trademarks
4458
4459Thanks to the Formal Methods Group at Imperial College for
4460suffering patiently while @i{Amd} was being developed on their machines.
4461
4462Thanks to the many people who have helped with the development of
4463@i{Amd}, especially Piete Brooks at the Cambridge University Computing
4464Lab for many hours of testing, experimentation and discussion.
4465
4466@itemize @bullet
4467@item
4468@b{DEC}, @b{VAX} and @b{Ultrix} are registered trademarks of Digital
4469Equipment Corporation.
4470@item
4471@b{AIX} and @b{IBM} are registered trademarks of International Business
4472Machines Corporation.
4473@item
4474@b{Sun}, @b{NFS} and @b{SunOS} are registered trademarks of Sun
4475Microsystems, Inc.
4476@item
4477@b{Unix} is a registered trademark of AT&T Bell Laboratories in the USA
4478and other countries.
4479@end itemize
4480
4481@node Index, , Acknowledgements & Trademarks, Top
4482@unnumbered Index
4483
4484@printindex cp
4485
4486@contents
4487@bye
4488