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