home *** CD-ROM | disk | FTP | other *** search
- Subject: v21i099: An Automounter for NFS systems, Part11/13
- Newsgroups: comp.sources.unix
- Approved: rsalz@uunet.UU.NET
- X-Checksum-Snefru: 406204c1 ea9a180e a3c79878 21b9316e
-
- Submitted-by: Jan-Simon Pendry <jsp@doc.ic.ac.uk>
- Posting-number: Volume 21, Issue 99
- Archive-name: amd/part11
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 11 (of 13)."
- # Contents: doc/amd.tex.2
- # Wrapped by rsalz@papaya.bbn.com on Tue Apr 10 15:12:15 1990
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'doc/amd.tex.2' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'doc/amd.tex.2'\"
- else
- echo shar: Extracting \"'doc/amd.tex.2'\" \(28104 characters\)
- sed "s/^X//" >'doc/amd.tex.2' <<'END_OF_FILE'
- XIf a filesystem type is to be heavily used, it may be worthwhile
- Xadding a new filesystem type into \amd, but for most uses the
- Xprogram filesystem should suffice.
- X
- XThe {\tt /n} convention says that each directory within {\tt /n} is the
- Xroot directory of the filesystems on a machine with the corresponding
- Xname.
- XSupposing a program, {\tt net-mount}, was available. To provide
- Xan implementation of {\tt /n} the following map ({\tt net.map}) could be used:
- X\begin{quote}
- X\tt
- X{}*\ \ \ \ type:=program;mount:="/etc/net-mount mount \Var{key} \Var{fs}";\verb+\+ \\
- X\mbox{}\ \ \ \ \ unmount:="/etc/net-mount unmount \Var{key} \Var{fs}"
- X\end{quote}
- Xwhere {\tt argv[0]} is used to distinguish between mount and unmount requests;
- X{\tt argv[1]} is the name of the machine; {\tt argv[2]} is the local directory
- Xunder which to mount the filesystems.
- XThis could be started with the following command:
- X\begin{quote}
- X\tt
- Xamd ... /n net.map
- X\end{quote}
- X
- X\Section[Symbolic Link Filesystem]{Symbolic Link Filesystem ({\tt type:=link})}
- X
- XThe {\em link} filesystem type allows other parts of the filesystem
- Xto be referenced as if they were mounted under the automounter.
- XUnder SunOS 4.0 this can also be done using the loopback filesystem,
- Xhowever that adds an unnecessary extra mount into the system.
- X
- XOne common use for the symlink filesystem is {\tt /homes}
- Xwhich can be made to contain an entry for each user which points
- Xto their (auto-mounted) home directory. Although this may seem
- Xrather expensive, it provides a great deal of administrative
- Xflexibility.
- X
- XThe \opt{fs} option specifies the destination of the link, as modified
- Xby the \opt{sublink} option. If \opt{sublink} is specified, it
- Xis appended to \Var{fs}{\tt /} and the resulting string is used as the target.
- X
- X%\Amd\ keeps track of the local mount points on which it has mounted
- X%a filesystem. If a second mount would be to the same local mount point,
- X%\amd\ converts that into a cross-reference to the original mount
- X%and the new mount is converted into a mount of type {\tt link}.
- X%References through either name will cause the time-to-live of the
- X%mount to be extended.
- X
- XAn example entry might be:
- X\begin{quote}
- X\tt
- Xjsp\ \ \ host==charm;type:=link;fs:=/home/charm;sublink:=jsp
- X\end{quote}
- X
- X\Section[Automount Filesystem]{Automount Filesystem ({\tt type:=auto})}\label{auto-fs}
- X
- XThe {\em auto} filesystem type allows a new automount point to
- Xbe added below an existing automount point. The new mount point appears
- Xas a sub-directory of the original mount point. This allows
- Xsome additional structure to be added,
- Xfor example to mimic the mount tree of another
- Xmachine.\footnote{
- XFuture work will allow a tree of automount points to be built by
- Xexamining the exported mount tree of a remote fileserver.}
- X
- XThe following option may be specified:
- X\begin{description}
- X\item[cache]\label{afs:cache}
- Xspecifies whether the data in this mount-map should be
- Xcached. By default, no caching is done in order to conserve memory.
- XHowever, better performance and reliability can be obtained by caching
- Xsome or all of a mount-map. If the cache option specifies {\tt all},
- Xthe entire map is enumerated when the mount point is created.
- XIf the cache option specifies {\tt inc}, caching is done incrementally
- Xas and when data is required.
- XSome map types do not support cache mode {\tt all}, in which case {\tt inc}
- Xis used whenever {\tt all} is requested.
- X
- XThe default cache mode is {\tt none} which means that no data will be cached.
- XEach mount map type has a default cache type, usually {\tt inc}, which
- Xcan be selected by specifying {\tt mapdefault}.
- X
- XThe cache mode for a mount map can only be selected on the command line. Starting
- X\amd\ with the command
- X\begin{quote}
- X\tt
- Xamd /homes hesiod.homes -cache:=inc
- X\end{quote}
- Xwill cause {\tt /homes} to be automounted using the {\em Hesiod} name server with local
- Xincremental caching of all succesfully resolved names.
- X
- XAll cached data is forgotten whenever \amd\ receives
- Xa {\tt SIGHUP} signal. If cache {\tt all} mode was selected, the
- Xcache will be reloaded. This can be used to inform \amd\ that a map
- Xhas been updated. In addition, whenever a cache lookup fails and \amd\ needs
- Xto examine a map, the map's modify time is examined. If the cache is out
- Xof date with respect to the map then it is flushed as if a {\tt SIGHUP} had
- Xbeen received.
- X\end{description}
- X
- XThe \opt{fs} option specifies the name of the mount map to use for the new
- Xmount point.
- X%If the string ``{\tt .}'' is used then the same map is used;
- X%in addition the lookup prefix is set to the name of the mount point followed
- X%by a slash ``{\tt /}''.
- XThis is the same as specifying {\tt fs:=\$\{map\};pref:=\$\{key\}/}.
- XThe prefix can be overridden with the \opt{pref} option.
- XThe prefix alters the name that is looked up in the mount map. If the
- Xprefix is non-null then it is prepended to the name requested by
- Xthe kernel before the map is searched.
- X
- XThe server {\tt dylan.doc.ic.ac.uk} has two user disks: {\tt /dev/dsk/2s0} and
- X{\tt /dev/dsk/5s0}. These are accessed as {\tt /home/dylan/dk2} and
- X{\tt /home/dylan/dk5} respectively. Since {\tt /home} is already an automount
- Xpoint, this naming is achieved with the following map entries:
- X\begin{quote}\raggedright
- X\tt
- Xdylan\ \ \ \ \ \ \ \ type:=auto;fs:=\Var{map};pref:=\Var{key}/ \\
- Xdylan/dk2\ \ \ \ type:=ufs;dev:=/dev/dsk/2s0 \\
- Xdylan/dk5\ \ \ \ type:=ufs;dev:=/dev/dsk/5s0
- X\end{quote}
- X
- X\Section[Direct Automount Filesystem]{Direct Automount Filesystem ({\tt type:=direct})}\label{direct-fs}
- X
- XThe {\em direct} filesystem is almost identical to the automount filesystem.
- XInstead of appearing to be a directory of mount points, it appears
- Xas a symbolic link to a mounted filesystem. The mount is done at
- Xthe time the link is accessed.
- X
- XDirect automount points are created by specifying the {\tt direct} filesystem
- Xtype on the command line:
- X\begin{quote}
- X\tt
- Xamd ... /usr/man auto.direct -type:=direct
- X\end{quote}
- Xwhere {\tt auto.direct} would contain an entry such as:
- X\begin{quote}\raggedright
- X\tt
- Xusr/man\ \ \ \ -type:=nfs;rfs:=/usr/man \verb+\+ \\
- X\ \ \ \ \ \ \ \ \ \ \ rhost:=man-server1\ \ rhost:=man-server2
- X\end{quote}
- XIn this example, {\tt man-server1} and {\tt man-server2} are file servers
- Xwhich export copies of the manual pages.
- XNote that the key does {\em not} have a leading ``{\tt /}''.
- X
- X\Section{Error Filesystem}\label{error-fs}
- X
- XThe {\em error} filesystem type is used internally as a catch-all in
- Xthe case where none of the other filesystems was selected, or some other
- Xerror occurred.
- XLookups always fail with ``No such file or directory''.
- XAll other operations trivally succeed.
- X
- XThe error filesystem is not directly accessible.
- X
- X\Section{Inheritance Filesystem}\label{ifs}
- X
- XThe inheritance filesystem is not directly accessible.
- XInstead, internal mount nodes of this type are automatically generated
- Xwhen \amd\ is started with the ``-r'' option.
- XAt this time the system mount table ({\tt /etc/mtab}) is scanned to locate
- Xany filesystems which are already mounted. If any reference to
- Xthese filesystems is made through \amd\ then instead of attempting
- Xto mount it, \amd\ simulates the mount and {\em inherits} the
- Xfilesystem. This allows a new version of \amd\ to be installed
- Xon a live system simply by killing the old daemon and starting
- Xthe new one.
- X
- X\Chapter{Run-time Administration}\label{chapter:amq}
- X
- XIt is sometimes desirable or necessary to exercise external control
- Xover some of \amd's internal state. To support this requirement,
- X\amd\ implements an RPC interface which is used by the \amq\ program.
- X
- X\Amq\ provides a variety of operations. With no arguments, \amq\ obtains
- Xa brief list of all existing mounts created by \amd. This is different from
- Xthe list displayed by {\bf df}(1) since the latter only includes system
- Xmount points.
- XThe output from this option includes the following information:
- X\begin{itemize}
- X\item the automount point,
- X\item the filesystem type,
- X\item the mount map or mount information,
- X\item the internal, or system mount point.
- X\end{itemize}
- XFor example:
- X\begin{verbatim}
- X/ auto "root" sky:(pid75)
- X/homes auto /usr/local/etc/amd.homes /homes
- X/home auto /usr/local/etc/amd.home /home
- X/homes/jsp nfs charm:/home/charm /a/charm/home/charm/jsp
- X/homes/phjk nfs toytown:/home/toytown /a/toytown/home/toytown/ai/phjk
- X\end{verbatim}
- X
- XThe ``-m'' option similar information about mounted filesystems,
- Xrather than automount points. The output includes the following
- Xinformation:
- X\begin{itemize}
- X\item the mount information,
- X\item the mount point,
- X\item the filesystem type,
- X\item the number of references to this filesystem,
- X\item the server hostname,
- X\item the state of the file server,
- X\item any error which has occured.
- X\end{itemize}
- XFor example:
- X\begin{verbatim}
- X"root" truth:(pid602) auto 1 localhost is up
- X../a_master5 /tmp/amd/junk auto 1 localhost is up
- Xpelican:/home/pelican /a/pelican/home/pelican nfs 1 pelican is up
- Xtoytown:/home/toytown /a/toytown/home/toytown nfs 5 toytown is up
- Xgould:/home/gould /a/gould/home/gould nfs 0 gould is up (Permission denied)
- Xpebbles:/home/pebbles /a/pebbles/home/pebbles nfs 0 pebbles is down
- X\end{verbatim}
- XWhen the reference count is zero the filesystem is not mounted but
- Xthe mount point and server information is still being maintained
- Xby \amd.
- X
- X\Amq\ generally applies an operation, specified by a single letter option,
- Xto a list of mount points. The default operation is to obtain statistics
- Xabout each mount point. This is similar to the output shown above
- Xbut includes information about the number and type of accesses to each
- Xmount point.
- X
- XBy default the local host is used; in an HP-UX cluster the root server
- Xis used.
- XTo query \amd\ on another host the ``-h'' option should be used.
- X
- XThe ``-u'' option causes the time-to-live interval of the named mount points
- Xto be expired, thus causing an unmount attempt. This is the only safe way
- Xto unmount an automounted filesystem.
- XIt is not possible to unmount a filesystem which has been mounted with
- Xthe {\tt notimeout} flag.
- X
- X%The ``-H'' option informs \amd\ that the specified mount point has hung -
- X%as if its keepalive timer had expired.
- X
- XThe ``-s'' option displays global statistics. If any other options are specified
- Xor any filesystems named then this option is ignored.
- X
- XThe ``-f'' option causes \amd\ to flush the internal mount map cache. This is
- Xuseful for YP and Hesiod maps since \amd\ does not normally notice when they
- Xhave been updated.
- X
- XThree other operations are implemented. These modify the state of
- X\amd\ as a whole, rather than any particular filesystem.
- XThe ``-l'', ``-x'' and ``-D'' options have exactly the same effect
- Xas \amd's corresponding command line options. However, the ``-l''
- Xoption is rejected by \amd\ in version ``\VERSION''
- Xfor obvious security reasons.
- X
- X
- X\Chapter{Examples}
- X
- X\Section{User Filesystems}
- XWith more than one fileserver, the directories most frequently
- Xcross-mounted are those containing user home directories.
- XA common convention used at Imperial College is to mount
- Xthe user disks under {\tt /home/}{\em machine}.
- XTypically, the {\tt /etc/fstab} file\footnote{{\tt /etc/checklist}
- Xon System V} contained a long list of entries
- Xsuch as:
- X\begin{quote}
- X{\em machine}{\tt :/home/}{\em machine}\ \ \tt /home/{\em machine}\ nfs \ldots
- X\end{quote}
- Xfor each fileserver on the network.
- X
- XThere are numerous problems with this system.
- XThe mount list can become quite large, or some of the machines
- Xmay be down when a system is booted.
- XWhen a new fileserver is installed, {\tt /etc/fstab} must be
- Xupdated on every machine, the mount directory created and
- Xthe filesystem mounted.
- XIn research environments most
- Xpeople use the same few workstations, but it is convenient to go
- Xto a colleague's machine and access your own files.
- XWhen a server goes down, it can cause a process on a client machine to
- Xhang. By minimising the mounted filesystems to only include those
- Xactively being used, there is less chance that a filesystem will be mounted
- Xwhen a server goes down.
- X
- XThe following is a short extract from a map taken from a research fileserver
- Xat Imperial College:
- X\begin{verbatim}
- X/defaults opts:=rw,intr,grpid,nosuid
- Xcharm host!=${key};type:=nfs;rhost:=${key};rfs:=/home/${key} \
- X host==${key};type:=ufs;dev:=/dev/xd0g
- X#
- X...
- X
- X#
- X# dylan has two user disks so have a
- X# top directory in which to mount them.
- X#
- Xdylan type:=auto;fs:=${map};pref:=${key}/
- X#
- Xdylan/dk2 host!=dylan;type:=nfs;rhost:=dylan;rfs:=/home/${key} \
- X host==dylan;type:=ufs;dev:=/dev/dsk/2s0
- X#
- Xdylan/dk5 host!=dylan;type:=nfs;rhost:=dylan;rfs:=/home/${key} \
- X host==dylan;type:=ufs;dev:=/dev/dsk/5s0
- X...
- X#
- Xtoytown host!=${key};type:=nfs;rhost:=${key};rfs:=/home/${key} \
- X host==${key};type:=ufs;dev:=/dev/xy1g
- X#
- Xzebedee host!=${key};type:=nfs;rhost:=${key};rfs:=/home/${key} \
- X host==${key};type:=ufs;dev:=/dev/dsk/1s0
- X#
- X# Just for access...
- X#
- Xgould type:=auto;fs:=${map};pref:=${key}/
- Xgould/staff host!=gould;type:=nfs;rhost:=gould;rfs:=/home/${key}
- X#
- Xgummo host!=${key};type:=nfs;rhost:=${key};rfs:=/home/${key}
- X...
- X\end{verbatim}
- X
- XThis map is shared by most of the machines listed so on those
- Xsystems any of the user disks is accessible via a consistent name.
- X
- XNote that when mounting a remote filesystem, the {\em automounted}
- Xmount point is referenced, so that the filesystem will be mounted if
- Xit is not yet (at the time the remote mountd obtains the file handle).
- X
- X\Section{Home Directories}
- XOne convention for home directories is to locate them in {\tt /homes} so
- Xuser {\tt jsp}'s home directory is {\tt /homes/jsp}.
- XWith more than a single fileserver it is convenient
- Xto spread user files across several machines.
- XAll that is required is a mount-map
- Xwhich converts login names to an automounted directory.
- X
- XSuch a map might be started by the command:
- X\begin{quote}
- X\tt amd /homes amd.homes
- X\end{quote}
- Xwhere the map {\tt amd.homes} contained the entries:
- X\begin{quote}\raggedright
- X\tt
- X/defaults\ \ \ type:=link\ \ \ \# All the entries are of type:=link \\
- Xjsp\ \ \ \ \ \ \ \ \ fs:=/home/charm/jsp\\
- Xnjw\ \ \ \ \ \ \ \ \ fs:=/home/dylan/dk5/njw\\
- X...\\
- Xphjk\ \ \ \ \ \ \ \ fs:=/home/toytown/ai/phjk\\
- Xsjv\ \ \ \ \ \ \ \ \ fs:=/home/ganymede/sjv
- X\end{quote}
- XWhenever a login name is accessed in {\tt /homes} a symbolic link
- Xappears pointing to the real location of that user's home directory.
- XIn this example, {\tt /homes/jsp} would appear to be a symbolic link
- Xpointing to {\tt /home/charm/jsp}.
- XOf course, {\tt /home} would also be an automount point.
- X
- XThis system causes an extra level of symbolic links to be used.
- XAlthough that turns out to be relatively inexpensive, an alternative is
- Xto directly mount the required filesystems in the {\tt /homes}
- Xmap. The required map is simple, but long, and its creation best automated.
- XThe entry for {\tt jsp} could be:
- X{\tt\begin{tabbing}
- Xjsp\ \ \ \ \ \ \= -sublink:=\$\{key\};rfs:=/home/charm {\verb+\+}\kill \\
- Xjsp \> -sublink:=\$\{key\};rfs:=/home/charm {\verb+\+}\\
- X \> host==charm;type:=ufs;dev:=/dev/xd0g {\verb+\+}\\
- X \> host!=charm;type:=nfs;rhost:=charm
- X\end{tabbing}}
- X
- XThis map can become quite big if it contains a large number of
- Xentries. By combining two other features of \amd\ it can be greatly
- Xsimplified. First the \UFS\ partitions should be mounted under the
- Xcontrol of {\tt /etc/fstab}, taking care that they are mounted in the
- Xsame place that \amd\ would have automounted them.
- XThe map can then be changed to:
- X\begin{quote}\raggedright
- X\tt
- X/defaults\ \ \ \ type:=nfs;sublink:=\Var{key};opts:=rw,intr,nosuid,grpid\\
- Xjsp\ \ \ \ \ \ \ \ \ \ rhost:=charm;rfs:=/home/charm\\
- Xnjw\ \ \ \ \ \ \ \ \ \ rhost:=dylan;rfs:=/home/dylan/dk5\\
- X...\\
- Xphjk\ \ \ \ \ \ \ \ \ rhost:=toytown;rfs:=/home/toytown;sublink:=ai/\Var{key}\\
- Xsjv\ \ \ \ \ \ \ \ \ \ rhost:=ganymede;rfs:=/home/ganymede
- X\end{quote}
- X
- XThis map operates as usual on a remote machine (ie \Var{host} $\not=$ \Var{rhost}).
- XOn the machine where the filesystem is stored (ie \Var{host} $=$ \Var{rhost}),
- X\amd\ will construct a local filesystem mount point which corresponds to
- Xthe name of the locally mounted \UFS\ partition. If \amd\ is started
- Xwith the ``-r'' option then instead of attempting an \NFS\ mount, \amd\ will
- Xsimply inherit the \UFS\ mount (\see \Ref{ifs}).
- X
- X%\Section{System Filesystem}
- X
- X\Section{Architecture Sharing}
- X%At the moment some of the research machines have sets of software
- X%mounted in {\tt /vol}. This contains subdirectories for \TeX,
- X%system sources, local sources, prolog libraries and so on.
- XOften a filesystem will be shared by machines of different architectures.
- XSeparate trees can be maintained for the executable images for each
- Xarchitecture, but it may be more convenient to have a shared tree,
- Xwith distinct subdirectories.
- X
- XA shared tree might have the following structure on the fileserver (called
- X{\tt fserver} in the example):
- X\begin{quote}\raggedright
- X\tt
- Xlocal/tex \\
- Xlocal/tex/fonts \\
- Xlocal/tex/lib \\
- Xlocal/tex/bin \\
- Xlocal/tex/bin/sun3 \\
- Xlocal/tex/bin/sun4 \\
- Xlocal/tex/bin/hp9000 \\
- X...
- X\end{quote}
- XIn this example, the subdirectories of {\tt local/tex/bin} should be
- Xhidden when accessed via the automount point (conventionally {\tt /vol}).
- XA mount-map for {\tt /vol} to achieve this would look like:
- X{\tt\begin{tabbing}
- Xtex/fonts\ \ \ \ \ \= \kill \\
- X/defaults \> rfs:=/vol;sublink:=\$\{key\};rhost:=fserver;type:=link\\
- Xtex \> type:=auto;fs:=\$\{map\};pref:=\$\{key\}/\\
- Xtex/fonts \> host!=fserver;type:=nfs\ {\verb+\+}\\
- X \> host==fserver;fs:=/usr/local \\
- Xtex/lib \> host!=fserver;type:=nfs\ {\verb+\+}\\
- X \> host==fserver;fs:=/usr/local \\
- Xtex/bin \> -sublink:=\$\{key\}/\$\{arch\} host!=fserver;type:=nfs\ {\verb+\+}\\
- X \> host:=fserver;fs:=/usr/local
- X\end{tabbing}}
- XWhen {\tt /vol/tex/bin} is referenced, the current machine architecture
- Xis automatically appended to the path by the \Var{sublink} variable.
- XThis means that users can have {\tt /vol/tex/bin} in their {\tt PATH}
- Xwithout concern for architecture dependencies.
- X
- X\Section{Wildcard names \& Replicated Servers}
- XBy using the wildcard facility, \amd\ can {\em overlay} an existing
- Xdirectory with additional entries.
- XThe system files are usually mounted under {\tt /usr}. If instead
- X\amd\ is mounted on {\tt /usr}, additional
- Xnames can be overlayed to augment or replace names in the ``master'' {\tt /usr}.
- XA map to do this would have the form:
- X{\tt\begin{tabbing}
- Xlocal\ \ \ \ \ \= blah \kill \\
- Xlocal \> type:=auto;fs:=local-map\\
- Xshare \> type:=auto;fs:=share-map\\
- X{}* \> -type:=nfs;rfs:=/export/exec/\$\{arch\};sublink:="\$\{key\}"\ \verb+\+\\
- X \> \ \ \ \ rhost:=fserv1\ \ rhost:=fserv2\ \ rhost:=fserv3 \\
- X\end{tabbing}}
- XNote that the assignment to \Var{sublink} is surrounded by double quotes to
- Xprevent the incoming key from causing the map to be misinterpreted.
- XThis map has the effect of directing any access to {\tt /usr/local} or {\tt /usr/share}
- Xto another automount point.
- XIn this example, it is assumed that the {\tt /usr} files are replicated on
- Xthree fileservers: {\tt fserv1}, {\tt fserv2} and {\tt fserv3}.
- XFor any references other than to {\tt local}
- Xand {\tt share} one of the servers is used and a symbolic link to
- X{\tt \Var{autodir}/\Var{rhost}/export/exec/\Var{arch}/}{\em whatever}
- Xis returned once an appropriate filesystem has been mounted.
- X
- X\Chapter{Internals}
- X
- X\Section{Log Messages}
- X
- XIn the following sections a brief explanation is given of some
- Xof the log messages made by \amd.
- XWhere the message is in {\tt typewriter} font, it corresponds
- Xexactly to the message produced by \amd. Words in {\em italic}
- Xare replaced by an appropriate string. Variables, \Var{{\em var}},
- Xindicate that the value of the appropriate variable is output.
- X
- XLog messages are either sent direct to a file,
- Xor logged via the {\bf syslog}(3) mechanism.
- XMessages are logged with facility {\tt LOG\_DAEMON} when using {\bf syslog}(3).
- XIn either case, entries in the file are of the form:
- X\begin{quote}
- X{\em Unix-date}\ \ {\em hostname} {\tt amd[}{\em pid}{\tt ]}\ \ {\em message}
- X\end{quote}
- X
- X\Subsection{Fatal errors}
- X\Amd\ attempts to deal with unusual events.
- XWhenever it is not possible to deal with such an error, \Amd\ will
- Xlog an appropriate message and, if it cannot possibly continue, will
- Xeither exit or abort.
- XThese messages are selected by {\tt -x~fatal} on the command line.
- XWhen {\bf syslog}(3) is being used, they are logged with
- Xlevel {\tt LOG\_FATAL}.
- XEven if \amd\ continues to operate it is likely to remain in a precarious
- Xstate and should be restarted at the earliest opportunity.
- X
- X\begin{description}
- X\item [\tt Attempting to inherit not-a-filesystem]\mbox{}\\
- XThe prototype mount point created during a filesystem restart
- Xdid not contain a reference to the restarted filesystem.
- XThis is a ``should never happen'' error.
- X
- X\item [\tt Can't bind to domain "{\em yp-domain}"]\mbox{}\\
- XA specific YP domain was requested on the command line, but no
- Xserver for that domain is available on the local net.
- X
- X\item [\tt Can't determine IP address of this host ({\em hostname})]\mbox{}\\
- XWhen \amd\ starts it determines its own IP address.
- XIf this lookup fails then \amd\ cannot continue.
- XThe hostname it looks up is that obtained returned by
- X{\bf gethostname}(2) system call.
- X
- X\item [\tt Can't find root file handle for {\em automount point}]\mbox{}\\
- X\Amd\ creates its own file handles for the automount points.
- XWhen it mounts itself as a server, it must pass these
- Xfile handles to the local kernel.
- XIf the filehandle is not obtainable the mount point is ignored.
- XThis is a ``should never happen'' error.
- X
- X\item [\tt Must be root to mount filesystems (euid = {\em euid})]\mbox{}\\
- XTo prevent embarrassment, \amd\ makes sure it has appropriate
- Xsystem priviledges. This amounts to having an euid of 0.
- XThe check is made after argument processing complete to
- Xgive non-root users a chance to access the ``-v'' option.
- X
- X\item [\tt No work to do - quitting]\mbox{}\\
- XNo automount points were given on the command line and so
- Xthere is no work to do.
- X
- X\item [\tt Out of memory in realloc]\mbox{}\\
- XWhile attempting to realloc some memory, the memory space
- Xavailable to \amd\ was exhausted. This is an unrecoverable
- Xerror.
- X
- X\item [\tt Out of memory]\mbox{}\\
- XWhile attempting to maalloc some memory, the memory space
- Xavailable to \amd\ was exhausted. This is an unrecoverable
- Xerror.
- X
- X\item [\tt cannot create rpc/udp service]\mbox{}\\
- XEither the NFS or AMQ endpoint could not be created.
- X
- X\item [\tt gethostname:\ {\em description}]\mbox{}\\
- XThe {\bf gethostname}(2) system call failed during startup.
- X
- X\item [\tt host name is not set]\mbox{}\\
- XThe {\bf gethostname}(2) system call returned a zero length
- Xhost name.
- XThis can happen if \amd\ is started in single user mode just
- Xafter booting the system.
- X
- X\item [\tt ifs\_match called!]\mbox{}\\
- XAn internal error occurred while restarting a pre-mounted
- Xfilesystem.
- XThis is a ``should never happen'' error.
- X
- X\item [\tt mount\_afs:\ {\em description}]\mbox{}\\
- XAn error occured while \amd\ was mounting itself.
- X
- X\item [\tt run\_rpc failed]\mbox{}\\
- XSomehow the main NFS server loop failed.
- XThis is a ``should never happen'' error.
- X
- X\item [\tt unable to free rpc arguments in amqprog\_1]\mbox{}\\
- XThe incoming arguments to the AMQ server could not be
- Xfree'ed.
- X
- X\item [\tt unable to free rpc arguments in nfs\_program\_1]\mbox{}\\
- XThe incoming arguments to the NFS server could not be
- Xfree'ed.
- X
- X\item [\tt unable to register (AMQ\_PROGRAM, AMQ\_VERSION, udp)]\mbox{}\\
- XThe AMQ server could not be registered with the local portmapper
- Xor the internal RPC dispatcher.
- X
- X\item [\tt unable to register (NFS\_PROGRAM, NFS\_VERSION, 0)]\mbox{}\\
- XThe NFS server could not be registered with the internal RPC dispatcher.
- X
- X\end{description}
- X
- X\Subsection{Info messages}
- X\Amd\ generates information messages to record state changes.
- XThese messages are selected by {\tt -x~info} on the command line.
- XWhen {\bf syslog}(3) is being used, they are logged with
- Xlevel {\tt LOG\_INFO}.
- XThe messages listed below can be generated
- Xand are in a format suitable for simple statistical analysis.
- X``{\em mount-info}'' is the string that is displayed by \amq\ in its mount
- Xinformation column and placed in the system mount table.
- X\begin{description}
- X\item[\tt mount of "\Var{path}" on \Var{fs} timed out]\mbox{}\\
- XAttempts to mount a filesystem for the given automount point have failed
- Xto complete within 30 seconds.
- X
- X\item[\tt "\Var{path}" forcibly timed out]\mbox{}\\
- XAn automount point has been timed out by the \amq\ command.
- X
- X\item[\tt restarting {\em mount-info} on \Var{fs}]\mbox{}\\
- XA pre-mounted file system has been noted.
- X
- X\item[\tt "\Var{path}" has timed out]\mbox{}\\
- XNo access to the automount point has been made within the timeout period.
- X
- X\item[\tt file server \Var{rhost} is down - timeout of "\Var{path}" ignored]\mbox{}\\
- XAn automount point has timed out, but the corresponding file server is known to be down.
- XThis message is only produced once for each mount point for which the server is down.
- X
- X\item[\tt Re-synchronizing cache for map \Var{map}]\mbox{}\\
- XThe named map has been modified and the internal cache is being re-synchronized.
- X
- X\item[\tt Filehandle denied for "\Var{rhost}:\Var{rfs}"]\mbox{}\\
- XThe mount daemon refused to return a file handle for the requested filesystem.
- X
- X\item[\tt Filehandle error for \Var{path}:\Var{rfs}":\ {\em description}]\mbox{}\\
- XThe mount daemon gave some other error for the requested filesystem.
- X
- X\item[\tt {\em mount-info} restarted fstype \Var{type} on \Var{fs}]\mbox{}\\
- X\Amd\ is using a pre-mounted filesystem to satisfy a mount request.
- X
- X\item[\tt file server \Var{rhost} type nfs starts up]\mbox{}\\
- XA new \NFS\ file server has been referenced and is known to be up.
- X
- X\item[\tt file server \Var{rhost} type nfs starts down]\mbox{}\\
- XA new \NFS\ file server has been referenced and is known to be down.
- X
- X\item[\tt file server \Var{rhost} type nfs is up]\mbox{}\\
- XAn \NFS\ file server that was previously down is now up.
- X
- X\item[\tt file server \Var{rhost} type nfs is down]\mbox{}\\
- XAn \NFS\ file server that was previously up is now down.
- X
- X\item[\tt Finishing with status {\em exit-status}]\mbox{}\\
- X\Amd\ is about to exit with the given exit status.
- X
- X\item[\tt {\em mount-info} mounted fstype \Var{type} on \Var{fs}]\mbox{}\\
- XA new file system has been mounted.
- X
- X\item[\tt {\em mount-info} unmounted fstype \Var{type} from \Var{fs}]\mbox{}\\
- XA file system has been unmounted.
- X
- X\item[\tt {\em mount-info} unmounted fstype \Var{type} from \Var{fs} link \Var{fs}/\Var{sublink}]\mbox{}\\
- XA file system of which only a sub-directory was in use has been unmounted.
- X
- X\end{description}
- X
- X\Chapter*{Acknowledgements \& Trademarks}
- X\addcontentsline{toc}{chapter}{Acknowledgements \& Trademarks}
- XThanks to the Formal Methods Group at Imperial College for
- Xsuffering patiently while \amd\ was being developed on their machines.
- X
- XThanks to the many people who have helped with the development
- Xof \amd\, especially Piete Brooks at the Cambridge University Computing Lab for
- Xmany hours of testing, experimentation and discussion and who also provided
- Xthe RISC iX and Ultrix ports.
- X
- X\begin{trivlist}
- X\item[{\sf DEC}, {\sf VAX} and {\sf Ultrix}]
- X are registered trademarks of Digital Equipment Corporation.
- X\item[{\sf IBM}]
- Xis a registered trademark of International Business Machines Corporation.
- X\item[{\sf Sun}, {\sf NFS} and {\sf SunOS}]
- Xare registered trademarks of Sun Microsystems, Inc.
- X\item[{\sf Unix}]
- Xis a registered trademark of AT\&T Bell Laboratories in
- Xthe USA and other countries.
- X\item[{\sf UTX}]
- Xis a registered trademark of Gould, Inc.
- X\end{trivlist}
- X
- X\bibliographystyle{ieeetr}
- X\bibliography{amd}
- X
- X\addcontentsline{toc}{chapter}{Bibliography}
- X
- X%\newpage
- X%\input index
- X
- X\end{document}
- END_OF_FILE
- if test 28104 -ne `wc -c <'doc/amd.tex.2'`; then
- echo shar: \"'doc/amd.tex.2'\" unpacked with wrong size!
- fi
- # end of 'doc/amd.tex.2'
- fi
- echo shar: End of archive 11 \(of 13\).
- cp /dev/null ark11isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 13 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
- exit 0 # Just in case...
-