am-utils.texi revision 131702
1\input texinfo @c -*-texinfo-*- 2@c 3@c Copyright (c) 1997-2004 Erez Zadok 4@c Copyright (c) 1989 Jan-Simon Pendry 5@c Copyright (c) 1989 Imperial College of Science, Technology & Medicine 6@c Copyright (c) 1989 The Regents of the University of California. 7@c All rights reserved. 8@c 9@c This code is derived from software contributed to Berkeley by 10@c Jan-Simon Pendry at Imperial College, London. 11@c 12@c Redistribution and use in source and binary forms, with or without 13@c modification, are permitted provided that the following conditions 14@c are met: 15@c 1. Redistributions of source code must retain the above copyright 16@c notice, this list of conditions and the following disclaimer. 17@c 2. Redistributions in binary form must reproduce the above copyright 18@c notice, this list of conditions and the following disclaimer in the 19@c documentation and/or other materials provided with the distribution. 20@c 3. All advertising materials mentioning features or use of this software 21@c must display the following acknowledgment: 22@c This product includes software developed by the University of 23@c California, Berkeley and its contributors. 24@c 4. Neither the name of the University nor the names of its contributors 25@c may be used to endorse or promote products derived from this software 26@c without specific prior written permission. 27@c 28@c THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 29@c ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 30@c IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 31@c ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 32@c FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33@c DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 34@c OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 35@c HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 36@c LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 37@c OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 38@c 39@c %W% (Berkeley) %G% 40@c 41@c $Id: am-utils.texi,v 1.21.2.32 2004/01/21 04:04:58 ib42 Exp $ 42@c 43@setfilename am-utils.info 44 45@include version.texi 46 47@c info directory entry 48@direntry 49* Am-utils: (am-utils). The Amd automounter suite of utilities 50@end direntry 51 52@settitle Am-utils (4.4BSD Automounter Utilities) 53@setchapternewpage odd 54 55@titlepage 56@title Am-utils (4.4BSD Automounter Utilities) 57@subtitle For version @value{VERSION}, @value{UPDATED} 58 59@author Erez Zadok 60(Originally by Jan-Simon Pendry and Nick Williams) 61 62@page 63Copyright @copyright{} 1997-2004 Erez Zadok 64@* 65Copyright @copyright{} 1989 Jan-Simon Pendry 66@* 67Copyright @copyright{} 1989 Imperial College of Science, Technology & Medicine 68@* 69Copyright @copyright{} 1989 The Regents of the University of California. 70@sp 71All Rights Reserved. 72@vskip 1ex 73Permission to copy this document, or any portion of it, as 74necessary for use of this software is granted provided this 75copyright notice and statement of permission are included. 76@end titlepage 77@page 78 79@c Define a new index for options. 80@syncodeindex pg cp 81@syncodeindex vr cp 82 83@ifinfo 84 85@c ################################################################ 86@node Top, License, , (DIR) 87 88@b{Am-utils (4.4BSD Automounter Utilities) User Manual} 89@* 90For version @value{VERSION}, @value{UPDATED} 91 92@b{Erez Zadok} 93@* 94(Originally by Jan-Simon Pendry and Nick Williams) 95 96Copyright @copyright{} 1997-2004 Erez Zadok 97@* 98Copyright @copyright{} 1989 Jan-Simon Pendry 99@* 100Copyright @copyright{} 1989 Imperial College of Science, Technology & Medicine 101@* 102Copyright @copyright{} 1989 The Regents of the University of California. 103@* 104All Rights Reserved. 105 106Permission to copy this document, or any portion of it, as 107necessary for use of this software is granted provided this 108copyright notice and statement of permission are included. 109 110Am-utils is the 4.4BSD Automounter Tool Suite, which includes the Amd 111automounter, the Amq query and control program, the Hlfsd daemon, and 112other tools. This Info file describes how to use and understand the 113tools within Am-utils. 114@end ifinfo 115 116@menu 117* License:: Explains the terms and conditions for using 118 and distributing Am-utils. 119* Distrib:: How to get the latest Am-utils distribution. 120* Intro:: An introduction to Automounting concepts. 121* History:: History of am-utils' development. 122* Overview:: An overview of Amd. 123* Supported Platforms:: Machines and Systems supported by Amd. 124* Mount Maps:: Details of mount maps 125* Amd Command Line Options:: All the Amd command line options explained. 126* Filesystem Types:: The different mount types supported by Amd. 127* Amd Configuration File:: The amd.conf file syntax and meaning. 128* Run-time Administration:: How to start, stop and control Amd. 129* FSinfo:: The FSinfo filesystem management tool. 130* Hlfsd:: The Home-Link Filesystem server. 131* Assorted Tools:: Other tools which come with am-utils. 132* Examples:: Some examples showing how Amd might be used. 133* Internals:: Implementation details. 134* Acknowledgments & Trademarks:: Legal Notes 135 136Indexes 137* Index:: An item for each concept. 138@end menu 139 140@iftex 141@unnumbered Preface 142 143This manual documents the use of the 4.4BSD automounter tool suite, 144which includes @i{Amd}, @i{Amq}, @i{Hlfsd}, and other programs. This is 145primarily a reference manual. While no tutorial exists, there are 146examples available. @xref{Examples}. 147 148This manual comes in two forms: the published form and the Info form. 149The Info form is for on-line perusal with the INFO program which is 150distributed along with GNU texinfo package (a version of which is 151available for GNU Emacs).@footnote{GNU packages can be found in 152@url{ftp://ftp.gnu.org/pub/gnu/}.} Both forms contain substantially 153the same text and are generated from a common source file, which is 154distributed with the @i{Am-utils} source. 155@end iftex 156 157@c ################################################################ 158@node License, Distrib, Top, Top 159@unnumbered License 160@cindex License Information 161 162@i{Am-utils} is not in the public domain; it is copyrighted and there are 163restrictions on its distribution. 164 165Redistribution and use in source and binary forms, with or without 166modification, are permitted provided that the following conditions are 167met: 168 169@enumerate 170 171@item 172Redistributions of source code must retain the above copyright notice, 173this list of conditions and the following disclaimer. 174 175@item 176Redistributions in binary form must reproduce the above copyright 177notice, this list of conditions and the following disclaimer in the 178documentation and/or other materials provided with the distribution. 179 180@item 181All advertising materials mentioning features or use of this software 182must display the following acknowledgment: 183 184@cartouche 185``This product includes software developed by the University of 186California, Berkeley and its contributors, as well as the Trustees of 187Columbia University.'' 188@end cartouche 189 190@item 191Neither the name of the University nor the names of its contributors may 192be used to endorse or promote products derived from this software 193without specific prior written permission. 194 195@end enumerate 196 197THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 198ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 199IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 200PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS 201BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 202CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 203SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 204INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 205CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 206ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 207THE POSSIBILITY OF SUCH DAMAGE. 208 209@c ################################################################ 210@node Distrib, Intro, License, Top 211@unnumbered Source Distribution 212@cindex Source code distribution 213@cindex Obtaining the source code 214 215The @i{Am-utils} home page is located in 216@example 217@url{http://www.am-utils.org/} 218@end example 219 220You can get the latest distribution version of @i{Am-utils} from 221@example 222@url{ftp://ftp.am-utils.org/pub/am-utils/am-utils.tar.gz} 223@end example 224 225Additional alpha, beta, and release distributions are available in 226@example 227@url{ftp://ftp.am-utils.org/pub/am-utils/}. 228@end example 229 230Revision 5.2 was part of the 4.3BSD Reno distribution. 231 232Revision 5.3bsdnet, a late alpha version of 5.3, was part 233of the BSD network version 2 distribution 234 235Revision 6.0 was made independently by 236@email{ezk@@cs.columbia.edu,Erez Zadok} at the Computer Science 237Department of @uref{http://www.cs.columbia.edu/,Columbia University}, 238as part of his 239@uref{http://www.cs.columbia.edu/~ezk/research/tp/thesis_proposal.html,PhD 240thesis work}. Am-utils (especially version 6.1) continues to be 241developed and maintained at the 242@uref{http://www.cs.sunysb.edu/,Computer Science Department} of 243@uref{http://www.stonybrook.edu/,Stony Brook University}, as a service 244to the user community. 245 246@xref{History}, for more details. 247 248@unnumberedsec Bug Reports 249@cindex Bug reports 250 251Before reporting a bug, see if it is a known one in the 252@uref{http://www.am-utils.org/BUGS.txt,bugs} file. 253Send all bug reports to @email{am-utils@@am-utils.org} 254quoting the details of the release and your configuration. These can be 255obtained by running the command @samp{amd -v}. It would greatly help if 256you could provide a reproducible procedure for detecting the bug you are 257reporting. 258 259Providing working patches is highly encouraged. Every patch 260incorporated, however small, will get its author an honorable mention in 261the @uref{http://www.am-utils.org/AUTHORS.txt,authors 262file}. 263 264@unnumberedsec Mailing Lists 265@cindex Mailing lists 266 267There are several mailing lists for people interested in keeping up-to-date 268with developments. 269 270@c ############### 271 272@enumerate 273 274@item 275The users mailing list, @samp{am-utils} is for 276 277@itemize @minus 278@item 279announcements of alpha and beta releases of am-utils 280@item 281reporting of bugs and patches 282@item 283discussions of new features for am-utils 284@item 285implementation and porting issues 286@end itemize 287 288To subscribe, visit 289@url{http://lists.am-utils.org/mailman/listinfo/am-utils}. After 290subscribing, you can post a message to this list at 291@email{am-utils@@am-utils.org}. To avoid as much spam as 292possible, only subscribers to this list may post to it. 293 294Subscribers of @samp{am-utils} are most helpful if they have the time 295and resources to test new and development versions of amd, on as many 296different platforms as possible. They should also be prepared to 297learn and use the GNU Autoconf, Automake, and Libtool packages, as 298needed; and of course, become familiar with the complex code in the 299am-utils package. In other words, subscribers on this list should 300hopefully be able to contribute meaningfully to the development of 301amd. 302 303Note that this @samp{am-utils} list used to be called @samp{amd-dev} 304before January 1st, 2004. Please use the new name, @samp{am-utils}. 305 306@item 307The announcements mailing list, @samp{am-utils-announce} is for 308announcements only (mostly new releases). To subscribe, visit 309@url{http://lists.am-utils.org/mailman/listinfo/am-utils-announce}. 310This list is read-only: only am-utils developers may post to it. 311 312@item 313We distribute nightly CVS snapshots in 314@url{ftp://ftp.am-utils.org/pub/am-utils/snapshots/daily/}. If you 315like to get email notices of commits to the am-utils CVS repository, 316subscribe to the CVS logs mailing list, @samp{am-utils-cvs} at 317@url{http://lists.am-utils.org/mailman/listinfo/am-utils-cvs}. 318 319@item 320The older list which was used to user discussions, @samp{amd-workers}, 321is defunct as of January 2004. (Its last address was 322@email{amd-workers@@majordomo.glue.umd.edu}.) Don't use 323@samp{amd-workers}: use the newer, more active @samp{am-utils} list. 324 325@item 326For completeness, there's a developers-only closed list called 327@samp{am-utils-developers@@am-utils.org}. 328 329@end enumerate 330 331@unnumberedsec Am-utils Book 332@cindex Am-utils book 333@cindex Amd book 334@cindex Automounter book 335@cindex book 336 337@email{ezk@@cs.sunysb.edu,Erez Zadok} wrote a 338@uref{http://www.fsl.cs.sunysb.edu/docs/amd-book/,book}, titled @i{Linux NFS and 339Automounter Administration}, ISBN 0-7821-2739-8, (Sybex, 2001). The 340book is full of details and examples that go beyond what this manual 341has. The book also covers NFS in great detail. Although the book is 342geared toward Linux users, it is general enough for any Unix 343administrator and contains specific sections for non-Linux systems. 344 345@c ################################################################ 346@node Intro, History, Distrib, Top 347@unnumbered Introduction 348@cindex Introduction 349 350An @dfn{automounter} maintains a cache of mounted filesystems. 351Filesystems are mounted on demand when they are first referenced, 352and unmounted after a period of inactivity. 353 354@i{Amd} may be used as a replacement for Sun's automounter. The choice 355of which filesystem to mount can be controlled dynamically with 356@dfn{selectors}. Selectors allow decisions of the form ``hostname is 357@var{this},'' or ``architecture is not @var{that}.'' Selectors may be 358combined arbitrarily. @i{Amd} also supports a variety of filesystem 359types, including NFS, UFS and the novel @dfn{program} filesystem. The 360combination of selectors and multiple filesystem types allows identical 361configuration files to be used on all machines thus reducing the 362administrative overhead. 363 364@i{Amd} ensures that it will not hang if a remote server goes down. 365Moreover, @i{Amd} can determine when a remote server has become 366inaccessible and then mount replacement filesystems as and when they 367become available. 368 369@i{Amd} contains no proprietary source code and has been ported to 370numerous flavors of Unix. 371 372@c ################################################################ 373@node History, Overview, Intro, Top 374@unnumbered History 375@cindex History 376 377The @i{Amd} package has been without an official maintainer since 1992. 378Several people have stepped in to maintain it unofficially. Most 379notable were the `upl' (Unofficial Patch Level) releases of @i{Amd}, 380created by me (@email{ezk@@cs.columbia.edu,Erez Zadok}), and available from 381@url{ftp://ftp.am-utils.org/pub/amd/}. The last such unofficial 382release was `upl102'. 383 384Through the process of patching and aging, it was becoming more and more 385apparent that @i{Amd} was in much need of revitalizing. Maintaining 386@i{Amd} had become a difficult task. I took it upon myself to cleanup 387the code, so that it would be easier to port to new platforms, add new 388features, keep up with the many new feature requests, and deal with the 389never ending stream of bug reports. 390 391I have been working on such a release of @i{Amd} on and off since 392January of 1996. The new suite of tools is currently named "am-utils" 393(AutoMounter Utilities), in line with GNU naming conventions, befitting 394the contents of the package. In October of 1996 I had received enough 395offers to help me with this task that I decided to make a mailing list 396for this group of people. Around the same time, @i{Amd} had become a 397necessary part of my PhD thesis work, resulting in more work performed 398on am-utils. 399 400Am-utils version 6.0 was numbered with a major new release number to 401distinguish it from the last official release of @i{Amd} (5.x). Many 402new features have been added such as a GNU @code{configure} system, NFS 403Version 3, a run-time configuration file (`amd.conf'), many new ports, 404more scripts and programs, as well as numerous bug fixes. Another 405reason for the new major release number was to alert users of am-utils 406that user-visible interfaces may have changed. In order to make @i{Amd} 407work well for the next 10 years, and be easier to maintain, it was 408necessary to remove old or unused features, change various syntax files, 409etc. However, great care was taken to ensure the maximum possible 410backwards compatibility. 411 412@c ################################################################ 413@node Overview, Supported Platforms, History, Top 414@chapter Overview 415 416@i{Amd} maintains a cache of mounted filesystems. Filesystems are 417@dfn{demand-mounted} when they are first referenced, and unmounted after 418a period of inactivity. @i{Amd} may be used as a replacement for Sun's 419@b{automount}(8) program. It contains no proprietary source code and 420has been ported to numerous flavors of Unix. @xref{Supported 421Platforms}.@refill 422 423@i{Amd} was designed as the basis for experimenting with filesystem 424layout and management. Although @i{Amd} has many direct applications it 425is loaded with additional features which have little practical use. At 426some point the infrequently used components may be removed to streamline 427the production system. 428 429@c @i{Amd} supports the notion of @dfn{replicated} filesystems by evaluating 430@c each member of a list of possible filesystem locations in parallel. 431@c @i{Amd} checks that each cached mapping remains valid. Should a mapping be 432@c lost -- such as happens when a fileserver goes down -- @i{Amd} automatically 433@c selects a replacement should one be available. 434@c 435@menu 436* Fundamentals:: 437* Filesystems and Volumes:: 438* Volume Naming:: 439* Volume Binding:: 440* Operational Principles:: 441* Mounting a Volume:: 442* Automatic Unmounting:: 443* Keep-alives:: 444* Non-blocking Operation:: 445@end menu 446 447@node Fundamentals, Filesystems and Volumes, Overview, Overview 448@comment node-name, next, previous, up 449@section Fundamentals 450@cindex Automounter fundamentals 451 452The fundamental concept behind @i{Amd} is the ability to separate the 453name used to refer to a file from the name used to refer to its physical 454storage location. This allows the same files to be accessed with the 455same name regardless of where in the network the name is used. This is 456very different from placing @file{/n/hostname} in front of the pathname 457since that includes location dependent information which may change if 458files are moved to another machine. 459 460By placing the required mappings in a centrally administered database, 461filesystems can be re-organized without requiring changes to 462configuration files, shell scripts and so on. 463 464@node Filesystems and Volumes, Volume Naming, Fundamentals, Overview 465@comment node-name, next, previous, up 466@section Filesystems and Volumes 467@cindex Filesystem 468@cindex Volume 469@cindex Fileserver 470@cindex sublink 471 472@i{Amd} views the world as a set of fileservers, each containing one or 473more filesystems where each filesystem contains one or more 474@dfn{volumes}. Here the term @dfn{volume} is used to refer to a 475coherent set of files such as a user's home directory or a @TeX{} 476distribution.@refill 477 478In order to access the contents of a volume, @i{Amd} must be told in 479which filesystem the volume resides and which host owns the filesystem. 480By default the host is assumed to be local and the volume is assumed to 481be the entire filesystem. If a filesystem contains more than one 482volume, then a @dfn{sublink} is used to refer to the sub-directory 483within the filesystem where the volume can be found. 484 485@node Volume Naming, Volume Binding, Filesystems and Volumes, Overview 486@comment node-name, next, previous, up 487@section Volume Naming 488@cindex Volume names 489@cindex Network-wide naming 490@cindex Replicated volumes 491@cindex Duplicated volumes 492@cindex Replacement volumes 493 494Volume names are defined to be unique across the entire network. A 495volume name is the pathname to the volume's root as known by the users 496of that volume. Since this name uniquely identifies the volume 497contents, all volumes can be named and accessed from each host, subject 498to administrative controls. 499 500Volumes may be replicated or duplicated. Replicated volumes contain 501identical copies of the same data and reside at two or more locations in 502the network. Each of the replicated volumes can be used 503interchangeably. Duplicated volumes each have the same name but contain 504different, though functionally identical, data. For example, 505@samp{/vol/tex} might be the name of a @TeX{} distribution which varied 506for each machine architecture.@refill 507 508@i{Amd} provides facilities to take advantage of both replicated and 509duplicated volumes. Configuration options allow a single set of 510configuration data to be shared across an entire network by taking 511advantage of replicated and duplicated volumes. 512 513@i{Amd} can take advantage of replacement volumes by mounting them as 514required should an active fileserver become unavailable. 515 516@node Volume Binding, Operational Principles, Volume Naming, Overview 517@comment node-name, next, previous, up 518@section Volume Binding 519@cindex Volume binding 520@cindex Unix namespace 521@cindex Namespace 522@cindex Binding names to filesystems 523 524Unix implements a namespace of hierarchically mounted filesystems. Two 525forms of binding between names and files are provided. A @dfn{hard 526link} completes the binding when the name is added to the filesystem. A 527@dfn{soft link} delays the binding until the name is accessed. An 528@dfn{automounter} adds a further form in which the binding of name to 529filesystem is delayed until the name is accessed.@refill 530 531The target volume, in its general form, is a tuple (host, filesystem, 532sublink) which can be used to name the physical location of any volume 533in the network. 534 535When a target is referenced, @i{Amd} ignores the sublink element and 536determines whether the required filesystem is already mounted. This is 537done by computing the local mount point for the filesystem and checking 538for an existing filesystem mounted at the same place. If such a 539filesystem already exists then it is assumed to be functionally 540identical to the target filesystem. By default there is a one-to-one 541mapping between the pair (host, filesystem) and the local mount point so 542this assumption is valid. 543 544@node Operational Principles, Mounting a Volume, Volume Binding, Overview 545@comment node-name, next, previous, up 546@section Operational Principles 547@cindex Operational principles 548 549@i{Amd} operates by introducing new mount points into the namespace. 550These are called @dfn{automount} points. The kernel sees these 551automount points as NFS filesystems being served by @i{Amd}. Having 552attached itself to the namespace, @i{Amd} is now able to control the 553view the rest of the system has of those mount points. RPC calls are 554received from the kernel one at a time. 555 556When a @dfn{lookup} call is received @i{Amd} checks whether the name is 557already known. If it is not, the required volume is mounted. A 558symbolic link pointing to the volume root is then returned. Once the 559symbolic link is returned, the kernel will send all other requests 560direct to the mounted filesystem. 561 562If a volume is not yet mounted, @i{Amd} consults a configuration 563@dfn{mount-map} corresponding to the automount point. @i{Amd} then 564makes a runtime decision on what and where to mount a filesystem based 565on the information obtained from the map. 566 567@i{Amd} does not implement all the NFS requests; only those relevant 568to name binding such as @dfn{lookup}, @dfn{readlink} and @dfn{readdir}. 569Some other calls are also implemented but most simply return an error 570code; for example @dfn{mkdir} always returns ``read-only filesystem''. 571 572@node Mounting a Volume, Automatic Unmounting, Operational Principles, Overview 573@comment node-name, next, previous, up 574@section Mounting a Volume 575@cindex Mounting a volume 576@cindex Location lists 577@cindex Alternate locations 578@cindex Mount retries 579@cindex Background mounts 580 581Each automount point has a corresponding mount map. The mount map 582contains a list of key--value pairs. The key is the name of the volume 583to be mounted. The value is a list of locations describing where the 584filesystem is stored in the network. In the source for the map the 585value would look like 586 587@display 588location1 location2 @dots{} locationN 589@end display 590 591@i{Amd} examines each location in turn. Each location may contain 592@dfn{selectors} which control whether @i{Amd} can use that location. 593For example, the location may be restricted to use by certain hosts. 594Those locations which cannot be used are ignored. 595 596@i{Amd} attempts to mount the filesystem described by each remaining 597location until a mount succeeds or @i{Amd} can no longer proceed. The 598latter can occur in three ways: 599 600@itemize @bullet 601@item 602If none of the locations could be used, or if all of the locations 603caused an error, then the last error is returned. 604 605@item 606If a location could be used but was being mounted in the background then 607@i{Amd} marks that mount as being ``in progress'' and continues with 608the next request; no reply is sent to the kernel. 609 610@item 611Lastly, one or more of the mounts may have been @dfn{deferred}. A mount 612is deferred if extra information is required before the mount can 613proceed. When the information becomes available the mount will take 614place, but in the mean time no reply is sent to the kernel. If the 615mount is deferred, @i{Amd} continues to try any remaining locations. 616@end itemize 617 618Once a volume has been mounted, @i{Amd} establishes a @dfn{volume 619mapping} which is used to satisfy subsequent requests.@refill 620 621@node Automatic Unmounting, Keep-alives, Mounting a Volume, Overview 622@comment node-name, next, previous, up 623@section Automatic Unmounting 624 625To avoid an ever increasing number of filesystem mounts, @i{Amd} removes 626volume mappings which have not been used recently. A time-to-live 627interval is associated with each mapping and when that expires the 628mapping is removed. When the last reference to a filesystem is removed, 629that filesystem is unmounted. If the unmount fails, for example the 630filesystem is still busy, the mapping is re-instated and its 631time-to-live interval is extended. The global default for this grace 632period is controlled by the @code{-w} command-line option (@pxref{-w 633Option, -w}) or the @i{amd.conf} parameter @samp{dismount_interval} 634(@pxref{dismount_interval Parameter}). It is also possible to set this 635value on a per-mount basis (@pxref{opts Option, opts, opts}). 636 637Filesystems can be forcefully timed out using the @i{Amq} command. 638@xref{Run-time Administration}. 639 640@node Keep-alives, Non-blocking Operation, Automatic Unmounting, Overview 641@comment node-name, next, previous, up 642@section Keep-alives 643@cindex Keep-alives 644@cindex Server crashes 645@cindex NFS ping 646 647Use of some filesystem types requires the presence of a server on 648another machine. If a machine crashes then it is of no concern to 649processes on that machine that the filesystem is unavailable. However, 650to processes on a remote host using that machine as a fileserver this 651event is important. This situation is most widely recognized when an 652NFS server crashes and the behavior observed on client machines is that 653more and more processes hang. In order to provide the possibility of 654recovery, @i{Amd} implements a @dfn{keep-alive} interval timer for some 655filesystem types. Currently only NFS makes use of this service. 656 657The basis of the NFS keep-alive implementation is the observation that 658most sites maintain replicated copies of common system data such as 659manual pages, most or all programs, system source code and so on. If 660one of those servers goes down it would be reasonable to mount one of 661the others as a replacement. 662 663The first part of the process is to keep track of which fileservers are 664up and which are down. @i{Amd} does this by sending RPC requests to the 665servers' NFS @code{NullProc} and checking whether a reply is returned. 666While the server state is uncertain the requests are re-transmitted at 667three second intervals and if no reply is received after four attempts 668the server is marked down. If a reply is received the fileserver is 669marked up and stays in that state for 30 seconds at which time another 670NFS ping is sent. 671 672Once a fileserver is marked down, requests continue to be sent every 30 673seconds in order to determine when the fileserver comes back up. During 674this time any reference through @i{Amd} to the filesystems on that 675server fail with the error ``Operation would block''. If a replacement 676volume is available then it will be mounted, otherwise the error is 677returned to the user. 678 679@c @i{Amd} keeps track of which servers are up and which are down. 680@c It does this by sending RPC requests to the servers' NFS {\sc NullProc} and 681@c checking whether a reply is returned. If no replies are received after a 682@c short period, @i{Amd} marks the fileserver @dfn{down}. 683@c RPC requests continue to be sent so that it will notice when a fileserver 684@c comes back up. 685@c ICMP echo packets \cite{rfc:icmp} are not used because it is the availability 686@c of the NFS service that is important, not the existence of a base kernel. 687@c Whenever a reference to a fileserver which is down is made via @i{Amd}, an alternate 688@c filesystem is mounted if one is available. 689@c 690Although this action does not protect user files, which are unique on 691the network, or processes which do not access files via @i{Amd} or 692already have open files on the hung filesystem, it can prevent most new 693processes from hanging. 694@c 695@c With a suitable combination of filesystem management and mount-maps, 696@c machines can be protected against most server downtime. This can be 697@c enhanced by allocating boot-servers dynamically which allows a diskless 698@c workstation to be quickly restarted if necessary. Once the root filesystem 699@c is mounted, @i{Amd} can be started and allowed to mount the remainder of 700@c the filesystem from whichever fileservers are available. 701 702@node Non-blocking Operation, , Keep-alives, Overview 703@comment node-name, next, previous, up 704@section Non-blocking Operation 705@cindex Non-blocking operation 706@cindex Multiple-threaded server 707@cindex RPC retries 708 709Since there is only one instance of @i{Amd} for each automount point, 710and usually only one instance on each machine, it is important that it 711is always available to service kernel calls. @i{Amd} goes to great 712lengths to ensure that it does not block in a system call. As a last 713resort @i{Amd} will fork before it attempts a system call that may block 714indefinitely, such as mounting an NFS filesystem. Other tasks such as 715obtaining filehandle information for an NFS filesystem, are done using a 716purpose built non-blocking RPC library which is integrated with 717@i{Amd}'s task scheduler. This library is also used to implement NFS 718keep-alives (@pxref{Keep-alives}). 719 720Whenever a mount is deferred or backgrounded, @i{Amd} must wait for it 721to complete before replying to the kernel. However, this would cause 722@i{Amd} to block waiting for a reply to be constructed. Rather than do 723this, @i{Amd} simply @dfn{drops} the call under the assumption that the 724kernel RPC mechanism will automatically retry the request. 725 726@c ################################################################ 727@node Supported Platforms, Mount Maps, Overview, Top 728@comment node-name, next, previous, up 729@chapter Supported Platforms 730@cindex Supported Platforms 731@cindex shared libraries 732@cindex NFS V.3 support 733 734@i{Am-utils} has been ported to a wide variety of machines and operating 735systems. @i{Am-utils}'s code works for little-endian and big-endian 736machines, as well as 32 bit and 64 bit architectures. Furthermore, when 737@i{Am-utils} ports to an Operating System on one architecture, it is generally 738readily portable to the same Operating System on all platforms on which 739it is available. 740 741The table below lists those platforms supported by the latest release. 742The listing is based on the standard output from GNU's 743@code{config.guess} script. Since significant changes have been made to 744am-utils, not all systems listed here have been verified working for all 745features. 746 747@multitable {Auto-Configured System Name} {Config} {Compile} {Amd} {NFS3} {Shlib} {Hlfsd} 748@c @multitable @columnfractions .5 .1 .1 .1 .1 .1 749 750@item @b{Auto-Configured System Name} 751@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 752@tab @b{Config} @tab @b{Compile} @tab @b{Amd} @tab @b{NFS3} @tab @b{Shlib} @tab @b{Hlfsd} 753 754@item @b{alpha-dec-osf2.1} 755@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 756@tab yes @tab yes @tab yes @tab ? @tab no @tab ? 757 758@item @b{alpha-dec-osf4.0} 759@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 760@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 761 762@item @b{alpha-dec-osf4.0f} 763@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 764@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 765 766@item @b{alpha-dec-osf5.1} 767@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 768@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 769 770@item @b{alphaev5-unknown-linux-gnu} 771@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 772@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 773 774@item @b{alphaev5-unknown-linux-gnu-rh5.2} 775@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 776@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 777 778@item @b{alphaev6-dec-osf5.0} 779@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 780@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 781 782@item @b{hppa1.0-hp-hpux11.00} 783@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 784@tab yes @tab yes @tab yes @tab no @tab yes @tab yes 785 786@item @b{hppa1.1-hp-hpux10.10} 787@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 788@tab yes @tab yes @tab yes @tab n/a @tab no @tab ? 789 790@item @b{hppa1.1-hp-hpux10.20} 791@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 792@tab yes @tab yes @tab yes @tab no @tab no @tab ? 793 794@item @b{hppa1.1-hp-hpux11.00} 795@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 796@tab yes @tab yes @tab yes @tab UDP @tab yes @tab yes 797 798@item @b{hppa1.1-hp-hpux9.01} 799@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 800@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 801 802@item @b{hppa1.1-hp-hpux9.05} 803@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 804@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 805 806@item @b{hppa1.1-hp-hpux9.07} 807@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 808@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 809 810@item @b{hppa2.0w-hp-hpux11.00} 811@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 812@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 813 814@item @b{i386-pc-bsdi2.1} 815@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 816@tab yes @tab yes @tab yes @tab n/a @tab no @tab ? 817 818@item @b{i386-pc-bsdi3.0} 819@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 820@tab yes @tab yes @tab yes @tab yes @tab no @tab ? 821 822@item @b{i386-pc-bsdi3.1} 823@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 824@tab yes @tab yes @tab yes @tab yes @tab no @tab ? 825 826@item @b{i386-pc-bsdi4.0} 827@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 828@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 829 830@item @b{i386-pc-bsdi4.0.1} 831@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 832@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 833 834@item @b{i386-pc-bsdi4.1} 835@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 836@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 837 838@item @b{i386-pc-linux-rh7.2} 839@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 840@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes 841 842@item @b{i386-pc-solaris2.5.1} 843@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 844@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes 845 846@item @b{i386-pc-solaris2.6} 847@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 848@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes 849 850@item @b{i386-pc-solaris2.7} 851@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 852@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes 853 854@item @b{i386-unknown-freebsd2.1.0} 855@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 856@tab yes @tab yes @tab yes @tab n/a @tab ? @tab ? 857 858@item @b{i386-unknown-freebsd2.2.1} 859@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 860@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 861 862@item @b{i386-unknown-freebsd2.2.6} 863@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 864@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 865 866@item @b{i386-unknown-freebsd2.2.7} 867@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 868@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 869 870@item @b{i386-unknown-freebsd2.2.8} 871@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 872@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 873 874@item @b{i386-unknown-freebsd3.0} 875@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 876@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 877 878@item @b{i386-unknown-freebsd4.2} 879@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 880@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 881 882@item @b{i386-unknown-freebsd4.4} 883@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 884@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 885 886@item @b{i386-unknown-freebsd5.0} 887@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 888@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 889 890@item @b{i386-unknown-freebsdelf3.0} 891@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 892@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 893 894@item @b{i386-unknown-freebsdelf3.1} 895@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 896@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 897 898@item @b{i386-unknown-freebsdelf3.2} 899@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 900@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 901 902@item @b{i386-unknown-freebsdelf3.3} 903@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 904@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 905 906@item @b{i386-unknown-freebsdelf3.4} 907@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 908@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 909 910@item @b{i386-unknown-freebsdelf4.0} 911@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 912@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 913 914@item @b{i386-unknown-netbsd1.2.1} 915@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 916@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 917 918@item @b{i386-unknown-netbsd1.3} 919@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 920@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 921 922@item @b{i386-unknown-netbsd1.3.1} 923@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 924@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 925 926@item @b{i386-unknown-netbsd1.3.2} 927@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 928@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 929 930@item @b{i386-unknown-netbsd1.3.3} 931@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 932@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 933 934@item @b{i386-unknown-netbsd1.4} 935@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 936@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 937 938@item @b{i386-unknown-netbsd1.4.1} 939@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 940@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 941 942@item @b{i386-unknown-openbsd2.1} 943@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 944@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 945 946@item @b{i386-unknown-openbsd2.2} 947@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 948@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 949 950@item @b{i386-unknown-openbsd2.3} 951@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 952@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 953 954@item @b{i386-unknown-openbsd2.4} 955@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 956@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 957 958@item @b{i386-unknown-openbsd2.5} 959@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 960@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 961 962@item @b{i486-ncr-sysv4.3.03} 963@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 964@tab yes @tab yes @tab ? @tab yes @tab yes @tab ? 965 966@item @b{i486-pc-linux-gnu-rh6.0} 967@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 968@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 969 970@item @b{i486-pc-linux-gnulibc1} 971@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 972@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 973 974@item @b{i486-pc-linux-gnulibc1-rh4.2} 975@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 976@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 977 978@item @b{i486-pc-linux-gnuoldld} 979@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 980@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 981 982@item @b{i586-pc-linux-gnu} 983@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 984@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 985 986@item @b{i586-pc-linux-gnu-rh5.2} 987@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 988@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 989 990@item @b{i586-pc-linux-gnu-rh6.0} 991@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 992@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 993 994@item @b{i586-pc-linux-gnu-rh6.1} 995@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 996@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 997 998@item @b{i586-pc-linux-gnu-rh6.2} 999@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1000@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 1001 1002@item @b{i586-pc-linux-gnulibc1} 1003@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1004@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 1005 1006@item @b{i586-pc-linux-gnulibc1-rh4.2} 1007@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1008@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 1009 1010@item @b{i686-pc-linux-gnu} 1011@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1012@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 1013 1014@item @b{i686-pc-linux-gnu-rh5.2} 1015@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1016@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 1017 1018@item @b{i686-pc-linux-gnu-rh6.0} 1019@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1020@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 1021 1022@item @b{i686-pc-linux-gnu-rh6.2} 1023@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1024@tab yes @tab yes @tab yes @tab n/a @tab yes @tab yes 1025 1026@item @b{i686-pc-linux-gnulibc} 1027@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1028@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 1029 1030@item @b{i686-pc-linux-gnulibc1} 1031@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1032@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 1033 1034@item @b{ia64-hp-hpux11.20} 1035@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1036@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 1037 1038@item @b{ia64-unknown-linux-rh2.1AS} 1039@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1040@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes 1041 1042@item @b{ia64-unknown-linux-rh2.1AW} 1043@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1044@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes 1045 1046@item @b{ia64-unknown-linux-rh7.1} 1047@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1048@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes 1049 1050@item @b{ia64-unknown-linux-rh7.2} 1051@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1052@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes 1053 1054@item @b{m68k-hp-hpux9.00} 1055@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1056@tab yes @tab yes @tab yes @tab n/a @tab ? @tab ? 1057 1058@item @b{m68k-sun-sunos4.1.1} 1059@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1060@tab yes @tab yes @tab yes @tab n/a @tab no @tab ? 1061 1062@item @b{m68k-next-nextstep3} 1063@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1064@tab yes @tab yes @tab yes @tab n/a @tab no @tab ? 1065 1066@item @b{mips-dec-ultrix4.3} 1067@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1068@tab yes @tab yes @tab yes @tab n/a @tab ? @tab ? 1069 1070@item @b{mips-sgi-irix5.2} 1071@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1072@tab ? @tab ? @tab ? @tab ? @tab ? @tab ? 1073 1074@item @b{mips-sgi-irix5.3} 1075@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1076@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 1077 1078@item @b{mips-sgi-irix6.2} 1079@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1080@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 1081 1082@item @b{mips-sgi-irix6.4} 1083@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1084@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 1085 1086@item @b{mips-sgi-irix6.5} 1087@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1088@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 1089 1090@item @b{powerpc-ibm-aix4.1.5.0} 1091@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1092@tab yes @tab yes @tab yes @tab n/a @tab no/broken @tab ? 1093 1094@item @b{powerpc-ibm-aix4.2.1.0} 1095@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1096@tab yes @tab yes @tab yes @tab yes @tab no/broken @tab ? 1097 1098@item @b{powerpc-ibm-aix4.3.1.0} 1099@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1100@tab yes @tab yes @tab ? @tab yes @tab ? @tab ? 1101 1102@item @b{powerpc-unknown-linux-gnu} 1103@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1104@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 1105 1106@item @b{rs6000-ibm-aix3.2} 1107@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1108@tab yes @tab yes @tab yes @tab n/a @tab ? @tab ? 1109 1110@item @b{rs6000-ibm-aix3.2.5} 1111@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1112@tab yes @tab yes @tab yes @tab n/a @tab ? @tab ? 1113 1114@item @b{rs6000-ibm-aix4.1.4.0} 1115@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1116@tab yes @tab yes @tab yes @tab n/a @tab no/broken @tab ? 1117 1118@item @b{rs6000-ibm-aix4.1.5.0} 1119@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1120@tab yes @tab yes @tab yes @tab n/a @tab no/broken @tab ? 1121 1122@item @b{sparc-sun-solaris2.3} 1123@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1124@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 1125 1126@item @b{sparc-sun-solaris2.4} 1127@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1128@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 1129 1130@item @b{sparc-sun-solaris2.5} 1131@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1132@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 1133 1134@item @b{sparc-sun-solaris2.5.1} 1135@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1136@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes 1137 1138@item @b{sparc-sun-solaris2.6} 1139@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1140@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes 1141 1142@item @b{sparc-sun-solaris2.7} 1143@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1144@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes 1145 1146@item @b{sparc-sun-solaris2.8} 1147@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1148@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes 1149 1150@item @b{sparc-sun-sunos4.1.1} 1151@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1152@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 1153 1154@item @b{sparc-sun-sunos4.1.3} 1155@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1156@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 1157 1158@item @b{sparc-sun-sunos4.1.3C} 1159@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1160@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 1161 1162@item @b{sparc-sun-sunos4.1.3_U1} 1163@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1164@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 1165 1166@item @b{sparc-sun-sunos4.1.4} 1167@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1168@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 1169 1170@item @b{sparc-unknown-linux-gnulibc1} 1171@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1172@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 1173 1174@item @b{sparc-unknown-netbsd1.2E} 1175@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1176@tab yes @tab yes @tab yes @tab ? @tab ? @tab ? 1177 1178@item @b{sparc-unknown-netbsd1.2G} 1179@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1180@tab yes @tab yes @tab yes @tab ? @tab ? @tab ? 1181 1182@item @b{sparc64-unknown-linux-gnu} 1183@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1184@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ? 1185 1186@item @b{sparc64-unknown-linux-suse7.3} 1187@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd} 1188@tab yes @tab yes @tab yes @tab yes @tab yes @tab ? 1189 1190@end multitable 1191 1192See the @file{INSTALL} in the distribution for more specific details on 1193building and/or configuring for some systems. 1194 1195@c ################################################################ 1196@node Mount Maps, Amd Command Line Options, Supported Platforms, Top 1197@comment node-name, next, previous, up 1198@chapter Mount Maps 1199@cindex Mount maps 1200@cindex Automounter configuration maps 1201@cindex Mount information 1202 1203@i{Amd} has no built-in knowledge of machines or filesystems. 1204External @dfn{mount-maps} are used to provide the required information. 1205Specifically, @i{Amd} needs to know when and under what conditions it 1206should mount filesystems. 1207 1208The map entry corresponding to the requested name contains a list of 1209possible locations from which to resolve the request. Each location 1210specifies filesystem type, information required by that filesystem (for 1211example the block special device in the case of UFS), and some 1212information describing where to mount the filesystem (@pxref{fs Option}). A 1213location may also contain @dfn{selectors} (@pxref{Selectors}).@refill 1214 1215@menu 1216* Map Types:: 1217* Key Lookup:: 1218* Location Format:: 1219@end menu 1220 1221@node Map Types, Key Lookup, Mount Maps, Mount Maps 1222@comment node-name, next, previous, up 1223@section Map Types 1224@cindex Mount map types 1225@cindex Map types 1226@cindex Configuration map types 1227@cindex Types of mount map 1228@cindex Types of configuration map 1229@cindex Determining the map type 1230 1231A mount-map provides the run-time configuration information to @i{Amd}. 1232Maps can be implemented in many ways. Some of the forms supported by 1233@i{Amd} are regular files, ndbm databases, NIS maps, the @dfn{Hesiod} 1234name server, and even the password file. 1235 1236A mount-map @dfn{name} is a sequence of characters. When an automount 1237point is created a handle on the mount-map is obtained. For each map 1238type configured, @i{Amd} attempts to reference the map of the 1239appropriate type. If a map is found, @i{Amd} notes the type for future 1240use and deletes the reference, for example closing any open file 1241descriptors. The available maps are configured when @i{Amd} is built 1242and can be displayed by running the command @samp{amd -v}. 1243 1244When using an @i{Amd} configuration file (@pxref{Amd Configuration File}) 1245and the keyword @samp{map_type} (@pxref{map_type Parameter}), you may 1246force the map used to any type. 1247 1248By default, @i{Amd} caches data in a mode dependent on the type of map. 1249This is the same as specifying @samp{cache:=mapdefault} and selects a 1250suitable default cache mode depending on the map type. The individual 1251defaults are described below. The @var{cache} option can be specified 1252on automount points to alter the caching behavior (@pxref{Automount 1253Filesystem}).@refill 1254 1255The following map types have been implemented, though some are not 1256available on all machines. Run the command @samp{amd -v} to obtain a 1257list of map types configured on your machine. 1258 1259@menu 1260* File maps:: 1261* ndbm maps:: 1262* NIS maps:: 1263* NIS+ maps:: 1264* Hesiod maps:: 1265* Password maps:: 1266* Union maps:: 1267* LDAP maps:: 1268@end menu 1269 1270@node File maps, ndbm maps, Map Types, Map Types 1271@comment node-name, next, previous, up 1272@subsection File maps 1273@cindex File maps 1274@cindex Flat file maps 1275@cindex File map syntactic conventions 1276 1277When @i{Amd} searches a file for a map entry it does a simple scan of 1278the file and supports both comments and continuation lines. 1279 1280Continuation lines are indicated by a backslash character (@samp{\}) as 1281the last character of a line in the file. The backslash, newline character 1282@emph{and any leading white space on the following line} are discarded. A maximum 1283line length of 2047 characters is enforced after continuation lines are read 1284but before comments are stripped. Each line must end with 1285a newline character; that is newlines are terminators, not separators. 1286The following examples illustrate this: 1287 1288@example 1289key valA valB; \ 1290 valC 1291@end example 1292 1293specifies @emph{three} locations, and is identical to 1294 1295@example 1296key valA valB; valC 1297@end example 1298 1299However, 1300 1301@example 1302key valA valB;\ 1303 valC 1304@end example 1305 1306specifies only @emph{two} locations, and is identical to 1307 1308@example 1309key valA valB;valC 1310@end example 1311 1312After a complete line has been read from the file, including 1313continuations, @i{Amd} determines whether there is a comment on the 1314line. A comment begins with a hash (``@samp{#}'') character and 1315continues to the end of the line. There is no way to escape or change 1316the comment lead-in character. 1317 1318Note that continuation lines and comment support @dfn{only} apply to 1319file maps, or ndbm maps built with the @code{mk-amd-map} program. 1320 1321When caching is enabled, file maps have a default cache mode of 1322@code{all} (@pxref{Automount Filesystem}). 1323 1324@node ndbm maps, NIS maps, File maps, Map Types 1325@comment node-name, next, previous, up 1326@subsection ndbm maps 1327@cindex ndbm maps 1328 1329An ndbm map may be used as a fast access form of a file map. The program, 1330@code{mk-amd-map}, converts a normal map file into an ndbm database. 1331This program supports the same continuation and comment conventions that 1332are provided for file maps. Note that ndbm format files may @emph{not} 1333be sharable across machine architectures. The notion of speed generally 1334only applies to large maps; a small map, less than a single disk block, 1335is almost certainly better implemented as a file map. 1336 1337ndbm maps have a default cache mode of @samp{all} (@pxref{Automount Filesystem}). 1338 1339@node NIS maps, NIS+ maps, ndbm maps, Map Types 1340@comment node-name, next, previous, up 1341@subsection NIS maps 1342@cindex NIS (YP) maps 1343 1344When using NIS (formerly YP), an @i{Amd} map is implemented directly 1345by the underlying NIS map. Comments and continuation lines are 1346@emph{not} supported in the automounter and must be stripped when 1347constructing the NIS server's database. 1348 1349NIS maps have a default cache mode of @code{all} (@pxref{Automount 1350Filesystem}). 1351 1352The following rule illustrates what could be added to your NIS @file{Makefile}, 1353in this case causing the @file{amd.home} map to be rebuilt: 1354@example 1355$(YPTSDIR)/amd.home.time: $(ETCDIR)/amd.home 1356 -@@sed -e "s/#.*$$//" -e "/^$$/d" $(ETCDIR)/amd.home | \ 1357 awk '@{ \ 1358 for (i = 1; i <= NF; i++) \ 1359 if (i == NF) @{ \ 1360 if (substr($$i, length($$i), 1) == "\\") \ 1361 printf("%s", substr($$i, 1, length($$i) - 1)); \ 1362 else \ 1363 printf("%s\n", $$i); \ 1364 @} \ 1365 else \ 1366 printf("%s ", $$i); \ 1367 @}' | \ 1368 $(MAKEDBM) - $(YPDBDIR)/amd.home; \ 1369 touch $(YPTSDIR)/amd.home.time; \ 1370 echo "updated amd.home"; \ 1371 if [ ! $(NOPUSH) ]; then \ 1372 $(YPPUSH) amd.home; \ 1373 echo "pushed amd.home"; \ 1374 else \ 1375 : ; \ 1376 fi 1377@end example 1378 1379Here @code{$(YPTSDIR)} contains the time stamp files, and @code{$(YPDBDIR)} contains 1380the dbm format NIS files. 1381 1382@node NIS+ maps, Hesiod maps, NIS maps, Map Types 1383@comment node-name, next, previous, up 1384@subsection NIS+ maps 1385@cindex NIS+ maps 1386 1387NIS+ maps do not support cache mode @samp{all} and, when caching is 1388enabled, have a default cache mode of @samp{inc}. 1389 1390XXX: FILL IN WITH AN EXAMPLE. 1391 1392@node Hesiod maps, Password maps, NIS+ maps, Map Types 1393@comment node-name, next, previous, up 1394@subsection Hesiod maps 1395@cindex Hesiod maps 1396 1397When the map name begins with the string @samp{hesiod.} lookups are made 1398using the @dfn{Hesiod} name server. The string following the dot is 1399used as a name qualifier and is prepended with the key being located. 1400The entire string is then resolved in the @code{automount} context, or 1401the @i{amd.conf} parameter @samp{hesiod_base} (@pxref{hesiod_base 1402Parameter}). For example, if the key is @samp{jsp} and map name is 1403@samp{hesiod.homes} then @dfn{Hesiod} is asked to resolve 1404@samp{jsp.homes.automount}. 1405 1406Hesiod maps do not support cache mode @samp{all} and, when caching is 1407enabled, have a default cache mode of @samp{inc} (@pxref{Automount 1408Filesystem}). 1409 1410The following is an example of a @dfn{Hesiod} map entry: 1411 1412@example 1413jsp.homes.automount HS TXT "rfs:=/home/charm;rhost:=charm;sublink:=jsp" 1414njw.homes.automount HS TXT "rfs:=/home/dylan/dk2;rhost:=dylan;sublink:=njw" 1415@end example 1416 1417@node Password maps, Union maps, Hesiod maps, Map Types 1418@comment node-name, next, previous, up 1419@subsection Password maps 1420@cindex Password file maps 1421@cindex /etc/passwd maps 1422@cindex User maps, automatic generation 1423@cindex Automatic generation of user maps 1424@cindex Using the password file as a map 1425 1426The password map support is unlike the four previous map types. When 1427the map name is the string @file{/etc/passwd} @i{Amd} can lookup a user 1428name in the password file and re-arrange the home directory field to 1429produce a usable map entry. 1430 1431@i{Amd} assumes the home directory has the format 1432`@t{/}@i{anydir}@t{/}@i{dom1}@t{/../}@i{domN}@t{/}@i{login}'. 1433@c @footnote{This interpretation is not necessarily exactly what you want.} 1434It breaks this string into a map entry where @code{$@{rfs@}} has the 1435value `@t{/}@i{anydir}@t{/}@i{domN}', @code{$@{rhost@}} has the value 1436`@i{domN}@t{.}@i{...}@t{.}@i{dom1}', and @code{$@{sublink@}} has the 1437value @i{login}.@refill 1438 1439Thus if the password file entry was 1440 1441@example 1442/home/achilles/jsp 1443@end example 1444 1445the map entry used by @i{Amd} would be 1446 1447@example 1448rfs:=/home/achilles;rhost:=achilles;sublink:=jsp 1449@end example 1450 1451Similarly, if the password file entry was 1452 1453@example 1454/home/cc/sugar/mjh 1455@end example 1456 1457the map entry used by @i{Amd} would be 1458 1459@example 1460rfs:=/home/sugar;rhost:=sugar.cc;sublink:=jsp 1461@end example 1462 1463@node Union maps, LDAP maps , Password maps, Map Types 1464@comment node-name, next, previous, up 1465@subsection Union maps 1466@cindex Union file maps 1467 1468The union map support is provided specifically for use with the union 1469filesystem, @pxref{Union Filesystem}. 1470 1471It is identified by the string @samp{union:} which is followed by a 1472colon separated list of directories. The directories are read in order, 1473and the names of all entries are recorded in the map cache. Later 1474directories take precedence over earlier ones. The union filesystem 1475type then uses the map cache to determine the union of the names in all 1476the directories. 1477 1478@node LDAP maps, , Union maps, Map Types 1479@comment node-name, next, previous, up 1480@subsection LDAP maps 1481@cindex LDAP maps 1482@cindex Lightweight Directory Access Protocol 1483 1484LDAP (Lightweight Directory Access Protocol) maps do not support cache 1485mode @samp{all} and, when caching is enabled, have a default cache mode 1486of @samp{inc}. 1487 1488For example, an @i{Amd} map @samp{amd.home} that looks as follows: 1489 1490@example 1491/defaults opts:=rw,intr;type:=link 1492 1493zing -rhost:=shekel \ 1494 host==shekel \ 1495 host!=shekel;type:=nfs 1496@end example 1497@noindent 1498when converted to LDAP (@pxref{amd2ldif}), will result in the following 1499LDAP database: 1500@example 1501$ amd2ldif amd.home CUCS < amd.home 1502dn: cn=amdmap timestamp, CUCS 1503cn : amdmap timestamp 1504objectClass : amdmapTimestamp 1505amdmapTimestamp: 873071363 1506 1507dn: cn=amdmap amd.home[/defaults], CUCS 1508cn : amdmap amd.home[/defaults] 1509objectClass : amdmap 1510amdmapName : amd.home 1511amdmapKey : /defaults 1512amdmapValue : opts:=rw,intr;type:=link 1513 1514dn: cn=amdmap amd.home[], CUCS 1515cn : amdmap amd.home[] 1516objectClass : amdmap 1517amdmapName : amd.home 1518amdmapKey : 1519amdmapValue : 1520 1521dn: cn=amdmap amd.home[zing], CUCS 1522cn : amdmap amd.home[zing] 1523objectClass : amdmap 1524amdmapName : amd.home 1525amdmapKey : zing 1526amdmapValue : -rhost:=shekel host==shekel host!=shekel;type:=nfs 1527@end example 1528 1529@c subsection Gdbm 1530 1531@node Key Lookup, Location Format, Map Types, Mount Maps 1532@comment node-name, next, previous, up 1533@section How keys are looked up 1534@cindex Key lookup 1535@cindex Map lookup 1536@cindex Looking up keys 1537@cindex How keys are looked up 1538@cindex Wildcards in maps 1539 1540The key is located in the map whose type was determined when the 1541automount point was first created. In general the key is a pathname 1542component. In some circumstances this may be modified by variable 1543expansion (@pxref{Variable Expansion}) and prefixing. If the automount 1544point has a prefix, specified by the @var{pref} option, then that is 1545prepended to the search key before the map is searched. 1546 1547If the map cache is a @samp{regexp} cache then the key is treated as an 1548egrep-style regular expression, otherwise a normal string comparison is 1549made. 1550 1551If the key cannot be found then a @dfn{wildcard} match is attempted. 1552@i{Amd} repeatedly strips the basename from the key, appends @samp{/*} and 1553attempts a lookup. Finally, @i{Amd} attempts to locate the special key @samp{*}. 1554 1555For example, the following sequence would be checked if @file{home/dylan/dk2} was 1556being located: 1557 1558@example 1559 home/dylan/dk2 1560 home/dylan/* 1561 home/* 1562 * 1563@end example 1564 1565At any point when a wildcard is found, @i{Amd} proceeds as if an exact 1566match had been found and the value field is then used to resolve the 1567mount request, otherwise an error code is propagated back to the kernel. 1568(@pxref{Filesystem Types}).@refill 1569 1570@node Location Format, , Key Lookup, Mount Maps 1571@comment node-name, next, previous, up 1572@section Location Format 1573@cindex Location format 1574@cindex Map entry format 1575@cindex How locations are parsed 1576 1577The value field from the lookup provides the information required to 1578mount a filesystem. The information is parsed according to the syntax 1579shown below. 1580 1581@display 1582@i{location-list}: 1583 @i{location-selection} 1584 @i{location-list} @i{white-space} @t{||} @i{white-space} @i{location-selection} 1585@i{location-selection}: 1586 @i{location} 1587 @i{location-selection} @i{white-space} @i{location} 1588@i{location}: 1589 @i{location-info} 1590 @t{-}@i{location-info} 1591 @t{-} 1592@i{location-info}: 1593 @i{sel-or-opt} 1594 @i{location-info}@t{;}@i{sel-or-opt} 1595 @t{;} 1596@i{sel-or-opt}: 1597 @i{selection} 1598 @i{opt-ass} 1599@i{selection}: 1600 selector@t{==}@i{value} 1601 selector@t{!=}@i{value} 1602@i{opt-ass}: 1603 option@t{:=}@i{value} 1604@i{white-space}: 1605 space 1606 tab 1607@end display 1608 1609Note that unquoted whitespace is not allowed in a location description. 1610White space is only allowed, and is mandatory, where shown with non-terminal 1611@i{white-space}. 1612 1613A @dfn{location-selection} is a list of possible volumes with which to 1614satisfy the request. @dfn{location-selection}s are separated by the 1615@samp{||} operator. The effect of this operator is to prevent use of 1616location-selections to its right if any of the location-selections on 1617its left were selected whether or not any of them were successfully 1618mounted (@pxref{Selectors}).@refill 1619 1620The location-selection, and singleton @dfn{location-list}, 1621@samp{type:=ufs;dev:=/dev/xd1g} would inform @i{Amd} to mount a UFS 1622filesystem from the block special device @file{/dev/xd1g}. 1623 1624The @dfn{sel-or-opt} component is either the name of an option required 1625by a specific filesystem, or it is the name of a built-in, predefined 1626selector such as the architecture type. The value may be quoted with 1627double quotes @samp{"}, for example 1628@samp{type:="ufs";dev:="/dev/xd1g"}. These quotes are stripped when the 1629value is parsed and there is no way to get a double quote into a value 1630field. Double quotes are used to get white space into a value field, 1631which is needed for the program filesystem (@pxref{Program Filesystem}).@refill 1632 1633@menu 1634* Map Defaults:: 1635* Variable Expansion:: 1636* Selectors:: 1637* Map Options:: 1638@end menu 1639 1640@node Map Defaults, Variable Expansion, Location Format, Location Format 1641@comment node-name, next, previous, up 1642@subsection Map Defaults 1643@cindex Map defaults 1644@cindex How to set default map parameters 1645@cindex Setting default map parameters 1646 1647A location beginning with a dash @samp{-} is used to specify default 1648values for subsequent locations. Any previously specified defaults in 1649the location-list are discarded. The default string can be empty in 1650which case no defaults apply. 1651 1652The location @samp{-fs:=/mnt;opts:=ro} would set the local mount point 1653to @file{/mnt} and cause mounts to be read-only by default. Defaults 1654specified this way are appended to, and so override, any global map 1655defaults given with @samp{/defaults}). 1656 1657@c 1658@c A @samp{/defaults} value @dfn{gdef} and a location list 1659@c \begin{quote} 1660@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$ 1661@c \end{quote} 1662@c is equivalent to 1663@c \begin{quote} 1664@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$ 1665@c \end{quote} 1666@c which is equivalent to 1667@c \begin{quote} 1668@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$ 1669@c \end{quote} 1670 1671@node Variable Expansion, Selectors, Map Defaults, Location Format 1672@comment node-name, next, previous, up 1673@subsection Variable Expansion 1674@cindex Variable expansion 1675@cindex How variables are expanded 1676@cindex Pathname operators 1677@cindex Domain stripping 1678@cindex Domainname operators 1679@cindex Stripping the local domain name 1680@cindex Environment variables 1681@cindex How to access environment variables in maps 1682 1683To allow generic location specifications @i{Amd} does variable expansion 1684on each location and also on some of the option strings. Any option or 1685selector appearing in the form @code{$@dfn{var}} is replaced by the 1686current value of that option or selector. For example, if the value of 1687@code{$@{key@}} was @samp{bin}, @code{$@{autodir@}} was @samp{/a} and 1688@code{$@{fs@}} was `@t{$@{autodir@}}@t{/local/}@t{$@{key@}}' then 1689after expansion @code{$@{fs@}} would have the value @samp{/a/local/bin}. 1690Any environment variable can be accessed in a similar way.@refill 1691 1692Two pathname operators are available when expanding a variable. If the 1693variable name begins with @samp{/} then only the last component of the 1694pathname is substituted. For example, if @code{$@{path@}} was 1695@samp{/foo/bar} then @code{$@{/path@}} would be expanded to @samp{bar}. 1696Similarly, if the variable name ends with @samp{/} then all but the last 1697component of the pathname is substituted. In the previous example, 1698@code{$@{path/@}} would be expanded to @samp{/foo}.@refill 1699 1700Two domain name operators are also provided. If the variable name 1701begins with @samp{.} then only the domain part of the name is 1702substituted. For example, if @code{$@{rhost@}} was 1703@samp{swan.doc.ic.ac.uk} then @code{$@{.rhost@}} would be expanded to 1704@samp{doc.ic.ac.uk}. Similarly, if the variable name ends with @samp{.} 1705then only the host component is substituted. In the previous example, 1706@code{$@{rhost.@}} would be expanded to @samp{swan}.@refill 1707 1708Variable expansion is a two phase process. Before a location is parsed, 1709all references to selectors, @i{eg} @code{$@{path@}}, are expanded. The 1710location is then parsed, selections are evaluated and option assignments 1711recorded. If there were no selections or they all succeeded the 1712location is used and the values of the following options are expanded in 1713the order given: @var{sublink}, @var{rfs}, @var{fs}, @var{opts}, 1714@var{remopts}, @var{mount} and @var{unmount}. 1715 1716Note that expansion of option values is done after @dfn{all} assignments 1717have been completed and not in a purely left to right order as is done 1718by the shell. This generally has the desired effect but care must be 1719taken if one of the options references another, in which case the 1720ordering can become significant. 1721 1722There are two special cases concerning variable expansion: 1723 1724@enumerate 1725@item 1726before a map is consulted, any selectors in the name received 1727from the kernel are expanded. For example, if the request from the 1728kernel was for `@t{$@{arch@}}@t{.bin}' and the machine architecture 1729was @samp{vax}, the value given to @code{$@{key@}} would be 1730@samp{vax.bin}.@refill 1731 1732@item 1733the value of @code{$@{rhost@}} is expanded and normalized before the 1734other options are expanded. The normalization process strips any local 1735sub-domain components. For example, if @code{$@{domain@}} was 1736@samp{Berkeley.EDU} and @code{$@{rhost@}} was initially 1737@samp{snow.Berkeley.EDU}, after the normalization it would simply be 1738@samp{snow}. Hostname normalization is currently done in a 1739@emph{case-dependent} manner.@refill 1740@end enumerate 1741 1742@c====================================================================== 1743@node Selectors, Map Options, Variable Expansion, Location Format 1744@comment node-name, next, previous, up 1745@subsection Selectors 1746@cindex Selectors 1747 1748Selectors are used to control the use of a location. It is possible to 1749share a mount map between many machines in such a way that filesystem 1750location, architecture and operating system differences are hidden from 1751the users. A selector of the form @samp{arch==sun3;os==sunos4} would only 1752apply on Sun-3s running SunOS 4.x. 1753 1754Selectors can be negated by using @samp{!=} instead of @samp{==}. For 1755example to select a location on all non-Vax machines the selector 1756@samp{arch!=vax} would be used. 1757 1758Selectors are evaluated left to right. If a selector fails then that 1759location is ignored. Thus the selectors form a conjunction and the 1760locations form a disjunction. If all the locations are ignored or 1761otherwise fail then @i{Amd} uses the @dfn{error} filesystem 1762(@pxref{Error Filesystem}). This is equivalent to having a location 1763@samp{type:=error} at the end of each mount-map entry.@refill 1764 1765The default value of many of the selectors listed here can be overridden 1766by an @i{Amd} command line switch or in an @i{Amd} configuration file. 1767@xref{Amd Configuration File}. 1768 1769The following selectors are currently implemented. 1770 1771@menu 1772* arch Selector Variable:: 1773* autodir Selector Variable:: 1774* byte Selector Variable:: 1775* cluster Selector Variable:: 1776* domain Selector Variable:: 1777* dollar Selector Variable:: 1778* host Selector Variable:: 1779* hostd Selector Variable:: 1780* karch Selector Variable:: 1781* os Selector Variable:: 1782* osver Selector Variable:: 1783* full_os Selector Variable:: 1784* vendor Selector Variable:: 1785 1786* key Selector Variable:: 1787* map Selector Variable:: 1788* netnumber Selector Variable:: 1789* network Selector Variable:: 1790* path Selector Variable:: 1791* wire Selector Variable:: 1792* uid Selector Variable:: 1793* gid Selector Variable:: 1794 1795* exists Selector Function:: 1796* false Selector Function:: 1797* netgrp Selector Function:: 1798* netgrpd Selector Function:: 1799* in_network Selector Function:: 1800* true Selector Function:: 1801@end menu 1802 1803@c ---------------------------------------------------------------- 1804@node arch Selector Variable, autodir Selector Variable, Selectors, Selectors 1805@comment node-name, next, previous, up 1806@subsubsection arch Selector Variable 1807@cindex arch Selector Variable 1808@cindex arch, mount selector 1809@cindex Mount selector; arch 1810@cindex Selector; arch 1811 1812The machine architecture which was automatically determined at compile 1813time. The architecture type can be displayed by running the command 1814@samp{amd -v}. @xref{Supported Platforms}.@refill 1815 1816@c ---------------------------------------------------------------- 1817@node autodir Selector Variable, byte Selector Variable, arch Selector Variable, Selectors 1818@comment node-name, next, previous, up 1819@subsubsection autodir Selector Variable 1820@cindex autodir Selector Variable 1821@cindex autodir, mount selector 1822@cindex Mount selector; autodir 1823@cindex Selector; autodir 1824 1825The default directory under which to mount filesystems. This may be 1826changed by the @code{-a} command line option. @xref{fs Option}. 1827 1828@c ---------------------------------------------------------------- 1829@node byte Selector Variable, cluster Selector Variable, autodir Selector Variable, Selectors 1830@comment node-name, next, previous, up 1831@subsubsection byte Selector Variable 1832@cindex byte Selector Variable 1833@cindex byte, mount selector 1834@cindex Mount selector; byte 1835@cindex Selector; byte 1836 1837The machine's byte ordering. This is either @samp{little}, indicating 1838little-endian, or @samp{big}, indicating big-endian. One possible use 1839is to share @samp{rwho} databases (@pxref{rwho servers}). Another is to 1840share ndbm databases, however this use can be considered a courageous 1841juggling act. 1842 1843@c ---------------------------------------------------------------- 1844@node cluster Selector Variable, domain Selector Variable, byte Selector Variable, Selectors 1845@comment node-name, next, previous, up 1846@subsubsection cluster Selector Variable 1847@cindex cluster Selector Variable 1848@cindex cluster, mount selector 1849@cindex Mount selector; cluster 1850@cindex Selector; cluster 1851 1852This is provided as a hook for the name of the local cluster. This can 1853be used to decide which servers to use for copies of replicated 1854filesystems. @code{$@{cluster@}} defaults to the value of 1855@code{$@{domain@}} unless a different value is set with the @code{-C} 1856command line option. 1857 1858@c ---------------------------------------------------------------- 1859@node domain Selector Variable, dollar Selector Variable, cluster Selector Variable, Selectors 1860@comment node-name, next, previous, up 1861@subsubsection domain Selector Variable 1862@cindex domain Selector Variable 1863@cindex domain, mount selector 1864@cindex Mount selector; domain 1865@cindex Selector; domain 1866 1867The local domain name as specified by the @code{-d} command line option. 1868@xref{host Selector Variable}. 1869 1870@c ---------------------------------------------------------------- 1871@node dollar Selector Variable, host Selector Variable, domain Selector Variable, Selectors 1872@comment node-name, next, previous, up 1873@subsubsection dollar Selector Variable 1874@cindex dollar Selector Variable 1875 1876This is a special variable, whose sole purpose is to produce a literal 1877dollar sign in the value of another variable. For example, if you have 1878a remote file system whose name is @samp{/disk$s}, you can mount it by 1879setting the remote file system variable as follows: 1880 1881@example 1882rfs:=/disk$@{dollar@}s 1883@end example 1884 1885@c ---------------------------------------------------------------- 1886@node host Selector Variable, hostd Selector Variable, dollar Selector Variable, Selectors 1887@comment node-name, next, previous, up 1888@subsubsection host Selector Variable 1889@cindex host Selector Variable 1890@cindex host, mount selector 1891@cindex Mount selector; host 1892@cindex Selector; host 1893 1894The local hostname as determined by @b{gethostname}(2). If no domain 1895name was specified on the command line and the hostname contains a 1896period @samp{.} then the string before the period is used as the host 1897name, and the string after the period is assigned to @code{$@{domain@}}. 1898For example, if the hostname is @samp{styx.doc.ic.ac.uk} then 1899@code{host} would be @samp{styx} and @code{domain} would be 1900@samp{doc.ic.ac.uk}. @code{hostd} would be 1901@samp{styx.doc.ic.ac.uk}.@refill 1902 1903@c ---------------------------------------------------------------- 1904@node hostd Selector Variable, karch Selector Variable, host Selector Variable, Selectors 1905@comment node-name, next, previous, up 1906@subsubsection hostd Selector Variable 1907@cindex hostd Selector Variable 1908@cindex hostd, mount selector 1909@cindex Mount selector; hostd 1910@cindex Selector; hostd 1911 1912This resolves to the @code{$@{host@}} and @code{$@{domain@}} 1913concatenated with a @samp{.} inserted between them if required. If 1914@code{$@{domain@}} is an empty string then @code{$@{host@}} and 1915@code{$@{hostd@}} will be identical. 1916 1917@c ---------------------------------------------------------------- 1918@node karch Selector Variable, os Selector Variable, hostd Selector Variable, Selectors 1919@comment node-name, next, previous, up 1920@subsubsection karch Selector Variable 1921@cindex karch Selector Variable 1922@cindex karch, mount selector 1923@cindex Mount selector; karch 1924@cindex Selector; karch 1925 1926This is provided as a hook for the kernel architecture. This is used on 1927SunOS 4 and SunOS 5, for example, to distinguish between different 1928@samp{/usr/kvm} volumes. @code{$@{karch@}} defaults to the ``machine'' 1929value gotten from @b{uname}(2). If the @b{uname}(2) system call is not 1930available, the value of @code{$@{karch@}} defaults to that of 1931@code{$@{arch@}}. Finally, a different value can be set with the @code{-k} 1932command line option. 1933 1934@c ---------------------------------------------------------------- 1935@node os Selector Variable, osver Selector Variable, karch Selector Variable, Selectors 1936@comment node-name, next, previous, up 1937@subsubsection os Selector Variable 1938@cindex os Selector Variable 1939@cindex os, mount selector 1940@cindex Mount selector; os 1941@cindex Selector; os 1942 1943The operating system. Like the machine architecture, this is 1944automatically determined at compile time. The operating system name can 1945be displayed by running the command @samp{amd -v}. @xref{Supported 1946Platforms}.@refill 1947 1948@c ---------------------------------------------------------------- 1949@node osver Selector Variable, full_os Selector Variable, os Selector Variable, Selectors 1950@comment node-name, next, previous, up 1951@subsubsection osver Selector Variable 1952@cindex osver Selector Variable 1953@cindex osver, mount selector 1954@cindex Mount selector; osver 1955@cindex Selector; osver 1956 1957The operating system version. Like the machine architecture, this is 1958automatically determined at compile time. The operating system name can 1959be displayed by running the command @samp{amd -v}. @xref{Supported 1960Platforms}.@refill 1961 1962@c ---------------------------------------------------------------- 1963@node full_os Selector Variable, vendor Selector Variable, osver Selector Variable, Selectors 1964@comment node-name, next, previous, up 1965@subsubsection full_os Selector Variable 1966@cindex full_os Selector Variable 1967@cindex full_os, mount selector 1968@cindex Mount selector; full_os 1969@cindex Selector; full_os 1970 1971The full name of the operating system, including its version. This 1972value is automatically determined at compile time. The full operating 1973system name and version can be displayed by running the command 1974@samp{amd -v}. @xref{Supported Platforms}.@refill 1975 1976@c ---------------------------------------------------------------- 1977@node vendor Selector Variable, key Selector Variable, full_os Selector Variable, Selectors 1978@comment node-name, next, previous, up 1979@subsubsection vendor Selector Variable 1980@cindex vendor Selector Variable 1981@cindex vendor, mount selector 1982@cindex Mount selector; vendor 1983@cindex Selector; vendor 1984 1985The name of the vendor of the operating system. This value is 1986automatically determined at compile time. The name of the vendor can be 1987displayed by running the command @samp{amd -v}. @xref{Supported 1988Platforms}.@refill 1989 1990 1991@c ---------------------------------------------------------------- 1992@ifhtml 1993<HR> 1994@end ifhtml 1995@sp 3 1996The following selectors are also provided. Unlike the other selectors, 1997they vary for each lookup. Note that when the name from the kernel is 1998expanded prior to a map lookup, these selectors are all defined as empty 1999strings. 2000 2001@c ---------------------------------------------------------------- 2002@node key Selector Variable, map Selector Variable, vendor Selector Variable, Selectors 2003@comment node-name, next, previous, up 2004@subsubsection key Selector Variable 2005@cindex key Selector Variable 2006@cindex key, mount selector 2007@cindex Mount selector; key 2008@cindex Selector; key 2009 2010The name being resolved. For example, if @file{/home} is an automount 2011point, then accessing @file{/home/foo} would set @code{$@{key@}} to the 2012string @samp{foo}. The key is prefixed by the @var{pref} option set in 2013the parent mount point. The default prefix is an empty string. If the 2014prefix was @file{blah/} then @code{$@{key@}} would be set to 2015@file{blah/foo}.@refill 2016 2017@c ---------------------------------------------------------------- 2018@node map Selector Variable, netnumber Selector Variable, key Selector Variable, Selectors 2019@comment node-name, next, previous, up 2020@subsubsection map Selector Variable 2021@cindex map Selector Variable 2022@cindex map, mount selector 2023@cindex Mount selector; map 2024@cindex Selector; map 2025 2026The name of the mount map being used. 2027 2028@c ---------------------------------------------------------------- 2029@node netnumber Selector Variable, network Selector Variable, map Selector Variable, Selectors 2030@comment node-name, next, previous, up 2031@subsubsection netnumber Selector Variable 2032@cindex netnumber Selector Variable 2033@cindex netnumber, mount selector 2034@cindex Mount selector; netnumber 2035@cindex Selector; netnumber 2036 2037This selector is identical to the @samp{in_network} selector function, 2038see @ref{in_network Selector Function}. It will match either the name 2039or number of @i{any} network interface on which this host is connected 2040to. The names and numbers of all attached interfaces are available from 2041the output of @samp{amd -v}. 2042 2043@c ---------------------------------------------------------------- 2044@node network Selector Variable, path Selector Variable, netnumber Selector Variable, Selectors 2045@comment node-name, next, previous, up 2046@subsubsection network Selector Variable 2047@cindex network Selector Variable 2048@cindex network, mount selector 2049@cindex Mount selector; network 2050@cindex Selector; network 2051 2052This selector is identical to the @samp{in_network} selector function, 2053see @ref{in_network Selector Function}. It will match either the name 2054or number of @i{any} network interface on which this host is connected 2055to. The names and numbers of all attached interfaces are available from 2056the output of @samp{amd -v}. 2057 2058@c ---------------------------------------------------------------- 2059@node path Selector Variable, wire Selector Variable, network Selector Variable, Selectors 2060@comment node-name, next, previous, up 2061@subsubsection path Selector Variable 2062@cindex path Selector Variable 2063@cindex path, mount selector 2064@cindex Mount selector; path 2065@cindex Selector; path 2066 2067The full pathname of the name being resolved. For example 2068@file{/home/foo} in the example above. 2069 2070@c ---------------------------------------------------------------- 2071@node wire Selector Variable, uid Selector Variable, path Selector Variable, Selectors 2072@comment node-name, next, previous, up 2073@subsubsection wire Selector Variable 2074@cindex wire Selector Variable 2075@cindex wire, mount selector 2076@cindex Mount selector; wire 2077@cindex Selector; wire 2078 2079This selector is identical to the @samp{in_network} selector function, 2080see @ref{in_network Selector Function}. It will match either the name 2081or number of @i{any} network interface on which this host is connected 2082to. The names and numbers of all attached interfaces are available from 2083the output of @samp{amd -v}. 2084 2085@c ---------------------------------------------------------------- 2086@node uid Selector Variable, gid Selector Variable, wire Selector Variable, Selectors 2087@comment node-name, next, previous, up 2088@subsubsection uid Selector Variable 2089@cindex uid Selector Variable 2090@cindex uid, mount selector 2091@cindex Mount selector; uid 2092@cindex Selector; uid 2093 2094This selector provides the numeric effective user ID (UID) of the user 2095which last accessed an automounted path name. This simple example shows 2096how floppy mounting can be assigned only to machine owners: 2097 2098@example 2099floppy -type:=pcfs \ 2100 uid==2301;host==shekel;dev:=/dev/floppy \ 2101 uid==6712;host==titan;dev=/dev/fd0 \ 2102 uid==0;dev:=/dev/fd0c \ 2103 type:=error 2104@end example 2105 2106The example allows two machine owners to mount floppies on their 2107designated workstations, allows the root user to mount on any host, and 2108otherwise forces an error. 2109 2110@c ---------------------------------------------------------------- 2111@node gid Selector Variable, exists Selector Function, uid Selector Variable, Selectors 2112@comment node-name, next, previous, up 2113@subsubsection gid Selector Variable 2114@cindex gid Selector Variable 2115@cindex gid, mount selector 2116@cindex Mount selector; gid 2117@cindex Selector; gid 2118 2119This selector provides the numeric effective group ID (GID) of the user 2120which last accessed an automounted path name. 2121 2122@c ---------------------------------------------------------------- 2123@ifhtml 2124<HR> 2125@end ifhtml 2126@sp 2 2127The following boolean functions are selectors which take an argument 2128@i{ARG}. They return a value of true or false, and thus do not need to 2129be compared with a value. Each of these may be negated by prepending 2130@samp{!} to their name. 2131 2132@c ---------------------------------------------------------------- 2133@node exists Selector Function, false Selector Function, gid Selector Variable, Selectors 2134@comment node-name, next, previous, up 2135@subsubsection exists Selector Function 2136@cindex exists Selector Function 2137@cindex exists, boolean mount selector 2138@cindex !exists, boolean mount selector 2139@cindex Mount selector; exists 2140@cindex Selector; exists 2141 2142If the file listed by @i{ARG} exists (via @b{lstat}(2)), this function 2143evaluates to true. Otherwise it evaluates to false. 2144 2145@c ---------------------------------------------------------------- 2146@node false Selector Function, netgrp Selector Function, exists Selector Function, Selectors 2147@comment node-name, next, previous, up 2148@subsubsection false Selector Function 2149@cindex false Selector Function 2150@cindex false, boolean mount selector 2151@cindex !false, boolean mount selector 2152@cindex Mount selector; false 2153@cindex Selector; false 2154 2155Always evaluates to false. @i{ARG} is ignored. 2156 2157@c ---------------------------------------------------------------- 2158@node netgrp Selector Function, netgrpd Selector Function, false Selector Function, Selectors 2159@comment node-name, next, previous, up 2160@subsubsection netgrp Selector Function 2161@cindex netgrp Selector Function 2162@cindex netgrp, boolean mount selector 2163@cindex !netgrp, boolean mount selector 2164@cindex Mount selector; netgrp 2165@cindex Selector; netgrp 2166 2167If the current host as determined by the value of @code{$@{host@}} 2168(e.g., short host name) is a member of the netgroup @i{ARG}, this 2169selector evaluates to true. Otherwise it evaluates to false. 2170 2171For example, suppose you have a netgroup @samp{ppp-hosts}, and for 2172reasons of performance, these have a local @file{/home} partition, while 2173all other clients on the faster network can access a shared home 2174directory. A common map to use for both might look like the following: 2175 2176@example 2177home/* netgrp(ppp-hosts);type:=link;fs:=/local/$@{key@} \ 2178 !netgrp(ppp-hosts);type:=nfs;rhost:=serv1;rfs:=/remote/$@{key@} 2179@end example 2180 2181@c ---------------------------------------------------------------- 2182@node netgrpd Selector Function, in_network Selector Function, netgrp Selector Function, Selectors 2183@comment node-name, next, previous, up 2184@subsubsection netgrpd Selector Function 2185@cindex netgrpd Selector Function 2186@cindex netgrpd, boolean mount selector 2187@cindex !netgrpd, boolean mount selector 2188@cindex Mount selector; netgrpd 2189@cindex Selector; netgrpd 2190 2191If the current host as determined by the value of @code{$@{hostd@}} is a 2192member of the netgroup @i{ARG}, this selector evaluates to true. 2193Otherwise it evaluates to false. 2194 2195The @samp{netgrpd} function uses fully-qualified host names 2196(@code{$@{hostd@}}) to match netgroup names, while the @samp{netgrp} 2197function (@pxref{netgrp Selector Function}) uses short host names 2198(@code{$@{host@}}). 2199 2200@c ---------------------------------------------------------------- 2201@node in_network Selector Function, true Selector Function, netgrpd Selector Function, Selectors 2202@comment node-name, next, previous, up 2203@subsubsection in_network Selector Function 2204@cindex in_network Selector Function 2205@cindex in_network, boolean mount selector 2206@cindex !in_network, boolean mount selector 2207@cindex Mount selector; in_network 2208@cindex Selector; in_network 2209 2210This selector matches against any network name or number with an 2211optional netmask. First, if the current host has any network interface that is 2212locally attached to the network specified in @i{ARG} (either via name or 2213number), this selector evaluates to true. 2214 2215Second, @samp{in_network} supports a network/netmask syntax such as 2216@samp{128.59.16.0/255.255.255.0}, @samp{128.59.16.0/24}, 2217@samp{128.59.16.0/0xffffff00}, or @samp{128.59.16.0/}. Using the last 2218form, @i{Amd} will match the specified network number against the 2219default netmasks of each of the locally attached interfaces. 2220 2221If the selector does not match, it evaluates to false. 2222 2223For example, suppose you have two servers that have an exportable 2224@file{/opt} that smaller clients can NFS mount. The two servers are 2225say, @samp{serv1} on network @samp{foo-net.site.com} and @samp{serv2} on 2226network @samp{123.4.5.0}. You can write a map to be used by all clients 2227that will attempt to mount the closest one as follows: 2228 2229@example 2230opt in_network(foo-net.site.com);rhost:=serv1;rfs:=/opt \ 2231 in_network(123.4.5.0);rhost:=serv2;rfs:=/opt \ 2232 rhost:=fallback-server 2233@end example 2234 2235@c ---------------------------------------------------------------- 2236@node true Selector Function, , in_network Selector Function, Selectors 2237@comment node-name, next, previous, up 2238@subsubsection true Selector Function 2239@cindex true Selector Function 2240@cindex true, boolean mount selector 2241@cindex !true, boolean mount selector 2242@cindex Mount selector; true 2243@cindex Selector; true 2244 2245Always evaluates to true. @i{ARG} is ignored. 2246 2247@c ================================================================ 2248@node Map Options, , Selectors, Location Format 2249@comment node-name, next, previous, up 2250@subsection Map Options 2251@cindex Map options 2252@cindex Setting map options 2253 2254Options are parsed concurrently with selectors. The difference is that 2255when an option is seen the string following the @samp{:=} is 2256recorded for later use. As a minimum the @var{type} option must be 2257specified. Each filesystem type has other options which must also be 2258specified. @xref{Filesystem Types}, for details on the filesystem 2259specific options.@refill 2260 2261Superfluous option specifications are ignored and are not reported 2262as errors. 2263 2264The following options apply to more than one filesystem type. 2265 2266@menu 2267* addopts Option:: 2268* delay Option:: 2269* fs Option:: 2270* opts Option:: 2271* remopts Option:: 2272* sublink Option:: 2273* type Option:: 2274@end menu 2275 2276@node addopts Option, delay Option, Map Options, Map Options 2277@comment node-name, next, previous, up 2278@subsubsection addopts Option 2279@cindex Setting additional options on a mount location 2280@cindex Overriding or adding options to a mount 2281@cindex addopts, mount option 2282@cindex Mount option; addopts 2283 2284This option adds additional options to default options normally 2285specified in the @samp{/defaults} entry or the defaults of the key entry 2286being processed (@pxref{opts Option}). Normally when you specify 2287@samp{opts} in both the @samp{/defaults} and the map entry, the latter 2288overrides the former completely. But with @samp{addopts} it will append 2289the options and override any conflicting ones. 2290 2291@samp{addopts} also overrides the value of the @samp{remopts} option 2292(@pxref{remopts Option}), which unless specified defaults to the value 2293of @samp{opts}. 2294 2295Options which start with @samp{no} will override those with the same 2296name that do not start with @samp{no} and vice verse. Special handling 2297is given to inverted options such as @samp{soft} and @samp{hard}, 2298@samp{bg} and @samp{fg}, @samp{ro} and @samp{rw}, etc. 2299 2300For example, if the default options specified were 2301@example 2302opts:=rw,nosuid,intr,rsize=1024,wsize=1024,quota,posix 2303@end example 2304 2305and the ones specified in a map entry were 2306 2307@example 2308addopts:=grpid,suid,ro,rsize=2048,quota,nointr 2309@end example 2310 2311then the actual options used would be 2312 2313@example 2314wsize=1024,posix,grpid,suid,ro,rsize=2048,quota,nointr 2315@end example 2316 2317@node delay Option, fs Option, addopts Option, Map Options 2318@comment node-name, next, previous, up 2319@subsubsection delay Option 2320@cindex Setting a delay on a mount location 2321@cindex Delaying mounts from specific locations 2322@cindex Primary server 2323@cindex Secondary server 2324@cindex delay, mount option 2325@cindex Mount option; delay 2326 2327The delay, in seconds, before an attempt will be made to mount from the 2328current location. Auxiliary data, such as network address, file handles 2329and so on are computed regardless of this value. 2330 2331A delay can be used to implement the notion of primary and secondary 2332file servers. The secondary servers would have a delay of a few 2333seconds, thus giving the primary servers a chance to respond first. 2334 2335@node fs Option, opts Option, delay Option, Map Options 2336@comment node-name, next, previous, up 2337@subsubsection fs Option 2338@cindex Setting the local mount point 2339@cindex Overriding the default mount point 2340@cindex fs, mount option 2341@cindex Mount option; fs 2342 2343The local mount point. The semantics of this option vary between 2344filesystems. 2345 2346For NFS and UFS filesystems the value of @code{$@{fs@}} is used as the 2347local mount point. For other filesystem types it has other meanings 2348which are described in the section describing the respective filesystem 2349type. It is important that this string uniquely identifies the 2350filesystem being mounted. To satisfy this requirement, it should 2351contain the name of the host on which the filesystem is resident and the 2352pathname of the filesystem on the local or remote host. 2353 2354The reason for requiring the hostname is clear if replicated filesystems 2355are considered. If a fileserver goes down and a replacement filesystem 2356is mounted then the @dfn{local} mount point @dfn{must} be different from 2357that of the filesystem which is hung. Some encoding of the filesystem 2358name is required if more than one filesystem is to be mounted from any 2359given host. 2360 2361If the hostname is first in the path then all mounts from a particular 2362host will be gathered below a single directory. If that server goes 2363down then the hung mount points are less likely to be accidentally 2364referenced, for example when @b{getcwd}(3) traverses the namespace to 2365find the pathname of the current directory. 2366 2367The @samp{fs} option defaults to 2368@code{$@{autodir@}/$@{rhost@}$@{rfs@}}. In addition, 2369@samp{rhost} defaults to the local host name (@code{$@{host@}}) and 2370@samp{rfs} defaults to the value of @code{$@{path@}}, which is the full 2371path of the requested file; @samp{/home/foo} in the example above 2372(@pxref{Selectors}). @code{$@{autodir@}} defaults to @samp{/a} but may 2373be changed with the @code{-a} command line option. Sun's automounter 2374defaults to @samp{/tmp_mnt}. Note that there is no @samp{/} between 2375the @code{$@{rhost@}} and @code{$@{rfs@}} since @code{$@{rfs@}} begins 2376with a @samp{/}.@refill 2377 2378@node opts Option, remopts Option, fs Option, Map Options 2379@comment node-name, next, previous, up 2380@subsubsection opts Option 2381@cindex Setting system mount options 2382@cindex Passing parameters to the mount system call 2383@cindex mount system call 2384@cindex mount system call flags 2385@cindex The mount system call 2386@cindex opts, mount option 2387@cindex Mount option; opts 2388 2389The options to pass to the mount system call. A leading @samp{-} is 2390silently ignored. The mount options supported generally correspond to 2391those used by @b{mount}(8) and are listed below. Some additional 2392pseudo-options are interpreted by @i{Amd} and are also listed. 2393 2394Unless specifically overridden, each of the system default mount options 2395applies. Any options not recognized are ignored. If no options list is 2396supplied the string @samp{rw,defaults} is used and all the system 2397default mount options apply. Options which are not applicable for a 2398particular operating system are silently ignored. For example, only 4.4BSD 2399is known to implement the @code{compress} and @code{spongy} options. 2400 2401@table @code 2402 2403@item acdirmax=@var{n} 2404@cindex Mount flags; acdirmax 2405Set the maximum directory attribute cache timeout to @var{n}. 2406 2407@item acdirmin=@var{n} 2408@cindex Mount flags; acdirmin 2409Set the minimum directory attribute cache timeout to @var{n}. 2410 2411@item acregmax=@var{n} 2412@cindex Mount flags; acregmax 2413Set the maximum file attribute cache timeout to @var{n}. 2414 2415@item acregmin=@var{n} 2416@cindex Mount flags; acregmin 2417Set the minimum file attribute cache timeout to @var{n}. 2418 2419@item actimeo=@var{n} 2420@cindex Mount flags; actimeo 2421Set the overall attribute cache timeout to @var{n}. 2422 2423@item auto 2424@cindex Mount flags; auto 2425@itemx ignore 2426@cindex Mount flags; ignore 2427Ignore this mount by @b{df}(1). 2428 2429@item cache 2430@cindex Mount flags; cache 2431Allow data to be cached from a remote server for this mount. 2432 2433@item compress 2434@cindex Mount flags; compress 2435Use NFS compression protocol. 2436 2437@item defperm 2438@cindex Mount flags; defperm 2439Ignore the permission mode bits, and default file permissions to 0555, 2440UID 0, and GID 0. Useful for CD-ROMs formatted as ISO-9660. 2441 2442@item dev 2443@cindex Mount flags; dev 2444Allow local special devices on this filesystem. 2445 2446@item dumbtimr 2447@cindex Mount flags; dumbtimr 2448Turn off the dynamic retransmit timeout estimator. This may be useful 2449for UDP mounts that exhibit high retry rates, since it is possible that 2450the dynamically estimated timeout interval is too short. 2451 2452@item extatt 2453@cindex Mount flags; extatt 2454Enable extended attributes in ISO-9660 file systems. 2455 2456@item fsid 2457@cindex Mount flags; fsid 2458Set ID of filesystem. 2459 2460@item gens 2461@cindex Mount flags; gens 2462Enable generations in ISO-9660 file systems. Generations allow you to 2463see all versions of a given file. 2464 2465@item grpid 2466@cindex Mount flags; grpid 2467Use BSD directory group-id semantics. 2468 2469@item int 2470@cindex Mount flags; int 2471@itemx intr 2472@cindex Mount flags; intr 2473Allow keyboard interrupts on hard mounts. 2474 2475@item lock 2476@cindex Mount flags; lock 2477Use the NFS locking protocol (default) 2478 2479@item multi 2480@cindex Mount flags; multi 2481Perform multi-component lookup on files. 2482 2483@item maxgroups 2484@cindex Mount flags; maxgroups 2485Set the maximum number of groups to allow for this mount. 2486 2487@item nfsv3 2488@cindex Mount flags; nfsv3 2489Use NFS Version 3 for this mount. 2490 2491@item noac 2492@cindex Mount flags; noac 2493Turn off the attribute cache. 2494 2495@item noauto 2496@cindex Mount flags; noauto 2497This option is used by the mount command in @samp{/etc/fstab} or 2498@samp{/etc/vfstab} and means not to mount this file system when mount -a 2499is used. 2500 2501@item nocache 2502@cindex Mount flags; nocache 2503Do not allow data to be cached from a remote server for this 2504mount. 2505 2506@item noconn 2507@cindex Mount flags; noconn 2508Don't make a connection on datagram transports. 2509 2510@item nocto 2511@cindex Mount flags; nocto 2512No close-to-open consistency. 2513 2514@item nodefperm 2515@cindex Mount flags; nodefperm 2516Do not ignore the permission mode bits. Useful for CD-ROMS formatted as 2517ISO-9660. 2518 2519@item nodev 2520@cindex Mount flags; nodev 2521@itemx nodevs 2522@cindex Mount flags; nodevs 2523Don't allow local special devices on this filesystem. 2524 2525@item noexec 2526@cindex Mount flags; noexec 2527Don't allow program execution. 2528 2529@item noint 2530@cindex Mount flags; noint 2531Do not allow keyboard interrupts for this mount 2532 2533@item nolock 2534@cindex Mount flags; nolock 2535Do not use the NFS locking protocol 2536 2537@item nomnttab 2538@cindex Mount flags; nomnttab 2539This option is used internally to tell Amd that a Solaris 8 system using 2540mntfs is in use. 2541 2542@item norrip 2543@cindex Mount flags; norrip 2544Turn off using of the Rock Ridge Interchange Protocol (RRIP) extensions 2545to ISO-9660. 2546 2547@item nosub 2548@cindex Mount flags; nosub 2549Disallow mounts beneath this mount. 2550 2551@item nosuid 2552@cindex Mount flags; nosuid 2553Don't allow set-uid or set-gid executables on this filesystem. 2554 2555@item noversion 2556@cindex Mount flags; noversion 2557Strip the extension @samp{;#} from the version string of files recorded 2558on an ISO-9660 CD-ROM. 2559 2560@item optionstr 2561@cindex Mount flags; optionstr 2562Under Solaris 8, provide the kernel a string of options to parse and 2563show as part of the special in-kernel mount file system. 2564 2565@item overlay 2566@cindex Mount flags; overlay 2567Overlay this mount on top of an existing mount, if any. 2568 2569@item pgthresh=@var{n} 2570@cindex Mount flags; pgthresh 2571Set the paging threshold to @var{n} kilobytes. 2572 2573@item port=@var{n} 2574@cindex Mount flags; port 2575Set the NFS port to @var{n}. 2576 2577@item posix 2578@cindex Mount flags; posix 2579Turn on POSIX static pathconf for mounts. 2580 2581@item proplist 2582@cindex Mount flags; proplist 2583Support property lists (ACLs) for this mount, useful primarily for DU-4.0. 2584 2585@item proto=@var{s} 2586@cindex Mount flags; proto 2587Use transport protocol @var{s} for NFS (can be @code{"tcp"} or @code{"udp"}). 2588 2589@item quota 2590@cindex Mount flags; quota 2591Enable quota checking on this mount. 2592 2593@item rdonly 2594@cindex Mount flags; rdonly 2595@itemx ro 2596@cindex Mount flags; ro 2597Mount this filesystem readonly. 2598 2599@item resvport 2600@cindex Mount flags; resvport 2601Use a reserved port (smaller than 1024) for remote NFS mounts. Most 2602systems assume that, but some allow for mounts to occur on non-reserved 2603ports. This causes problems when such a system tries to NFS mount one 2604that requires reserved ports. It is recommended that this option always 2605be on. 2606 2607@item retrans=@i{n} 2608@cindex Mount flags; retrans 2609The number of NFS retransmits made before a user error is generated by a 2610@samp{soft} mounted filesystem, and before a @samp{hard} mounted 2611filesystem reports @samp{NFS server @dfn{yoyo} not responding still 2612trying}. 2613 2614@item retry 2615@cindex Mount flags; retry 2616Set the NFS retry counter. 2617 2618@item rrip 2619@cindex Mount flags; rrip 2620Uses the Rock Ridge Interchange Protocol (RRIP) extensions to ISO-9660. 2621 2622@item rsize=@var{n} 2623@cindex Mount flags; rsize 2624The NFS read packet size. You may need to set this if you are using 2625NFS/UDP through a gateway or a slow link. 2626 2627@item rw 2628@cindex Mount flags; rw 2629Allow reads and writes on this filesystem. 2630 2631@item soft 2632@cindex Mount flags; soft 2633Give up after @dfn{retrans} retransmissions. 2634 2635@item spongy 2636@cindex Mount flags; spongy 2637Like @samp{soft} for status requests, and @samp{hard} for data transfers. 2638 2639@item suid 2640@cindex Mount flags; suid 2641Allow set-uid programs on this mount. 2642 2643@item symttl 2644@cindex Mount flags; symttl 2645Turn off the symbolic link cache time-to-live. 2646 2647@item sync 2648@cindex Mount flags; sync 2649Perform synchronous filesystem operations on this mount. 2650 2651@item tcp 2652@cindex Mount flags; tcp 2653Use TCP/IP instead of UDP/IP, ignored if the NFS implementation does not 2654support TCP/IP mounts. 2655 2656@item timeo=@var{n} 2657@cindex Mount flags; timeo 2658The NFS timeout, in tenth-seconds, before a request is retransmitted. 2659 2660@item vers=@var{n} 2661@cindex Mount flags; vers 2662 Use NFS protocol version number @var{n} (can be 2 or 3). 2663 2664@item wsize=@var{n} 2665@cindex Mount flags; wsize 2666The NFS write packet size. You may need to set this if you are using 2667NFS/UDP through a gateway or a slow link. 2668 2669@end table 2670 2671The following options are implemented by @i{Amd}, rather than being 2672passed to the kernel. 2673 2674@table @code 2675 2676@item nounmount 2677@cindex Mount flags; nounmount 2678Configures the mount so that its time-to-live will never expire. This 2679is the default for non-network based filesystem types (such as 2680mounting local disks, floppies, and CD-ROMs). See also the related 2681@i{unmount} option. 2682@c 2683@c Implementation broken: 2684 2685@item ping=@var{n} 2686@cindex Mount flags; ping 2687The interval, in seconds, between keep-alive pings. When four 2688consecutive pings have failed the mount point is marked as hung. This 2689interval defaults to 30 seconds. If the ping interval is less than zero, 2690no pings are sent and the host is assumed to be always 2691up. By default, pings are not sent for an NFS/TCP mount. 2692 2693@item retry=@var{n} 2694@cindex Mount flags; retry=@var{n} 2695The number of times to retry the mount system call. 2696 2697@item unmount 2698@cindex Mount flags; unmount 2699Configures the mount so that its time-to-live will indeed expire (and 2700thus may be automatically unmounted). This is also the default for 2701network-based filesystem types (e.g., NFS). This option is useful for 2702removable local media such as CD-ROMs, USB drives, etc. so they can 2703expire when not in use, and get unmounted (such drives can get work 2704out when they keep spinning). See also the related @i{nounmount} 2705option. 2706 2707@item utimeout=@var{n} 2708@cindex Mount flags; utimeout=@var{n} 2709The interval, in seconds, by which the mount's 2710time-to-live is extended after an unmount attempt 2711has failed. In fact the interval is extended before the unmount is 2712attempted to avoid thrashing. The default value is 120 seconds (two 2713minutes) or as set by the @code{-w} command line option. 2714 2715@end table 2716 2717@node remopts Option, sublink Option, opts Option, Map Options 2718@comment node-name, next, previous, up 2719@subsubsection remopts Option 2720@cindex Setting system mount options for non-local networks 2721@cindex remopts, mount option 2722@cindex Mount option; remopts 2723 2724This option has the same use as @code{$@{opts@}} but applies only when 2725the remote host is on a non-local network. For example, when using NFS 2726across a gateway it is often necessary to use smaller values for the 2727data read and write sizes. This can simply be done by specifying the 2728small values in @var{remopts}. When a non-local host is accessed, the 2729smaller sizes will automatically be used. 2730 2731@i{Amd} determines whether a host is local by examining the network 2732interface configuration at startup. Any interface changes made after 2733@i{Amd} has been started will not be noticed. The likely effect will 2734be that a host may incorrectly be declared non-local. 2735 2736Unless otherwise set, the value of @code{$@{remopts@}} is the same as 2737the value of @code{$@{opts@}}. 2738 2739@node sublink Option, type Option, remopts Option, Map Options 2740@comment node-name, next, previous, up 2741@subsubsection sublink Option 2742@cindex Setting the sublink option 2743@cindex sublink, mount option 2744@cindex Mount option; sublink 2745 2746The subdirectory within the mounted filesystem to which the reference 2747should point. This can be used to prevent duplicate mounts in cases 2748where multiple directories in the same mounted filesystem are used. 2749 2750@node type Option, , sublink Option, Map Options 2751@comment node-name, next, previous, up 2752@subsubsection type Option 2753@cindex Setting the filesystem type option 2754@cindex type, mount option 2755@cindex Mount option; type 2756 2757The filesystem type to be used. @xref{Filesystem Types}, for a full 2758description of each type.@refill 2759 2760@c ################################################################ 2761@node Amd Command Line Options, Filesystem Types, Mount Maps, Top 2762@comment node-name, next, previous, up 2763@chapter @i{Amd} Command Line Options 2764@cindex Command line options, Amd 2765@cindex Amd command line options 2766@cindex Overriding defaults on the command line 2767 2768Many of @i{Amd}'s parameters can be set from the command line. The 2769command line is also used to specify automount points and maps. 2770 2771The general format of a command line is 2772 2773@example 2774amd [@i{options}] [@{ @i{directory} @i{map-name} [-@i{map-options}] @} ...] 2775@end example 2776 2777For each directory and map-name given or specified in the 2778@file{amd.conf} file, @i{Amd} establishes an automount point. The 2779@dfn{map-options} may be any sequence of options or 2780selectors---@pxref{Location Format}. The @dfn{map-options} apply only 2781to @i{Amd}'s mount point. 2782 2783@samp{type:=toplvl;cache:=mapdefault;fs:=$@{map@}} is the default value for the 2784map options. Default options for a map are read from a special entry in 2785the map whose key is the string @samp{/defaults}. When default options 2786are given they are prepended to any options specified in the mount-map 2787locations as explained in @ref{Map Defaults}. 2788 2789The @dfn{options} are any combination of those listed below. 2790 2791Once the command line has been parsed, the automount points are mounted. 2792The mount points are created if they do not already exist, in which case they 2793will be removed when @i{Amd} exits. 2794Finally, @i{Amd} disassociates itself from its controlling terminal and 2795forks into the background. 2796 2797Note: Even if @i{Amd} has been built with @samp{-DDEBUG} (via 2798@code{configure --enable-debug}), it will still background itself and 2799disassociate itself from the controlling terminal. To use a debugger it 2800is necessary to specify @samp{-D nodaemon} on the command line. 2801However, even with all of this, mounts and unmounts are performed in the 2802background, and @i{Amd} will always fork before doing them. Therefore, 2803debugging what happens closely during un/mounts is more challenging. 2804 2805@emph{All} of @i{Amd}'s command options (save @code{-F} and @code{-T}) 2806can be specified in the @file{amd.conf} file. @xref{Amd Configuration 2807File}. If @i{Amd} is invoked without any command line options, it will 2808default to using the configuration file @file{/etc/amd.conf}, if one 2809exists. 2810 2811@menu 2812* -a Option:: Automount directory. 2813* -c Option:: Cache timeout interval. 2814* -d Option:: Domain name. 2815* -k Option:: Kernel architecture. 2816* -l Option:: Log file. 2817* -n Option:: Hostname normalization. 2818* -o Option:: Operating system version. 2819* -p Option:: Output process id. 2820* -r Option:: Restart existing mounts. 2821* -t Option:: Kernel RPC timeout. 2822* -v Option:: Version information. 2823* -w Option:: Wait interval after failed unmount. 2824* -x Option:: Log options. 2825* -y Option:: NIS domain. 2826* -C-Option:: Cluster name. 2827* -D-Option:: Debug flags. 2828* -F Option:: Amd configuration file. 2829* -H Option:: Show brief help. 2830* -O-Option:: Operating system name. 2831* -S Option:: Lock executable pages in memory. 2832* -T-Option:: Set tag for configuration file. 2833@end menu 2834 2835@c ---------------------------------------------------------------- 2836@node -a Option, -c Option, Amd Command Line Options, Amd Command Line Options 2837@comment node-name, next, previous, up 2838@section @code{-a} @var{directory} 2839@cindex Automount directory 2840@cindex Setting the default mount directory 2841 2842Specifies the default mount directory. This option changes the variable 2843@code{$@{autodir@}} which otherwise defaults to @file{/a}. For example, 2844some sites prefer @file{/amd} or @file{/n}. 2845 2846@example 2847amd -a /amd ... 2848@end example 2849 2850@c ---------------------------------------------------------------- 2851@node -c Option, -d Option, -a Option, Amd Command Line Options 2852@comment node-name, next, previous, up 2853@section @code{-c} @var{cache-interval} 2854@cindex Cache interval 2855@cindex Interval before a filesystem times out 2856@cindex Setting the interval before a filesystem times out 2857@cindex Changing the interval before a filesystem times out 2858 2859Selects the period, in seconds, for which a name is cached by @i{Amd}. 2860If no reference is made to the volume in this period, @i{Amd} discards 2861the volume name to filesystem mapping. 2862 2863Once the last reference to a filesystem has been removed, @i{Amd} 2864attempts to unmount the filesystem. If the unmount fails the interval 2865is extended by a further period as specified by the @samp{-w} command 2866line option or by the @samp{utimeout} mount option. 2867 2868The default @dfn{cache-interval} is 300 seconds (five minutes). 2869 2870@c ---------------------------------------------------------------- 2871@node -d Option, -k Option, -c Option, Amd Command Line Options 2872@comment node-name, next, previous, up 2873@section @code{-d} @var{domain} 2874@cindex Domain name 2875@cindex Setting the local domain name 2876@cindex Overriding the local domain name 2877 2878Specifies the host's domain. This sets the internal variable 2879@code{$@{domain@}} and affects the @code{$@{hostd@}} variable. 2880 2881If this option is not specified and the hostname already contains the 2882local domain then that is used, otherwise the default value of 2883@code{$@{domain@}} is @samp{unknown.domain}. 2884 2885For example, if the local domain was @samp{doc.ic.ac.uk}, @i{Amd} could 2886be started as follows: 2887 2888@example 2889amd -d doc.ic.ac.uk ... 2890@end example 2891 2892@c ---------------------------------------------------------------- 2893@node -k Option, -l Option, -d Option, Amd Command Line Options 2894@comment node-name, next, previous, up 2895@section @code{-k} @var{kernel-architecture} 2896@cindex Setting the Kernel architecture 2897 2898Specifies the kernel architecture of the system. This is usually the 2899output of @samp{uname -m} (the ``machine'' value gotten from 2900@b{uname}(2)). If the @b{uname}(2) system call is not available, the 2901value of @code{$@{karch@}} defaults to that of @code{$@{arch@}}. 2902 2903The only effect of this option is to set the variable @code{$@{karch@}}. 2904 2905This option would be used as follows: 2906 2907@example 2908amd -k `arch -k` ... 2909@end example 2910 2911@c ---------------------------------------------------------------- 2912@node -l Option, -n Option, -k Option, Amd Command Line Options 2913@comment node-name, next, previous, up 2914@section @code{-l} @var{log-option} 2915@cindex Log filename 2916@cindex Setting the log file 2917@cindex Using syslog to log errors 2918@cindex syslog 2919 2920Selects the form of logging to be made. Several special @dfn{log-options} 2921are recognized. 2922 2923@enumerate 2924@item 2925If @dfn{log-option} is the string @samp{syslog}, @i{Amd} will use the 2926@b{syslog}(3) mechanism. If your system supports syslog facilities, then 2927the default facility used is @samp{LOG_DAEMON}. 2928 2929@item 2930@cindex syslog facility; specifying an alternate 2931When using syslog, if you wish to change the facility, append its name 2932to the log option name, delimited by a single colon. For example, if 2933@dfn{log-options} is the string @samp{syslog:local7} then @b{Amd} will 2934log messages via @b{syslog}(3) using the @samp{LOG_LOCAL7} facility. If 2935the facility name specified is not recognized, @i{Amd} will default to 2936@samp{LOG_DAEMON}. Note: while you can use any syslog facility 2937available on your system, it is generally a bad idea to use those 2938reserved for other services such as @samp{kern}, @samp{lpr}, 2939@samp{cron}, etc. 2940 2941@item 2942If @dfn{log-option} is the string @samp{/dev/stderr}, @i{Amd} will use 2943standard error, which is also the default target for log messages. To 2944implement this, @i{Amd} simulates the effect of the @samp{/dev/fd} 2945driver. 2946@end enumerate 2947 2948Any other string is taken as a filename to use for logging. Log 2949messages are appended to the file if it already exists, otherwise a new 2950file is created. The file is opened once and then held open, rather 2951than being re-opened for each message. 2952 2953Normally, when long-running daemons hold an open file descriptor on a 2954log file, it is impossible to ``rotate'' the log file and compress older 2955logs on a daily basis. The daemon needs to be told to discard (via 2956@b{close}(2)) its file handle, and re-open the log file. This is done 2957using @code{amq -l} @i{log-option}. @xref{Amq -l option}. 2958 2959If the @samp{syslog} option is specified but the system does not support 2960syslog or if the named file cannot be opened or created, @i{Amd} will 2961use standard error. Error messages generated before @i{Amd} has 2962finished parsing the command line are printed on standard error. 2963 2964Since @i{Amd} tends to generate a lot of logging information (especially 2965if debugging was turned on), and due to it being an important program 2966running on the system, it is usually best to log to a separate disk 2967file. In that case @i{Amd} would be started as follows: 2968 2969@example 2970amd -l /var/log/amd ... 2971@end example 2972 2973@c ---------------------------------------------------------------- 2974@node -n Option, -o Option, -l Option, Amd Command Line Options 2975@comment node-name, next, previous, up 2976@section @code{-n} 2977@cindex Hostname normalization 2978@cindex Aliased hostnames 2979@cindex Resolving aliased hostnames 2980@cindex Normalizing hostnames 2981 2982Normalizes the remote hostname before using it. Normalization is done 2983by replacing the value of @code{$@{rhost@}} with the (generally fully 2984qualified) primary name returned by a hostname lookup. 2985 2986This option should be used if several names are used to refer to a 2987single host in a mount map. 2988 2989@c ---------------------------------------------------------------- 2990@node -o Option, -p Option, -n Option, Amd Command Line Options 2991@comment node-name, next, previous, up 2992@section @code{-o} @var{op-sys-ver} 2993@cindex Operating System version 2994@cindex Setting the Operating System version 2995 2996Overrides the compiled-in version number of the operating system, with 2997@var{op-sys-ver}. Useful when the built-in version is not desired for 2998backward compatibility reasons. For example, if the built-in version is 2999@samp{2.5.1}, you can override it to @samp{5.5.1}, and use older maps 3000that were written with the latter in mind. 3001 3002@c ---------------------------------------------------------------- 3003@node -p Option, -r Option, -o Option, Amd Command Line Options 3004@comment node-name, next, previous, up 3005@section @code{-p} 3006@cindex Process id 3007@cindex Displaying the process id 3008@cindex process id of Amd daemon 3009@cindex pid file, creating with -p option 3010@cindex Creating a pid file 3011 3012Causes @i{Amd}'s process id to be printed on standard output. 3013This can be redirected to a suitable file for use with kill: 3014 3015@example 3016amd -p > /var/run/amd.pid ... 3017@end example 3018 3019This option only has an affect if @i{Amd} is running in daemon mode. 3020If @i{Amd} is started with the @code{-D nodaemon} debug flag, this 3021option is ignored. 3022 3023@c ---------------------------------------------------------------- 3024@node -r Option, -t Option, -p Option, Amd Command Line Options 3025@comment node-name, next, previous, up 3026@section @code{-r} 3027@cindex Restarting existing mounts 3028@cindex Picking up existing mounts 3029 3030Tells @i{Amd} to restart existing mounts (@pxref{Inheritance Filesystem}). 3031@c @dfn{This option will be made the default in the next release.} 3032 3033@c ---------------------------------------------------------------- 3034@node -t Option, -v Option, -r Option, Amd Command Line Options 3035@comment node-name, next, previous, up 3036@section @code{-t} @var{timeout.retransmit} 3037@cindex Setting Amd's RPC parameters 3038 3039Specifies the RPC @dfn{timeout} interval and the @dfn{retransmit} 3040counter used by the kernel to communicate to @i{Amd}. These are used to 3041set the @samp{timeo} and @samp{retrans} mount options, respectively. 3042The default timeout is 0.8 seconds, and the default number of 3043retransmissions is 11. 3044 3045@i{Amd} relies on the kernel RPC retransmit mechanism to trigger mount 3046retries. The values of these parameters change the overall retry 3047interval. Too long an interval gives poor interactive response; too 3048short an interval causes excessive retries. 3049 3050@c ---------------------------------------------------------------- 3051@node -v Option, -w Option, -t Option, Amd Command Line Options 3052@comment node-name, next, previous, up 3053@section @code{-v} 3054@cindex Version information 3055@cindex Discovering version information 3056@cindex How to discover your version of Amd 3057 3058Print version information on standard error and then exit. The output 3059is of the form: 3060 3061@example 3062Copyright (c) 1997-1999 Erez Zadok 3063Copyright (c) 1990 Jan-Simon Pendry 3064Copyright (c) 1990 Imperial College of Science, Technology & Medicine 3065Copyright (c) 1990 The Regents of the University of California. 3066am-utils version 6.0a15 (build 61). 3067Built by ezk@@cs.columbia.edu on date Wed Oct 22 15:21:03 EDT 1997. 3068cpu=sparc (big-endian), arch=sun4, karch=sun4u. 3069full_os=solaris2.5.1, os=sos5, osver=5.5.1, vendor=sun. 3070Map support for: root, passwd, union, nisplus, nis, ndbm, file, error. 3071AMFS: nfs, link, nfsx, nfsl, host, linkx, program, union, inherit, 3072 ufs, lofs, hsfs, pcfs, auto, direct, toplvl, error. 3073FS: cachefs, cdfs, lofs, nfs, nfs3, pcfs, tfs, tmpfs, ufs. 3074Network 1: wire="mcl-lab-net.cs.columbia.edu" (netnumber=128.59.13). 3075Network 2: wire="14-net.cs.columbia.edu" (netnumber=128.59.14). 3076Network 3: wire="old-net.cs.columbia.edu" (netnumber=128.59.16). 3077@end example 3078 3079The information includes the version number, number of times @i{Amd} was 3080compiled on the local system, release date and name of the release. 3081Following come the cpu type, byte ordering, and the architecture and 3082kernel architecture as @code{$@{arch@}} and @code{$@{karch@}}, 3083respectively. The next line lists the operating system full name, short 3084name, version, and vendor. These four values correspond to the 3085variables @code{$@{full_os@}}, @code{$@{os@}}, @code{$@{osver@}}, and 3086@code{$@{vendor@}}, respectively. @xref{Supported Platforms}. 3087 3088Then come a list of map types supported, filesystems internally 3089supported by @i{Amd} (AMFS), and generic filesystems available (FS). 3090Finally all known networks (if any) of this host are listed by name 3091and number. They are available via the variables 3092@code{$@{wire@}} or @code{$@{network@}}, and 3093@code{$@{netnumber@}} (@pxref{Selectors}) or the @samp{in_network} 3094selector function (@pxref{in_network Selector Function}). 3095 3096@c ---------------------------------------------------------------- 3097@node -w Option, -x Option, -v Option, Amd Command Line Options 3098@comment node-name, next, previous, up 3099@section @code{-w} @var{wait-timeout} 3100@cindex Setting the interval between unmount attempts 3101@cindex unmount attempt backoff interval 3102 3103Selects the interval in seconds between unmount attempts after the 3104initial time-to-live has expired. 3105 3106This defaults to 120 seconds (two minutes). 3107 3108@c ---------------------------------------------------------------- 3109@node -x Option, -y Option, -w Option, Amd Command Line Options 3110@comment node-name, next, previous, up 3111@section @code{-x} @var{opts} 3112@cindex Log message selection 3113@cindex Selecting specific log messages 3114@cindex How to select log messages 3115@cindex syslog priorities 3116 3117Specifies the type and verbosity of log messages. @dfn{opts} is 3118a comma separated list selected from the following options: 3119 3120@table @code 3121@item fatal 3122Fatal errors 3123@item error 3124Non-fatal errors 3125@item user 3126Non-fatal user errors 3127@item warn 3128Recoverable errors 3129@item warning 3130Alias for @code{warn} 3131@item info 3132Information messages 3133@item map 3134Mount map usage 3135@item stats 3136Additional statistics 3137@item all 3138All of the above 3139@end table 3140 3141Initially a set of default logging flags is enabled. This is as if 3142@samp{-x all,nomap,nostats} had been selected. The command line is 3143parsed and logging is controlled by the @code{-x} option. The very first 3144set of logging flags is saved and can not be subsequently disabled using 3145@i{Amq}. This default set of options is useful for general production 3146use.@refill 3147 3148The @samp{info} messages include details of what is mounted and 3149unmounted and when filesystems have timed out. If you want to have the 3150default set of messages without the @samp{info} messages then you simply 3151need @samp{-x noinfo}. The messages given by @samp{user} relate to 3152errors in the mount maps, so these are useful when new maps are 3153installed. The following table lists the syslog priorities used for each 3154of the message types.@refill 3155 3156@table @code 3157@item fatal 3158@samp{LOG_CRIT} 3159@item error 3160@samp{LOG_ERR} 3161@item user 3162@samp{LOG_WARNING} 3163@item warning 3164@samp{LOG_WARNING} 3165@item info 3166@samp{LOG_INFO} 3167@item debug 3168@samp{LOG_DEBUG} 3169@item map 3170@samp{LOG_DEBUG} 3171@item stats 3172@samp{LOG_INFO} 3173@end table 3174 3175 3176The options can be prefixed by the string @samp{no} to indicate 3177that this option should be turned off. For example, to obtain all 3178but @samp{info} messages the option @samp{-x all,noinfo} would be used. 3179 3180If @i{Amd} was built with debugging enabled the @code{debug} option is 3181automatically enabled regardless of the command line options. 3182 3183@c ---------------------------------------------------------------- 3184@node -y Option, -C-Option, -x Option, Amd Command Line Options 3185@comment node-name, next, previous, up 3186@section @code{-y} @var{NIS-domain} 3187@cindex NIS (YP) domain name 3188@cindex Overriding the NIS (YP) domain name 3189@cindex Setting the NIS (YP) domain name 3190@cindex YP domain name 3191 3192Selects an alternate NIS domain. This is useful for debugging and 3193cross-domain shared mounting. If this flag is specified, @i{Amd} 3194immediately attempts to bind to a server for this domain. 3195@c @i{Amd} refers to NIS maps when it starts, unless the @code{-m} option 3196@c is specified, and whenever required in a mount map. 3197 3198@c ---------------------------------------------------------------- 3199@node -C-Option, -D-Option, -y Option, Amd Command Line Options 3200@comment node-name, next, previous, up 3201@section @code{-C} @var{cluster-name} 3202@cindex Cluster names 3203@cindex Setting the cluster name 3204 3205Specifies the name of the cluster of which the local machine is a member. 3206The only effect is to set the variable @code{$@{cluster@}}. 3207The @dfn{cluster-name} is will usually obtained by running another command which uses 3208a database to map the local hostname into a cluster name. 3209@code{$@{cluster@}} can then be used as a selector to restrict mounting of 3210replicated data. 3211If this option is not given, @code{$@{cluster@}} has the same value as @code{$@{domain@}}. 3212This would be used as follows: 3213 3214@example 3215amd -C `clustername` ... 3216@end example 3217 3218@c ---------------------------------------------------------------- 3219@node -D-Option, -F Option, -C-Option, Amd Command Line Options 3220@comment node-name, next, previous, up 3221@section @code{-D} @var{opts} 3222@cindex Debug options 3223@cindex Setting debug flags 3224 3225Controls the verbosity and coverage of the debugging trace; @dfn{opts} 3226is a comma separated list of debugging options. The @code{-D} option is 3227only available if @i{Amd} was compiled with @samp{-DDEBUG}, or 3228configured with @code{configure --enable-debug}. The memory debugging 3229facilities (@samp{mem}) are only available if @i{Amd} was compiled with 3230@samp{-DDEBUG_MEM} (in addition to @samp{-DDEBUG}), or configured with 3231@code{configure --enable-debug=mem}. 3232 3233The most common options to use are @samp{-D trace} and @samp{-D test} 3234(which turns on all the useful debug options). As usual, every option 3235can be prefixed with @samp{no} to turn it off. 3236 3237@table @code 3238@item all 3239all options 3240@item amq 3241register for amq 3242@item daemon 3243enter daemon mode 3244@item fork 3245fork server 3246@item full 3247program trace 3248@item hrtime 3249print high resolution time stamps (only if @b{syslog}(3) is not used) 3250@item info 3251@cindex debugging hesiod resolver service 3252@cindex Hesiod; turning on RES_DEBUG 3253info service specific debugging (hesiod, nis, etc.) In the case of 3254hesiod maps, turns on the hesiod RES_DEBUG internal debugging option. 3255@item mem 3256trace memory allocations 3257@item mtab 3258use local @file{./mtab} file 3259@item readdir 3260show readdir progress 3261@item str 3262debug string munging 3263@item test 3264full debug but no daemon 3265@item trace 3266trace RPC protocol and NFS mount arguments 3267@item xdrtrace 3268trace XDR routines 3269@end table 3270 3271You may also refer to the program source for a more detailed explanation 3272of the available options. 3273 3274@c ---------------------------------------------------------------- 3275@node -F Option, -H Option, -D-Option, Amd Command Line Options 3276@comment node-name, next, previous, up 3277@section @code{-F} @var{conf-file} 3278@cindex Amd configuration file; specifying name 3279@cindex Amd configuration file 3280@cindex amd.conf file 3281 3282Specify an @i{Amd} configuration file @var{conf-file} to use. For a 3283description of the format and syntax, @pxref{Amd Configuration File}. 3284This configuration file is used to specify any options in lieu of typing 3285many of them on the command line. The @file{amd.conf} file includes 3286directives for every command line option @i{Amd} has, and many more that 3287are only available via the configuration file facility. The 3288configuration file specified by this option is processed after all other 3289options had been processed, regardless of the actual location of this 3290option on the command line. 3291 3292@c ---------------------------------------------------------------- 3293@node -H Option, -O-Option, -F Option, Amd Command Line Options 3294@comment node-name, next, previous, up 3295@section @code{-H} 3296@cindex Displaying brief help 3297@cindex Help; showing from Amd 3298 3299Print a brief help and usage string. 3300 3301@c ---------------------------------------------------------------- 3302@node -O-Option, -S Option, -H Option, Amd Command Line Options 3303@comment node-name, next, previous, up 3304@section @code{-O} @var{op-sys-name} 3305@cindex Operating System name 3306@cindex Setting the Operating System name 3307 3308Overrides the compiled-in name of the operating system, with 3309@var{op-sys-name}. Useful when the built-in name is not desired for 3310backward compatibility reasons. For example, if the build in name is 3311@samp{sunos5}, you can override it to the old name @samp{sos5}, and use 3312older maps which were written with the latter in mind. 3313 3314@c ---------------------------------------------------------------- 3315@node -S Option, -T-Option, -O-Option, Amd Command Line Options 3316@comment node-name, next, previous, up 3317@section @code{-S} 3318@cindex plock; using 3319@cindex locking executable pages in memory 3320 3321Do @emph{not} lock the running executable pages of @i{Amd} into memory. 3322To improve @i{Amd}'s performance, systems that support the @b{plock}(3) 3323call lock the @i{Amd} process into memory. This way there is less 3324chance the operating system will schedule, page out, and swap the 3325@i{Amd} process as needed. This tends to improve @i{Amd}'s performance, 3326at the cost of reserving the memory used by the @i{Amd} process (making 3327it unavailable for other processes). If this behavior is not desired, 3328use the @code{-S} option. 3329 3330@c ---------------------------------------------------------------- 3331@node -T-Option, , -S Option, Amd Command Line Options 3332@comment node-name, next, previous, up 3333@section @code{-T} @var{tag} 3334@cindex Tags for Amd configuration file 3335@cindex Configuration file; tags 3336 3337Specify a tag to use with @file{amd.conf}. All map entries tagged with 3338@var{tag} will be processed. Map entries that are not tagged are always 3339processed. Map entries that are tagged with a tag other than @var{tag} 3340will not be processed. 3341 3342@c ################################################################ 3343@node Filesystem Types, Amd Configuration File, Amd Command Line Options, Top 3344@comment node-name, next, previous, up 3345@chapter Filesystem Types 3346@cindex Filesystem types 3347@cindex Mount types 3348@cindex Types of filesystem 3349 3350To mount a volume, @i{Amd} must be told the type of filesystem to be 3351used. Each filesystem type typically requires additional information 3352such as the fileserver name for NFS. 3353 3354From the point of view of @i{Amd}, a @dfn{filesystem} is anything that 3355can resolve an incoming name lookup. An important feature is support 3356for multiple filesystem types. Some of these filesystems are 3357implemented in the local kernel and some on remote fileservers, whilst 3358the others are implemented internally by @i{Amd}.@refill 3359 3360The two common filesystem types are UFS and NFS. Four other user 3361accessible filesystems (@samp{link}, @samp{program}, @samp{auto} and 3362@samp{direct}) are also implemented internally by @i{Amd} and these are 3363described below. There are two additional filesystem types internal to 3364@i{Amd} which are not directly accessible to the user (@samp{inherit} 3365and @samp{error}). Their use is described since they may still have an 3366effect visible to the user.@refill 3367 3368@menu 3369* Network Filesystem:: A single NFS filesystem. 3370* Network Host Filesystem:: NFS mount a host's entire export tree. 3371* Network Filesystem Group:: An atomic group of NFS filesystems. 3372* Unix Filesystem:: Native disk filesystem. 3373* Caching Filesystem:: Caching from remote server filesystem. 3374* CD-ROM Filesystem:: ISO9660 CD ROM. 3375* Loopback Filesystem:: Local loopback-mount filesystem. 3376* Memory/RAM Filesystem:: A memory or RAM-based filesystem. 3377* Null Filesystem:: 4.4BSD's loopback-mount filesystem. 3378* Floppy Filesystem:: MS-DOS Floppy filesystem. 3379* Translucent Filesystem:: The directory merging filesystem. 3380* Shared Memory+Swap Filesystem:: Sun's tmpfs filesystem. 3381* User ID Mapping Filesystem:: 4.4BSD's umapfs filesystem. 3382* Program Filesystem:: Generic Program mounts. 3383* Symbolic Link Filesystem:: Local link. 3384* Symbolic Link Filesystem II:: Local link referencing existing filesystem. 3385* NFS-Link Filesystem:: Link if path exists, NFS otherwise. 3386* Automount Filesystem:: 3387* Direct Automount Filesystem:: 3388* Union Filesystem:: 3389* Error Filesystem:: 3390* Top-level Filesystem:: 3391* Root Filesystem:: 3392* Inheritance Filesystem:: 3393@end menu 3394 3395@c ---------------------------------------------------------------- 3396@node Network Filesystem, Network Host Filesystem, Filesystem Types, Filesystem Types 3397@comment node-name, next, previous, up 3398@section Network Filesystem (@samp{nfs}) 3399@cindex NFS 3400@cindex Mounting an NFS filesystem 3401@cindex How to mount and NFS filesystem 3402@cindex nfs, filesystem type 3403@cindex Filesystem type; nfs 3404 3405The @dfn{nfs} (@samp{type:=nfs}) filesystem type provides access to Sun's NFS. 3406 3407@noindent 3408The following options must be specified: 3409 3410@table @code 3411@cindex rhost, mount option 3412@cindex Mount option; rhost 3413@item rhost 3414the remote fileserver. This must be an entry in the hosts database. IP 3415addresses are not accepted. The default value is taken 3416from the local host name (@code{$@{host@}}) if no other value is 3417specified. 3418 3419@cindex rfs, mount option 3420@cindex Mount option; rfs 3421@item rfs 3422the remote filesystem. 3423If no value is specified for this option, an internal default of 3424@code{$@{path@}} is used. 3425@end table 3426 3427NFS mounts require a two stage process. First, the @dfn{file handle} of 3428the remote file system must be obtained from the server. Then a mount 3429system call must be done on the local system. @i{Amd} keeps a cache 3430of file handles for remote file systems. The cache entries have a 3431lifetime of a few minutes. 3432 3433If a required file handle is not in the cache, @i{Amd} sends a request 3434to the remote server to obtain it. @i{Amd} @dfn{does not} wait for 3435a response; it notes that one of the locations needs retrying, but 3436continues with any remaining locations. When the file handle becomes 3437available, and assuming none of the other locations was successfully 3438mounted, @i{Amd} will retry the mount. This mechanism allows several 3439NFS filesystems to be mounted in parallel. 3440@c @footnote{The mechanism 3441@c is general, however NFS is the only filesystem 3442@c for which the required hooks have been written.} 3443The first one which responds with a valid file handle will be used. 3444 3445@noindent 3446An NFS entry might be: 3447 3448@example 3449jsp host!=charm;type:=nfs;rhost:=charm;rfs:=/home/charm;sublink:=jsp 3450@end example 3451 3452The mount system call and any unmount attempts are always done 3453in a new task to avoid the possibility of blocking @i{Amd}. 3454 3455@c ---------------------------------------------------------------- 3456@node Network Host Filesystem, Network Filesystem Group, Network Filesystem, Filesystem Types 3457@comment node-name, next, previous, up 3458@section Network Host Filesystem (@samp{host}) 3459@cindex Network host filesystem 3460@cindex Mounting entire export trees 3461@cindex How to mount all NFS exported filesystems 3462@cindex host, filesystem type 3463@cindex Filesystem type; host 3464 3465@c NOTE: the current implementation of the @dfn{host} filesystem type 3466@c sometimes fails to maintain a consistent view of the remote mount tree. 3467@c This happens when the mount times out and only some of the remote mounts 3468@c are successfully unmounted. To prevent this from occurring, use the 3469@c @samp{nounmount} mount option. 3470 3471The @dfn{host} (@samp{type:=host}) filesystem allows access to the entire export tree of an 3472NFS server. The implementation is layered above the @samp{nfs} 3473implementation so keep-alives work in the same way. The only option 3474which needs to be specified is @samp{rhost} which is the name of the 3475fileserver to mount. 3476 3477The @samp{host} filesystem type works by querying the mount daemon on 3478the given fileserver to obtain its export list. @i{Amd} then obtains 3479filehandles for each of the exported filesystems. Any errors at this 3480stage cause that particular filesystem to be ignored. Finally each 3481filesystem is mounted. Again, errors are logged but ignored. One 3482common reason for mounts to fail is that the mount point does not exist. 3483Although @i{Amd} attempts to automatically create the mount point, it 3484may be on a remote filesystem to which @i{Amd} does not have write 3485permission. 3486 3487When an attempt to unmount a @samp{host} filesystem mount fails, @i{Amd} 3488remounts any filesystems which had successfully been unmounted. To do 3489this @i{Amd} queries the mount daemon again and obtains a fresh copy of 3490the export list. @i{Amd} then tries to mount any exported filesystems 3491which are not currently mounted. 3492 3493Sun's automounter provides a special @samp{-hosts} map. To achieve the 3494same effect with @i{Amd} requires two steps. First a mount map must 3495be created as follows: 3496 3497@example 3498* type:=host;rhost:=$@{key@};fs:=$@{autodir@}/$@{rhost@}/root 3499@end example 3500 3501@noindent 3502and then start @i{Amd} with the following command 3503 3504@example 3505amd /net net.map 3506@end example 3507 3508@noindent 3509where @samp{net.map} is the name of map described above. Note that the 3510value of @code{$@{fs@}} is overridden in the map. This is done to avoid 3511a clash between the mount tree and any other filesystem already mounted 3512from the same fileserver. 3513 3514If different mount options are needed for different hosts then 3515additional entries can be added to the map, for example 3516 3517@example 3518host2 opts:=ro,nosuid,soft 3519@end example 3520 3521@noindent 3522would soft mount @samp{host2} read-only. 3523 3524@c ---------------------------------------------------------------- 3525@node Network Filesystem Group, Unix Filesystem, Network Host Filesystem, Filesystem Types 3526@comment node-name, next, previous, up 3527@section Network Filesystem Group (@samp{nfsx}) 3528@cindex Network filesystem group 3529@cindex Atomic NFS mounts 3530@cindex Mounting an atomic group of NFS filesystems 3531@cindex How to mount an atomic group of NFS filesystems 3532@cindex nfsx, filesystem type 3533@cindex Filesystem type; nfsx 3534 3535The @dfn{nfsx} (@samp{type:=nfsx}) filesystem allows a group of filesystems to be mounted 3536from a single NFS server. The implementation is layered above the 3537@samp{nfs} implementation so keep-alives work in the same way. 3538 3539The options are the same as for the @samp{nfs} filesystem with one 3540difference. 3541 3542@noindent 3543The following options should be specified: 3544 3545@table @code 3546@item rhost 3547the remote fileserver. The default value is taken from the local 3548host name (@code{$@{host@}}) if no other value is specified. 3549 3550@item rfs 3551is a list of filesystems to mount, and must be specified. 3552The list is in the form of a comma separated strings. 3553@end table 3554 3555@noindent 3556For example: 3557 3558@example 3559pub type:=nfsx;rhost:=gould;\ 3560 rfs:=/public,/,graphics,usenet;fs:=$@{autodir@}/$@{rhost@}/root 3561@end example 3562 3563The first string defines the root of the tree, and is applied as a 3564prefix to the remaining members of the list which define the individual 3565filesystems. The first string is @emph{not} used as a filesystem name. 3566A parallel operation is used to determine the local mount points to 3567ensure a consistent layout of a tree of mounts. 3568 3569Here, the @emph{three} filesystems, @samp{/public}, 3570@samp{/public/graphics} and @samp{/public/usenet}, would be mounted.@refill 3571 3572A local mount point, @code{$@{fs@}}, @emph{must} be specified. The 3573default local mount point will not work correctly in the general case. 3574A suggestion is to use @samp{fs:=$@{autodir@}/$@{rhost@}/root}.@refill 3575 3576@c ---------------------------------------------------------------- 3577@node Unix Filesystem, Caching Filesystem, Network Filesystem Group, Filesystem Types 3578@comment node-name, next, previous, up 3579@section Unix Filesystem (@samp{ufs}, @samp{xfs}, or @samp{efs}) 3580@cindex Unix filesystem 3581@cindex UFS 3582@cindex XFS 3583@cindex EFS 3584@cindex Mounting a UFS filesystem 3585@cindex Mounting a local disk 3586@cindex How to mount a UFS filesystems 3587@cindex How to mount a local disk 3588@cindex Disk filesystems 3589@cindex ufs, filesystem type 3590@cindex Filesystem type; ufs 3591@cindex xfs, filesystem type 3592@cindex Filesystem type; xfs 3593@cindex efs, filesystem type 3594@cindex Filesystem type; efs 3595 3596The @dfn{ufs} (@samp{type:=ufs}) filesystem type provides access to the system's standard 3597disk filesystem---usually a derivative of the Berkeley Fast Filesystem. 3598 3599@noindent 3600The following option must be specified: 3601 3602@table @code 3603@cindex dev, mount option 3604@cindex Mount option; dev 3605@item dev 3606the block special device to be mounted. 3607@end table 3608 3609A UFS entry might be: 3610 3611@example 3612jsp host==charm;type:=ufs;dev:=/dev/sd0d;sublink:=jsp 3613@end example 3614 3615UFS is the default Unix disk-based file system, which Am-utils picks up 3616during the autoconfiguration phase. Some systems have more than one 3617type, such as IRIX, that comes with EFS (Extent File System) and XFS 3618(Extended File System). In those cases, you may explicitly set the file 3619system type, by using entries such: 3620 3621@example 3622ez1 type:=efs;dev:=/dev/xd0a 3623ez2 type:=xfs;dev:=/dev/sd3c 3624@end example 3625 3626@c ---------------------------------------------------------------- 3627@node Caching Filesystem, CD-ROM Filesystem, Unix Filesystem, Filesystem Types 3628@comment node-name, next, previous, up 3629@section Caching Filesystem (@samp{cachefs}) 3630@cindex Caching Filesystem 3631@cindex cachefs, filesystem type 3632@cindex Filesystem type; cachefs 3633 3634The @dfn{cachefs} (@samp{type:=cachefs}) filesystem caches files from 3635one location onto another, presumably providing faster access. It is 3636particularly useful to cache from a larger and remote (slower) NFS 3637partition to a smaller and local (faster) UFS directory. 3638 3639@noindent 3640The following options must be specified: 3641 3642@table @code 3643@cindex cachedir, mount option 3644@cindex Mount option; cachedir 3645@item cachedir 3646the directory where the cache is stored. 3647@item rfs 3648the path name to the ``back file system'' to be cached from. 3649@item fs 3650the ``front file system'' mount point to the cached files, where @i{Amd} 3651will set a symbolic link pointing to. 3652@end table 3653 3654A CacheFS entry for, say, the @file{/import} @i{Amd} mount point, might 3655be: 3656 3657@example 3658copt type:=cachefs;cachedir:=/cache;rfs:=/import/opt;fs:=/n/import/copt 3659@end example 3660 3661Access to the pathname @file{/import/copt} will follow a symbolic link 3662to @file{/n/import/copt}. The latter is the mount point for a caching 3663file system, that caches from @file{/import/opt} to @file{/cache}. 3664 3665@b{Caveats}: 3666@enumerate 3667@item This file system is currently only implemented for Solaris 2.x! 3668@item Before being used for the first time, the cache directory @i{must} be 3669initialized with @samp{cfsadmin -c @var{cachedir}}. See the manual page for 3670@b{cfsadmin}(1M) for more information. 3671@item The ``back file system'' mounted must be a complete file system, not 3672a subdirectory thereof; otherwise you will get an error ``Invalid Argument''. 3673@item If @i{Amd} aborts abnormally, the state of the cache may be 3674inconsistent, requiring running the command @file{fsck -F cachefs 3675@var{cachedir}}. Otherwise you will get the error ``No Space Left on Device''. 3676@end enumerate 3677 3678@c ---------------------------------------------------------------- 3679@node CD-ROM Filesystem, Loopback Filesystem, Caching Filesystem, Filesystem Types 3680@comment node-name, next, previous, up 3681@section CD-ROM Filesystem (@samp{cdfs}) 3682@cindex CD-ROM Filesystem 3683@cindex cdfs, filesystem type 3684@cindex Filesystem type; cdfs 3685 3686The @dfn{cdfs} (@samp{type:=cdfs}) filesystem mounts a CD-ROM with an 3687ISO9660 format filesystem on it. 3688 3689@noindent 3690The following option must be specified: 3691 3692@table @code 3693@cindex dev, mount option 3694@cindex Mount option; dev 3695@item dev 3696the block special device to be mounted. 3697@end table 3698 3699Some operating systems will fail to mount read-only CDs unless the 3700@samp{ro} option is specified. A cdfs entry might be: 3701 3702@example 3703cdfs os==sunos4;type:=cdfs;dev:=/dev/sr0 \ 3704 os==sunos5;addopts:=ro;type:=cdfs;dev:=/dev/dsk/c0t6d0s2 3705@end example 3706 3707@c ---------------------------------------------------------------- 3708@node Loopback Filesystem, Memory/RAM Filesystem, CD-ROM Filesystem, Filesystem Types 3709@comment node-name, next, previous, up 3710@section Loopback Filesystem (@samp{lofs}) 3711@cindex Loopback Filesystem 3712@cindex lofs, filesystem type 3713@cindex Filesystem type; lofs 3714 3715The @dfn{lofs} (@samp{type:=lofs}) filesystem is also called the 3716loopback filesystem. It mounts a local directory on another, thus 3717providing mount-time binding to another location (unlike symbolic 3718links). 3719 3720The loopback filesystem is particularly useful within the context of a 3721chroot-ed directory (via @b{chroot}(2)), to provide access to 3722directories otherwise inaccessible. 3723 3724@noindent 3725The following option must be specified: 3726 3727@table @code 3728@cindex rfs, mount option 3729@cindex Mount option; rfs 3730@item rfs 3731the pathname to be mounted on top of @code{$@{fs@}}. 3732@end table 3733 3734Usually, the FTP server runs in a chroot-ed environment, for security 3735reasons. In this example, lofs is used to provide a subdirectory within 3736a user's home directory, also available for public ftp. 3737 3738@example 3739lofs type:=lofs;rfs:=/home/ezk/myftpdir;fs:=/usr/ftp/pub/ezk 3740@end example 3741 3742@c ---------------------------------------------------------------- 3743@node Memory/RAM Filesystem, Null Filesystem, Loopback Filesystem, Filesystem Types 3744@comment node-name, next, previous, up 3745@section Memory/RAM Filesystem (@samp{mfs}) 3746@cindex Memory/RAM Filesystem 3747@cindex mfs, filesystem type 3748@cindex Filesystem type; mfs 3749 3750The @dfn{mfs} (@samp{type:=mfs}) filesystem is available in 4.4BSD, 3751Linux, and other systems. It creates a filesystem in a portion of the 3752system's memory, thus providing very fast file (volatile) access. 3753 3754XXX: THIS FILESYSTEM IS NOT IMPLEMENTED YET! 3755 3756@c ---------------------------------------------------------------- 3757@node Null Filesystem, Floppy Filesystem, Memory/RAM Filesystem, Filesystem Types 3758@comment node-name, next, previous, up 3759@section Null Filesystem (@samp{nullfs}) 3760@cindex Null Filesystem 3761@cindex nullfs, filesystem type 3762@cindex Filesystem type; nullfs 3763 3764The @dfn{nullfs} (@samp{type:=nullfs}) filesystem is available from 4.4BSD, 3765and is very similar to the loopback filesystem, @dfn{lofs}. 3766 3767XXX: THIS FILESYSTEM IS NOT IMPLEMENTED YET! 3768 3769@c ---------------------------------------------------------------- 3770@node Floppy Filesystem, Translucent Filesystem, Null Filesystem, Filesystem Types 3771@comment node-name, next, previous, up 3772@section Floppy Filesystem (@samp{pcfs}) 3773@cindex Floppy Filesystem 3774@cindex pcfs, filesystem type 3775@cindex Filesystem type; pcfs 3776 3777The @dfn{pcfs} (@samp{type:=pcfs}) filesystem mounts a floppy previously 3778formatted for the MS-DOS format. 3779 3780@noindent 3781The following option must be specified: 3782 3783@table @code 3784@cindex dev, mount option 3785@cindex Mount option; dev 3786@item dev 3787the block special device to be mounted. 3788@end table 3789 3790A pcfs entry might be: 3791 3792@example 3793pcfs os==sunos4;type:=pcfs;dev:=/dev/fd0 \ 3794 os==sunos5;type:=pcfs;dev:=/dev/diskette 3795@end example 3796 3797@c ---------------------------------------------------------------- 3798@node Translucent Filesystem, Shared Memory+Swap Filesystem, Floppy Filesystem, Filesystem Types 3799@comment node-name, next, previous, up 3800@section Translucent Filesystem (@samp{tfs}) 3801@cindex Translucent Filesystem 3802@cindex tfs, filesystem type 3803@cindex Filesystem type; tfs 3804 3805The @dfn{tfs} (@samp{type:=tfs}) filesystem is an older version of the 38064.4BSD @dfn{unionfs}. 3807 3808XXX: THIS FILESYSTEM IS NOT IMPLEMENTED YET! 3809 3810@c ---------------------------------------------------------------- 3811@node Shared Memory+Swap Filesystem, User ID Mapping Filesystem, Translucent Filesystem, Filesystem Types 3812@comment node-name, next, previous, up 3813@section Shared Memory+Swap Filesystem (@samp{tmpfs}) 3814@cindex Shared Memory and Swap Filesystem 3815@cindex tmpfs, filesystem type 3816@cindex Filesystem type; tmpfs 3817 3818The @dfn{tmpfs} (@samp{type:=tmpfs}) filesystem shares memory between a 3819the swap device and the rest of the system. It is generally used to 3820provide a fast access @file{/tmp} directory, one that uses memory that 3821is otherwise unused. This filesystem is available in SunOS 4.x and 5.x. 3822 3823XXX: THIS FILESYSTEM IS NOT IMPLEMENTED YET! 3824 3825@c ---------------------------------------------------------------- 3826@node User ID Mapping Filesystem, Program Filesystem, Shared Memory+Swap Filesystem, Filesystem Types 3827@comment node-name, next, previous, up 3828@section User ID Mapping Filesystem (@samp{umapfs}) 3829@cindex User ID Mapping Filesystem 3830@cindex umapfs, filesystem type 3831@cindex Filesystem type; umapfs 3832 3833The @dfn{umapfs} (@samp{type:=umapfs}) filesystem maps User IDs of file 3834ownership, and is available from 4.4BSD. 3835 3836XXX: THIS FILESYSTEM IS NOT IMPLEMENTED YET! 3837 3838@c ---------------------------------------------------------------- 3839@node Program Filesystem, Symbolic Link Filesystem, User ID Mapping Filesystem, Filesystem Types 3840@comment node-name, next, previous, up 3841@section Program Filesystem (@samp{program}) 3842@cindex Program filesystem 3843@cindex Mount a filesystem under program control 3844@cindex program, filesystem type 3845@cindex Filesystem type; program 3846 3847The @dfn{program} (@samp{type:=program}) filesystem type allows a 3848program to be run whenever a mount or unmount is required. This allows 3849easy addition of support for other filesystem types, such as MIT's 3850Remote Virtual Disk (RVD) which has a programmatic interface via the 3851commands @samp{rvdmount} and @samp{rvdunmount}. 3852 3853@noindent 3854The following options must be specified: 3855 3856@table @code 3857@cindex mount, mount option 3858@cindex Mount option; mount 3859@item mount 3860the program which will perform the mount. 3861 3862@cindex unmount, mount option 3863@cindex Mount option; unmount 3864@item unmount 3865the program which will perform the unmount. 3866@end table 3867 3868The exit code from these two programs is interpreted as a Unix error 3869code. As usual, exit code zero indicates success. To execute the 3870program @i{Amd} splits the string on whitespace to create an array of 3871substrings. Single quotes @samp{'} can be used to quote whitespace 3872if that is required in an argument. There is no way to escape or change 3873the quote character. 3874 3875To run the program @samp{rvdmount} with a host name and filesystem as 3876arguments would be specified by 3877@samp{fs:=$@{autodir@}$@{path@};mount:="/etc/rvdmount rvdmount fserver 3878$@{fs@}"}. 3879 3880The first element in the array is taken as the pathname of the program 3881to execute. The other members of the array form the argument vector to 3882be passed to the program, @dfn{including argument zero}. This means 3883that the split string must have at least two elements. The program is 3884directly executed by @i{Amd}, not via a shell. This means that scripts 3885must begin with a @code{#!} interpreter specification. 3886 3887If a filesystem type is to be heavily used, it may be worthwhile adding 3888a new filesystem type into @i{Amd}, but for most uses the program 3889filesystem should suffice. 3890 3891When the program is run, standard input and standard error are inherited 3892from the current values used by @i{Amd}. Standard output is a 3893duplicate of standard error. The value specified with the @code{-l} 3894command line option has no effect on standard error. 3895 3896@c ---------------------------------------------------------------- 3897@node Symbolic Link Filesystem, Symbolic Link Filesystem II, Program Filesystem, Filesystem Types 3898@comment node-name, next, previous, up 3899@section Symbolic Link Filesystem (@samp{link}) 3900@cindex Symbolic link filesystem 3901@cindex Referencing part of the local name space 3902@cindex Mounting part of the local name space 3903@cindex How to reference part of the local name space 3904@cindex link, filesystem type 3905@cindex symlink, link filesystem type 3906@cindex Filesystem type; link 3907 3908Each filesystem type creates a symbolic link to point from the volume 3909name to the physical mount point. The @samp{link} filesystem does the 3910same without any other side effects. This allows any part of the 3911machines name space to be accessed via @i{Amd}. 3912 3913One common use for the symlink filesystem is @file{/homes} which can be 3914made to contain an entry for each user which points to their 3915(auto-mounted) home directory. Although this may seem rather expensive, 3916it provides a great deal of administrative flexibility. 3917 3918@noindent 3919The following option must be defined: 3920 3921@table @code 3922@item fs 3923The value of @var{fs} option specifies the destination of the link, as 3924modified by the @var{sublink} option. If @var{sublink} is non-null, it 3925is appended to @code{$@{fs@}}@code{/} and the resulting string is used 3926as the target. 3927@end table 3928 3929The @samp{link} filesystem can be thought of as identical to the 3930@samp{ufs} filesystem but without actually mounting anything. 3931 3932An example entry might be: 3933 3934@example 3935jsp host==charm;type:=link;fs:=/home/charm;sublink:=jsp 3936@end example 3937which would return a symbolic link pointing to @file{/home/charm/jsp}. 3938 3939@c ---------------------------------------------------------------- 3940@node Symbolic Link Filesystem II, NFS-Link Filesystem, Symbolic Link Filesystem, Filesystem Types 3941@comment node-name, next, previous, up 3942@section Symbolic Link Filesystem II (@samp{linkx}) 3943@cindex Symbolic link filesystem II 3944@cindex Referencing an existing part of the local name space 3945@cindex Mounting an existing part of the local name space 3946@cindex How to reference an existing part of the local name space 3947@cindex linkx, filesystem type 3948@cindex symlink, linkx filesystem type 3949@cindex Filesystem type; linkx 3950 3951The @dfn{linkx} (@samp{type:=linkx}) filesystem type is identical to @samp{link} with the 3952exception that the target of the link must exist. Existence is checked 3953with the @b{lstat}(2) system call. 3954 3955The @samp{linkx} filesystem type is particularly useful for wildcard map 3956entries. In this case, a list of possible targets can be given and 3957@i{Amd} will choose the first one which exists on the local machine. 3958 3959@c ---------------------------------------------------------------- 3960@node NFS-Link Filesystem, Automount Filesystem, Symbolic Link Filesystem II, Filesystem Types 3961@comment node-name, next, previous, up 3962@section NFS-Link Filesystem (@samp{nfsl}) 3963@cindex NFS-Link filesystem II 3964@cindex Referencing an existing part of the name space if target exists 3965@cindex Mounting a remote part of the name space if target is missing 3966@cindex Symlink if target exists, NFS otherwise 3967@cindex nfsl, filesystem type 3968@cindex symlink, nfsl filesystem type 3969@cindex Filesystem type; nfsl 3970 3971The @dfn{nfsl} (@samp{type:=nfsl}) filesystem type is a combination of two others: 3972@samp{link} and @samp{nfs}. If the local host name is equal to the 3973value of @code{$@{rhost@}}, or if the target pathname listed in 3974@code{$@{fs@}} exists, @samp{nfsl} will behave exactly as 3975@samp{type:=link}, and refer to the target as a symbolic link. If the 3976local host name is not equal to the value of @code{$@{rhost@}}, or if 3977the target of the link does not exist, @i{Amd} will treat it as 3978@samp{type:=nfs}, and will mount a remote pathname for it. 3979 3980The @samp{nfsl} filesystem type is particularly useful as a shorthand 3981for the more cumbersome and yet one of the most popular @i{Amd} 3982entries. For example, you can simplify all map entries that look like: 3983 3984@example 3985zing -fs:=/n/shekel/u/zing \ 3986 host!=shekel;type:=nfs;rhost:=shekel;rfs:=$@{fs@} \ 3987 host==shekel;type:=link 3988@end example 3989 3990or 3991 3992@example 3993zing -fs:=/n/shekel/u/zing \ 3994 exists($@{fs@});type:=link \ 3995 !exists($@{fs@});type:=nfs;rhost:=shekel;rfs:=$@{fs@} 3996@end example 3997 3998into a shorter form 3999 4000@example 4001zing type:=nfsl;fs:=/n/shekel/u/zing;rhost:=shekel;rfs:=$@{fs@} 4002@end example 4003 4004Not just does it make the maps smaller and simpler, but it avoids 4005possible mistakes that often happen when forgetting to set up the two 4006entries (one for @samp{type:=nfs} and the other for @samp{type:=link}) 4007necessary to perform transparent mounts of existing or remote mounts. 4008 4009@c ---------------------------------------------------------------- 4010@node Automount Filesystem, Direct Automount Filesystem, NFS-Link Filesystem, Filesystem Types 4011@comment node-name, next, previous, up 4012@section Automount Filesystem (@samp{auto}) 4013@cindex Automount filesystem 4014@cindex Map cache types 4015@cindex Setting map cache parameters 4016@cindex How to set map cache parameters 4017@cindex How to start an indirect automount point 4018@cindex auto, filesystem type 4019@cindex Filesystem type; auto 4020@cindex SIGHUP signal 4021@cindex Map cache synchronizing 4022@cindex Synchronizing the map cache 4023@cindex Map cache options 4024@cindex Regular expressions in maps 4025 4026The @dfn{auto} (@samp{type:=auto}) filesystem type creates a new automount point below an 4027existing automount point. Top-level automount points appear as system 4028mount points. An automount mount point can also appear as a 4029sub-directory of an existing automount point. This allows some 4030additional structure to be added, for example to mimic the mount tree of 4031another machine. 4032 4033The following options may be specified: 4034 4035@table @code 4036@cindex cache, mount map option 4037@cindex Mount map option; cache 4038@item cache 4039specifies whether the data in this mount-map should be 4040cached. The default value is @samp{none}, in which case 4041no caching is done in order to conserve memory. 4042 4043However, better performance and reliability can be obtained by caching 4044some or all of a mount-map. 4045 4046If the cache option specifies @samp{all}, 4047the entire map is enumerated when the mount point is created. 4048 4049If the cache option specifies @samp{inc}, caching is done incrementally 4050as and when data is required. 4051Some map types do not support cache mode @samp{all}, in which case @samp{inc} 4052is used whenever @samp{all} is requested. 4053 4054Caching can be entirely disabled by using cache mode @samp{none}. 4055 4056If the cache option specifies @samp{regexp} then the entire map will be 4057enumerated and each key will be treated as an egrep-style regular 4058expression. The order in which a cached map is searched does not 4059correspond to the ordering in the source map so the regular expressions 4060should be mutually exclusive to avoid confusion. 4061 4062Each mount map type has a default cache type, usually @samp{inc}, which 4063can be selected by specifying @samp{mapdefault}. 4064 4065The cache mode for a mount map can only be selected on the command line. 4066Starting @i{Amd} with the command: 4067 4068@example 4069amd /homes hesiod.homes -cache:=inc 4070@end example 4071 4072will cause @samp{/homes} to be automounted using the @dfn{Hesiod} name 4073server with local incremental caching of all successfully resolved names. 4074 4075All cached data is forgotten whenever @i{Amd} receives a @samp{SIGHUP} 4076signal and, if cache @samp{all} mode was selected, the cache will be 4077reloaded. This can be used to inform @i{Amd} that a map has been 4078updated. In addition, whenever a cache lookup fails and @i{Amd} needs 4079to examine a map, the map's modify time is examined. If the cache is 4080out of date with respect to the map then it is flushed as if a 4081@samp{SIGHUP} had been received. 4082 4083An additional option (@samp{sync}) may be specified to force @i{Amd} to 4084check the map's modify time whenever a cached entry is being used. For 4085example, an incremental, synchronized cache would be created by the 4086following command: 4087 4088@example 4089amd /homes hesiod.homes -cache:=inc,sync 4090@end example 4091 4092@item fs 4093specifies the name of the mount map to use for the new mount point. 4094 4095Arguably this should have been specified with the @code{$@{rfs@}} option but 4096we are now stuck with it due to historical accident. 4097 4098@c %If the string @samp{.} is used then the same map is used; 4099@c %in addition the lookup prefix is set to the name of the mount point followed 4100@c %by a slash @samp{/}. 4101@c %This is the same as specifying @samp{fs:=\$@{map@};pref:=\$@{key@}/}. 4102@c 4103 4104@item pref 4105alters the name that is looked up in the mount map. If 4106@code{$@{pref@}}, the @dfn{prefix}, is non-null then it is prepended to 4107the name requested by the kernel @dfn{before} the map is searched. 4108 4109@item opts 4110Normally, @samp{auto} style maps are not browsable even if you turn on 4111directory browsability (@pxref{browsable_dirs Parameter}). To enable 4112browsing entries in @samp{auto} maps, specify @samp{opts:=browsable} in 4113the description of this map. 4114 4115@end table 4116 4117The server @samp{dylan.doc.ic.ac.uk} has two user disks: 4118@samp{/dev/dsk/2s0} and @samp{/dev/dsk/5s0}. These are accessed as 4119@samp{/home/dylan/dk2} and @samp{/home/dylan/dk5} respectively. Since 4120@samp{/home} is already an automount point, this naming is achieved with 4121the following map entries:@refill 4122 4123@example 4124dylan type:=auto;fs:=$@{map@};pref:=$@{key@}/ 4125dylan/dk2 type:=ufs;dev:=/dev/dsk/2s0 4126dylan/dk5 type:=ufs;dev:=/dev/dsk/5s0 4127@end example 4128 4129@c ---------------------------------------------------------------- 4130@node Direct Automount Filesystem, Union Filesystem, Automount Filesystem, Filesystem Types 4131@comment node-name, next, previous, up 4132@section Direct Automount Filesystem (@samp{direct}) 4133@cindex Direct automount filesystem 4134@cindex How to start a direct automount point 4135@cindex direct, filesystem type 4136@cindex Filesystem type; direct 4137 4138The @dfn{direct} (@samp{type:=direct}) filesystem is almost identical to 4139the automount filesystem. Instead of appearing to be a directory of 4140mount points, it appears as a symbolic link to a mounted filesystem. 4141The mount is done at the time the link is accessed. @xref{Automount 4142Filesystem}, for a list of required options. 4143 4144Direct automount points are created by specifying the @samp{direct} 4145filesystem type on the command line: 4146 4147@example 4148amd ... /usr/man auto.direct -type:=direct 4149@end example 4150 4151where @samp{auto.direct} would contain an entry such as: 4152 4153@example 4154usr/man -type:=nfs;rfs:=/usr/man \ 4155 rhost:=man-server1 rhost:=man-server2 4156@end example 4157 4158In this example, @samp{man-server1} and @samp{man-server2} are file 4159servers which export copies of the manual pages. Note that the key 4160which is looked up is the name of the automount point without the 4161leading @samp{/}. 4162 4163@c ---------------------------------------------------------------- 4164@node Union Filesystem, Error Filesystem, Direct Automount Filesystem, Filesystem Types 4165@comment node-name, next, previous, up 4166@section Union Filesystem (@samp{union}) 4167@cindex Union filesystem 4168@cindex union, filesystem type 4169@cindex Filesystem type; union 4170 4171The @dfn{union} (@samp{type:=union}) filesystem type allows the contents of several 4172directories to be merged and made visible in a single directory. This 4173can be used to overcome one of the major limitations of the Unix mount 4174mechanism which only allows complete directories to be mounted. 4175 4176For example, supposing @file{/tmp} and @file{/var/tmp} were to be merged 4177into a new directory called @file{/mtmp}, with files in @file{/var/tmp} 4178taking precedence. The following command could be used to achieve this 4179effect: 4180 4181@example 4182amd ... /mtmp union:/tmp:/var/tmp -type:=union 4183@end example 4184 4185Currently, the unioned directories must @emph{not} be automounted. That 4186would cause a deadlock. This seriously limits the current usefulness of 4187this filesystem type and the problem will be addressed in a future 4188release of @i{Amd}. 4189 4190Files created in the union directory are actually created in the last 4191named directory. This is done by creating a wildcard entry which points 4192to the correct directory. The wildcard entry is visible if the union 4193directory is listed, so allowing you to see which directory has 4194priority. 4195 4196The files visible in the union directory are computed at the time 4197@i{Amd} is started, and are not kept up-to-date with respect to the 4198underlying directories. Similarly, if a link is removed, for example 4199with the @samp{rm} command, it will be lost forever. 4200 4201@c ---------------------------------------------------------------- 4202@node Error Filesystem, Top-level Filesystem, Union Filesystem, Filesystem Types 4203@comment node-name, next, previous, up 4204@section Error Filesystem (@samp{error}) 4205@cindex Error filesystem 4206@cindex error, filesystem type 4207@cindex Filesystem type; error 4208 4209The @dfn{error} (@samp{type:=error}) filesystem type is used internally as a catch-all in the 4210case where none of the other filesystems was selected, or some other 4211error occurred. Lookups and mounts always fail with ``No such file or 4212directory''. All other operations trivially succeed. 4213 4214The error filesystem is not directly accessible. 4215 4216@c ---------------------------------------------------------------- 4217@node Top-level Filesystem, Root Filesystem, Error Filesystem, Filesystem Types 4218@comment node-name, next, previous, up 4219@section Top-level Filesystem (@samp{toplvl}) 4220@cindex Top level filesystem 4221@cindex toplvl, filesystem type 4222@cindex Filesystem type; toplvl 4223 4224The @dfn{toplvl} (@samp{type:=toplvl}) filesystems is derived from the @samp{auto} filesystem 4225and is used to mount the top-level automount nodes. Requests of this 4226type are automatically generated from the command line arguments. 4227 4228@c ---------------------------------------------------------------- 4229@node Root Filesystem, Inheritance Filesystem, Top-level Filesystem, Filesystem Types 4230@comment node-name, next, previous, up 4231@section Root Filesystem (@samp{root}) 4232@cindex Root filesystem 4233@cindex root, filesystem type 4234@cindex Filesystem type; root 4235 4236The @dfn{root} (@samp{type:=root}) filesystem type acts as an internal 4237placeholder onto which @i{Amd} can pin @samp{toplvl} mounts. Only one 4238node of this type need ever exist and one is created automatically 4239during startup. The effect of having more than one root node is 4240undefined. 4241 4242The root filesystem is not directly accessible. 4243 4244@c ---------------------------------------------------------------- 4245@node Inheritance Filesystem, , Root Filesystem, Filesystem Types 4246@comment node-name, next, previous, up 4247@section Inheritance Filesystem (@samp{inherit}) 4248@cindex Inheritance filesystem 4249@cindex Nodes generated on a restart 4250@cindex inherit, filesystem type 4251@cindex Filesystem type; inherit 4252 4253The @dfn{inheritance} (@samp{type:=inherit}) filesystem is not directly 4254accessible. Instead, internal mount nodes of this type are 4255automatically generated when @i{Amd} is started with the @code{-r} option. 4256At this time the system mount table is scanned to locate any filesystems 4257which are already mounted. If any reference to these filesystems is 4258made through @i{Amd} then instead of attempting to mount it, @i{Amd} 4259simulates the mount and @dfn{inherits} the filesystem. This allows a 4260new version of @i{Amd} to be installed on a live system simply by 4261killing the old daemon with @samp{SIGTERM} and starting the new one.@refill 4262 4263This filesystem type is not generally visible externally, but it is 4264possible that the output from @samp{amq -m} may list @samp{inherit} as 4265the filesystem type. This happens when an inherit operation cannot 4266be completed for some reason, usually because a fileserver is down. 4267 4268@c ################################################################ 4269@node Amd Configuration File, Run-time Administration, Filesystem Types, Top 4270@comment node-name, next, previous, up 4271@chapter Amd Configuration File 4272@cindex Amd Configuration File 4273@cindex amd.conf 4274 4275The @samp{amd.conf} file is the configuration file for @i{Amd}, as part 4276of the am-utils suite. This file contains runtime configuration 4277information for the @i{Amd} automounter program. 4278 4279@menu 4280* File Format:: 4281* The Global Section:: 4282* Regular Map Sections:: 4283* Common Parameters:: 4284* Global Parameters:: 4285* Regular Map Parameters:: 4286* amd.conf Examples:: 4287@end menu 4288 4289@c ================================================================ 4290@node File Format, The Global Section, Amd Configuration File, Amd Configuration File 4291@comment node-name, next, previous, up 4292@section File Format 4293@cindex amd.conf file format 4294 4295The @samp{amd.conf} file consists of sections and parameters. A section 4296begins with the name of the section in square brackets @samp{[]} and 4297continues until the next section begins or the end of the file is reached. 4298Sections contain parameters of the form @samp{name = value}. 4299 4300The file is line-based --- that is, each newline-terminated line 4301represents either a comment, a section name or a parameter. No 4302line-continuation syntax is available. 4303 4304Section names, parameter names and their values are case sensitive. 4305 4306Only the first equals sign in a parameter is significant. Whitespace 4307before or after the first equals sign is discarded. Leading, trailing 4308and internal whitespace in section and parameter names is irrelevant. 4309Leading and trailing whitespace in a parameter value is discarded. 4310Internal whitespace within a parameter value is not allowed, unless the 4311whole parameter value is quoted with double quotes as in @samp{name = 4312"some value"}. 4313 4314Any line beginning with a pound sign @samp{#} is ignored, as are lines 4315containing only whitespace. 4316 4317The values following the equals sign in parameters are all either a 4318string (no quotes needed if string does not include spaces) or a 4319boolean, which may be given as @samp{yes}/@samp{no}. Case is significant in all 4320values. Some items such as cache timeouts are numeric. 4321 4322@c ================================================================ 4323@node The Global Section, Regular Map Sections, File Format, Amd Configuration File 4324@comment node-name, next, previous, up 4325@section The Global Section 4326@cindex amd.conf global section 4327 4328The global section must be specified as @samp{[global]}. Parameters in 4329this section either apply to @i{Amd} as a whole, or to all other regular map 4330sections which follow. There should be only one global section defined 4331in one configuration file. 4332 4333It is highly recommended that this section be specified first in the 4334configuration file. If it is not, then regular map sections which 4335precede it will not use global values defined later. 4336 4337@c ================================================================ 4338@node Regular Map Sections, Common Parameters, The Global Section, Amd Configuration File 4339@comment node-name, next, previous, up 4340@section Regular Map Sections 4341@cindex amd.conf regular map sections 4342 4343Parameters in regular (non-global) sections apply to a single map entry. 4344For example, if the map section @samp{[/homes]} is defined, then all 4345parameters following it will be applied to the @file{/homes} 4346@i{Amd}-managed mount point. 4347 4348@c ================================================================ 4349@node Common Parameters, Global Parameters, Regular Map Sections, Amd Configuration File 4350@comment node-name, next, previous, up 4351@section Common Parameters 4352@cindex amd.conf common parameters 4353 4354These parameters can be specified either in the global or a map-specific 4355section. Entries specified in a map-specific section override the default 4356value or one defined in the global section. If such a common parameter is 4357specified only in the global section, it is applicable to all regular map 4358sections that follow. 4359 4360@menu 4361* browsable_dirs Parameter:: 4362* map_options Parameter:: 4363* map_type Parameter:: 4364* mount_type Parameter:: 4365* search_path Parameter:: 4366@end menu 4367 4368@c ---------------------------------------------------------------- 4369@node browsable_dirs Parameter, map_options Parameter, Common Parameters, Common Parameters 4370@comment node-name, next, previous, up 4371@subsection @t{browsable_dirs} Parameter 4372@cindex browsable_dirs Parameter 4373 4374(type=string, default=@samp{no}). If @samp{yes}, then @i{Amd}'s top-level 4375mount points will be browsable to @b{readdir}(3) calls. This means you 4376could run for example @b{ls}(1) and see what keys are available to mount 4377in that directory. Not all entries are made visible to @b{readdir}(3): 4378the @samp{/defaults} entry, wildcard entries, and those with a @file{/} 4379in them are not included. If you specify @samp{full} to this option, 4380all but the @samp{/defaults} entry will be visible. Note that if you run 4381a command which will attempt to @b{stat}(2) the entries, such as often 4382done by @samp{ls -l} or @samp{ls -F}, @i{Amd} will attempt to mount 4383@i{every} entry in that map. This is often called a ``mount storm''. 4384 4385@c ---------------------------------------------------------------- 4386@node map_options Parameter, map_type Parameter, browsable_dirs Parameter, Common Parameters 4387@comment node-name, next, previous, up 4388@subsection @t{map_options} Parameter 4389@cindex map_options Parameter 4390 4391(type=string, default no options). This option is the same as 4392specifying map options on the command line to @i{Amd}, such as 4393@samp{cache:=all}. 4394 4395@c ---------------------------------------------------------------- 4396@node map_type Parameter, mount_type Parameter, map_options Parameter, Common Parameters 4397@comment node-name, next, previous, up 4398@subsection @t{map_type} Parameter 4399@cindex map_type Parameter 4400 4401(type=string, default search all map types). If specified, @i{Amd} will 4402initialize the map only for the type given. This is useful to avoid the 4403default map search type used by @i{Amd} which takes longer and can have 4404undesired side-effects such as initializing NIS even if not used. 4405Possible values are 4406 4407@table @samp 4408@item file 4409plain files 4410@item hesiod 4411Hesiod name service from MIT 4412@item ldap 4413Lightweight Directory Access Protocol 4414@item ndbm 4415(New) dbm style hash files 4416@item nis 4417Network Information Services (version 2) 4418@item nisplus 4419Network Information Services Plus (version 3) 4420@item passwd 4421local password files 4422@item union 4423union maps 4424@end table 4425 4426@c ---------------------------------------------------------------- 4427@node mount_type Parameter, search_path Parameter, map_type Parameter, Common Parameters 4428@comment node-name, next, previous, up 4429@subsection @t{mount_type} Parameter 4430@cindex mount_type Parameter 4431 4432(type=string, default=@samp{nfs}). All @i{Amd} mount types must be NFS. 4433That is, @i{Amd} is an NFS server on the map mount points, for the local 4434host it is running on. If @samp{autofs} is specified, @i{Amd} will log 4435an error message and forcibly convert it to NFS. 4436 4437@c ---------------------------------------------------------------- 4438@node search_path Parameter, , mount_type Parameter, Common Parameters 4439@comment node-name, next, previous, up 4440@subsection @t{search_path} Parameter 4441@cindex search_path Parameter 4442 4443(type=string, default no search path). This provides a 4444(colon-delimited) search path for file maps. Using a search path, 4445sites can allow for local map customizations and overrides, and can 4446distributed maps in several locations as needed. 4447 4448@c ================================================================ 4449@node Global Parameters, Regular Map Parameters, Common Parameters, Amd Configuration File 4450@comment node-name, next, previous, up 4451@section Global Parameters 4452@cindex amd.conf global parameters 4453 4454The following parameters are applicable to the @samp{[global]} section only. 4455 4456@menu 4457* arch Parameter:: 4458* auto_dir Parameter:: 4459* cache_duration Parameter:: 4460* cluster Parameter:: 4461* debug_options Parameter:: 4462* dismount_interval Parameter:: 4463* full_os Parameter:: 4464* fully_qualified_hosts Parameter:: 4465* hesiod_base Parameter:: 4466* karch Parameter:: 4467* ldap_base Parameter:: 4468* ldap_cache_maxmem Parameter:: 4469* ldap_cache_seconds Parameter:: 4470* ldap_hostports Parameter:: 4471* local_domain Parameter:: 4472* log_file Parameter:: 4473* log_options Parameter:: 4474* nfs_allow_insecure_port Parameter:: 4475* nfs_proto Parameter:: 4476* nfs_retransmit_counter Parameter:: 4477* nfs_retry_interval Parameter:: 4478* nfs_vers Parameter:: 4479* nis_domain Parameter:: 4480* normalize_hostnames Parameter:: 4481* os Parameter:: 4482* osver Parameter:: 4483* pid_file Parameter:: 4484* plock Parameter:: 4485* portmap_program Parameter:: 4486* print_pid Parameter:: 4487* print_version Parameter:: 4488* restart_mounts Parameter:: 4489* selectors_in_defaults Parameter:: 4490* show_statfs_entries Parameter:: 4491* unmount_on_exit Parameter:: 4492* vendor Parameter:: 4493@end menu 4494 4495@c ---------------------------------------------------------------- 4496@node arch Parameter, auto_dir Parameter, Global Parameters, Global Parameters 4497@comment node-name, next, previous, up 4498@subsection @t{arch} Parameter 4499@cindex arch Parameter 4500 4501(type=string, default to compiled in value). Allows you to override the 4502value of the @i{arch} @i{Amd} variable. 4503 4504@c ---------------------------------------------------------------- 4505@node auto_dir Parameter, cache_duration Parameter, arch Parameter, Global Parameters 4506@comment node-name, next, previous, up 4507@subsection @t{auto_dir} Parameter 4508@cindex auto_dir Parameter 4509 4510(type=string, default=@samp{/a}). Same as the @code{-a} option to @i{Amd}. 4511This sets the private directory where @i{Amd} will create 4512sub-directories for its real mount points. 4513 4514@c ---------------------------------------------------------------- 4515@node cache_duration Parameter, cluster Parameter, auto_dir Parameter, Global Parameters 4516@comment node-name, next, previous, up 4517@subsection @t{cache_duration} Parameter 4518@cindex cache_duration Parameter 4519 4520(type=numeric, default=300). Same as the @code{-c} option to 4521@i{Amd}. Sets the duration in seconds that looked up map entries remain 4522in the cache. 4523 4524@c ---------------------------------------------------------------- 4525@node cluster Parameter, debug_options Parameter, cache_duration Parameter, Global Parameters 4526@comment node-name, next, previous, up 4527@subsection @t{cluster} Parameter 4528@cindex cluster Parameter 4529 4530(type=string, default no cluster). Same as the @code{-C} option to 4531@i{Amd}. Specifies the alternate HP-UX cluster to use. 4532 4533@c ---------------------------------------------------------------- 4534@node debug_options Parameter, dismount_interval Parameter, cluster Parameter, Global Parameters 4535@comment node-name, next, previous, up 4536@subsection @t{debug_options} Parameter 4537@cindex debug_options Parameter 4538 4539(type=string, default no debug options). Same as the @code{-D} option 4540to @i{Amd}. Specify any debugging options for @i{Amd}. Works only if 4541am-utils was configured for debugging using the @code{--enable-debug} 4542option. The @samp{mem} option, as well as all other options, can be 4543turned on via @code{--enable-debug=mem}. Otherwise debugging options 4544are ignored. Options are comma delimited, and can be preceded by the 4545string @samp{no} to negate their meaning. You can get the list of 4546supported debugging and logging options by running @code{amd -H}. 4547Possible values are: 4548 4549@table @samp 4550@item all 4551all options 4552@item amq 4553register for amq 4554@item daemon 4555enter daemon mode 4556@item fork 4557fork server 4558@item full 4559program trace 4560@item mem 4561trace memory allocations 4562@item mtab 4563use local @file{./mtab} file 4564@item str 4565debug string munging 4566@item test 4567full debug but no daemon 4568@item trace 4569trace RPC protocol and NFS mount arguments 4570@end table 4571 4572@c ---------------------------------------------------------------- 4573@node dismount_interval Parameter, full_os Parameter, debug_options Parameter, Global Parameters 4574@comment node-name, next, previous, up 4575@subsection @t{dismount_interval} Parameter 4576@cindex dismount_interval Parameter 4577 4578(type=numeric, default=120). Same as the @code{-w} option to 4579@i{Amd}. Specify in seconds, the time between attempts to dismount file 4580systems that have exceeded their cached times. 4581 4582@c ---------------------------------------------------------------- 4583@node full_os Parameter, fully_qualified_hosts Parameter, dismount_interval Parameter, Global Parameters 4584@comment node-name, next, previous, up 4585@subsection @t{full_os} Parameter 4586@cindex full_os Parameter 4587 4588(type=string, default to compiled in value). The full name of the 4589operating system, along with its version. Allows you to override the 4590compiled-in full name and version of the operating system. Useful when 4591the compiled-in name is not desired. For example, the full operating 4592system name on linux comes up as @samp{linux}, but you can override it 4593to @samp{linux-2.2.5}. 4594 4595@c ---------------------------------------------------------------- 4596@node fully_qualified_hosts Parameter, hesiod_base Parameter, full_os Parameter, Global Parameters 4597@comment node-name, next, previous, up 4598@subsection @t{fully_qualified_hosts} Parameter 4599@cindex fully_qualified_hosts Parameter 4600 4601(type=string, default=@samp{no}). If @samp{yes}, @i{Amd} will perform RPC 4602authentication using fully-qualified host names. This is necessary for 4603some systems, and especially when performing cross-domain mounting. For 4604this function to work, the @i{Amd} variable @samp{$@{hostd@}} is used, 4605requiring that @samp{$@{domain@}} not be null. 4606 4607@c ---------------------------------------------------------------- 4608@node hesiod_base Parameter, karch Parameter, fully_qualified_hosts Parameter, Global Parameters 4609@comment node-name, next, previous, up 4610@subsection @t{hesiod_base} Parameter 4611@cindex hesiod_base Parameter 4612 4613(type=string, default=@samp{automount}). Specify the base name for 4614hesiod maps. 4615 4616@c ---------------------------------------------------------------- 4617@node karch Parameter, ldap_base Parameter, hesiod_base Parameter, Global Parameters 4618@comment node-name, next, previous, up 4619@subsection @t{karch} Parameter 4620@cindex karch Parameter 4621 4622(type=string, default to karch of the system). Same as the @code{-k} 4623option to @i{Amd}. Allows you to override the kernel-architecture of 4624your system. Useful for example on Sun (Sparc) machines, where you can 4625build one @i{Amd} binary, and run it on multiple machines, yet you want 4626each one to get the correct @i{karch} variable set (for example, sun4c, 4627sun4m, sun4u, etc.) Note that if not specified, @i{Amd} will use 4628@b{uname}(2) to figure out the kernel architecture of the machine. 4629 4630@c ---------------------------------------------------------------- 4631@node ldap_base Parameter, ldap_cache_maxmem Parameter, karch Parameter, Global Parameters 4632@comment node-name, next, previous, up 4633@subsection @t{ldap_base} Parameter 4634@cindex ldap_base Parameter 4635 4636(type=string, default not set). 4637Specify the base name for LDAP. This often includes LDAP-specific 4638values such as country and organization. 4639 4640@c ---------------------------------------------------------------- 4641@node ldap_cache_maxmem Parameter, ldap_cache_seconds Parameter, ldap_base Parameter, Global Parameters 4642@comment node-name, next, previous, up 4643@subsection @t{ldap_cache_maxmem} Parameter 4644@cindex ldap_cache_maxmem Parameter 4645 4646(type=numeric, default=131072). Specify the maximum memory @i{Amd} 4647should use to cache LDAP entries. 4648 4649@c ---------------------------------------------------------------- 4650@node ldap_cache_seconds Parameter, ldap_hostports Parameter, ldap_cache_maxmem Parameter, Global Parameters 4651@comment node-name, next, previous, up 4652@subsection @t{ldap_cache_seconds} Parameter 4653@cindex ldap_cache_seconds Parameter 4654 4655(type=numeric, default=0). Specify the number of seconds to keep 4656entries in the cache. 4657 4658@c ---------------------------------------------------------------- 4659@node ldap_hostports Parameter, local_domain Parameter, ldap_cache_seconds Parameter, Global Parameters 4660@comment node-name, next, previous, up 4661@subsection @t{ldap_hostports} Parameter 4662@cindex ldap_hostports Parameter 4663 4664(type=string, default not set). 4665Specify the LDAP host and port values. 4666 4667@c ---------------------------------------------------------------- 4668@node local_domain Parameter, log_file Parameter, ldap_hostports Parameter, Global Parameters 4669@comment node-name, next, previous, up 4670@subsection @t{local_domain} Parameter 4671@cindex local_domain Parameter 4672 4673(type=string, default no sub-domain). Same as the @code{-d} option 4674to @i{Amd}. Specify the local domain name. If this option is not given 4675the domain name is determined from the hostname, by removing the first 4676component of the fully-qualified host name. 4677 4678@c ---------------------------------------------------------------- 4679@node log_file Parameter, log_options Parameter, local_domain Parameter, Global Parameters 4680@comment node-name, next, previous, up 4681@subsection @t{log_file} Parameter 4682@cindex log_file Parameter 4683 4684(type=string, default=@samp{stderr}). Same as the @code{-l} option to 4685@i{Amd}. Specify a file name to log @i{Amd} events to. 4686If the string @samp{/dev/stderr} is specified, 4687@i{Amd} will send its events to the standard error file descriptor. 4688 4689If the string @samp{syslog} is given, @i{Amd} will record its events 4690with the system logger @b{syslogd}(8). If your system supports syslog 4691facilities, then the default facility used is @samp{LOG_DAEMON}. 4692 4693When using syslog, if you wish to change the facility, append its name 4694to the option name, delimited by a single colon. For example, if it is 4695the string @samp{syslog:local7} then @i{Amd} will log messages via 4696@b{syslog}(3) using the @samp{LOG_LOCAL7} facility. If the facility 4697name specified is not recognized, @i{Amd} will default to @samp{LOG_DAEMON}. 4698Note: while you can use any syslog facility available on your system, it 4699is generally a bad idea to use those reserved for other services such as 4700@samp{kern}, @samp{lpr}, @samp{cron}, etc. 4701 4702@c ---------------------------------------------------------------- 4703@node log_options Parameter, nfs_allow_insecure_port Parameter, log_file Parameter, Global Parameters 4704@comment node-name, next, previous, up 4705@subsection @t{log_options} Parameter 4706@cindex log_options Parameter 4707 4708(type=string, default no logging options). Same as the @code{-x} 4709option to @i{Amd}. Specify any logging options for @i{Amd}. Options 4710are comma delimited, and can be preceded by the string @samp{no} to 4711negate their meaning. The @samp{debug} logging option is only available 4712if am-utils was configured with @code{--enable-debug}. You can get the 4713list of supported debugging options by running @code{amd -H}. Possible 4714values are: 4715 4716@table @samp 4717@item all 4718all messages 4719@item debug 4720debug messages 4721@item error 4722non-fatal system errors 4723@item fatal 4724fatal errors 4725@item info 4726information 4727@item map 4728map errors 4729@item stats 4730additional statistical information 4731@item user 4732non-fatal user errors 4733@item warn 4734warnings 4735@item warning 4736warnings 4737@end table 4738 4739@c ---------------------------------------------------------------- 4740@node nfs_allow_insecure_port Parameter, nfs_proto Parameter, log_options Parameter, Global Parameters 4741@comment node-name, next, previous, up 4742@subsection @t{nfs_allow_insecure_port} Parameter 4743@cindex nfs_allow_insecure_port Parameter 4744 4745(type=string, default=@samp{no}). Normally amd will refuse requests 4746coming from unprivileged ports (i.e. ports >= 1024 on Unix systems), 4747so that only privileged users and the kernel can send NFS requests to 4748it. However, some kernels (certain versions of Darwin, MacOS X, and 4749Linux) have bugs that cause them to use unprivileged ports in certain 4750situations, which causes amd to stop dead in its tracks. This 4751parameter allows amd to operate normally even on such systems, at the 4752expense of a slight decrease in the security of its operations. If you 4753see messages like ``ignoring request from foo:1234, port not 4754reserved'' in your amd log, try enabling this parameter and give it 4755another go. 4756 4757@c ---------------------------------------------------------------- 4758@node nfs_proto Parameter, nfs_retransmit_counter Parameter, nfs_allow_insecure_port Parameter, Global Parameters 4759@comment node-name, next, previous, up 4760@subsection @t{nfs_proto} Parameter 4761@cindex nfs_proto Parameter 4762 4763(type=string, default to trying version tcp then udp). By default, 4764@i{Amd} tries @code{tcp} and then @code{udp}. This option forces the 4765overall NFS protocol used to TCP or UDP. It overrides what is in the 4766@i{Amd} maps, and is useful when @i{Amd} is compiled with NFSv3 support 4767that may not be stable. With this option you can turn off the complete 4768usage of NFSv3 dynamically (without having to recompile @i{Amd}) until 4769such time as NFSv3 support is desired again. 4770 4771@c ---------------------------------------------------------------- 4772@node nfs_retransmit_counter Parameter, nfs_retry_interval Parameter, nfs_proto Parameter, Global Parameters 4773@comment node-name, next, previous, up 4774@subsection @t{nfs_retransmit_counter} Parameter 4775@cindex nfs_retransmit_counter Parameter 4776 4777(type=numeric, default=11). Same as the @i{retransmit} part of the 4778@code{-t} @i{timeout.retransmit} option to @i{Amd}. Specifies the 4779number of NFS retransmissions that the kernel will use to communicate 4780with @i{Amd}. @xref{-t Option}. 4781 4782@c ---------------------------------------------------------------- 4783@node nfs_retry_interval Parameter, nfs_vers Parameter, nfs_retransmit_counter Parameter, Global Parameters 4784@comment node-name, next, previous, up 4785@subsection @t{nfs_retry_interval} Parameter 4786@cindex nfs_retry_interval Parameter 4787 4788(type=numeric, default=8). Same as the @i{timeout} part of the 4789@code{-t} @i{timeout.retransmit} option to @i{Amd}. Specifies the NFS 4790timeout interval, in @emph{tenths} of seconds, between NFS/RPC retries 4791(for UDP only). This is the value that the kernel will use to 4792communicate with @i{Amd}. @xref{-t Option}. 4793 4794@i{Amd} relies on the kernel RPC retransmit mechanism to trigger mount 4795retries. The values of the @i{nfs_retransmit_counter} and the 4796@i{nfs_retry_interval} parameters change the overall retry interval. 4797Too long an interval gives poor interactive response; too short an 4798interval causes excessive retries. 4799 4800@c ---------------------------------------------------------------- 4801@node nfs_vers Parameter, nis_domain Parameter, nfs_retry_interval Parameter, Global Parameters 4802@comment node-name, next, previous, up 4803@subsection @t{nfs_vers} Parameter 4804@cindex nfs_vers Parameter 4805 4806(type=numeric, default to trying version 3 then 2). By default, @i{Amd} 4807tries version 3 and then version 2. This option forces the overall NFS 4808protocol used to version 3 or 2. It overrides what is in the @i{Amd} 4809maps, and is useful when @i{Amd} is compiled with NFSv3 support that may not 4810be stable. With this option you can turn off the complete usage of 4811NFSv3 dynamically (without having to recompile @i{Amd}) until such time as 4812NFSv3 support is desired again. 4813 4814@c ---------------------------------------------------------------- 4815@node nis_domain Parameter, normalize_hostnames Parameter, nfs_vers Parameter, Global Parameters 4816@comment node-name, next, previous, up 4817@subsection @t{nis_domain} Parameter 4818@cindex nis_domain Parameter 4819 4820(type=string, default to local NIS domain name). Same as the 4821@code{-y} option to @i{Amd}. Specify an alternative NIS domain from 4822which to fetch the NIS maps. The default is the system domain name. 4823This option is ignored if NIS support is not available. 4824 4825@c ---------------------------------------------------------------- 4826@node normalize_hostnames Parameter, os Parameter, nis_domain Parameter, Global Parameters 4827@comment node-name, next, previous, up 4828@subsection @t{normalize_hostnames} Parameter 4829@cindex normalize_hostnames Parameter 4830 4831(type=boolean, default=@samp{no}). Same as the @code{-n} option to @i{Amd}. 4832If @samp{yes}, then the name referred to by @code{$@{rhost@}} is normalized 4833relative to the host database before being used. The effect is to 4834translate aliases into ``official'' names. 4835 4836@c ---------------------------------------------------------------- 4837@node os Parameter, osver Parameter, normalize_hostnames Parameter, Global Parameters 4838@comment node-name, next, previous, up 4839@subsection @t{os} Parameter 4840@cindex os Parameter 4841 4842(type=string, default to compiled in value). Same as the @code{-O} 4843option to @i{Amd}. Allows you to override the compiled-in name of the 4844operating system. Useful when the built-in name is not desired for 4845backward compatibility reasons. For example, if the built-in name is 4846@samp{sunos5}, you can override it to @samp{sos5}, and use older maps 4847which were written with the latter in mind. 4848 4849 4850@c ---------------------------------------------------------------- 4851@node osver Parameter, pid_file Parameter, os Parameter, Global Parameters 4852@comment node-name, next, previous, up 4853@subsection @t{osver} Parameter 4854@cindex osver Parameter 4855 4856(type=string, default to compiled in value). Same as the @code{-o} 4857option to @i{Amd}. Allows you to override the compiled-in version 4858number of the operating system. Useful when the built-in version is not 4859desired for backward compatibility reasons. For example, if the build 4860in version is @samp{2.5.1}, you can override it to @samp{5.5.1}, and use 4861older maps that were written with the latter in mind. 4862 4863@c ---------------------------------------------------------------- 4864@node pid_file Parameter, plock Parameter, osver Parameter, Global Parameters 4865@comment node-name, next, previous, up 4866@subsection @t{pid_file} Parameter 4867@cindex pid_file Parameter 4868 4869(type=string, default=@samp{/dev/stdout}). Specify a file to store the process 4870ID of the running daemon into. If not specified, @i{Amd} will print its 4871process id onto the standard output. Useful for killing @i{Amd} after 4872it had run. Note that the PID of a running @i{Amd} can also be 4873retrieved via @i{Amq} (@pxref{Amq -p option}). 4874 4875This file is used only if the @samp{print_pid} option is on 4876(@pxref{print_pid Parameter}). 4877 4878@c ---------------------------------------------------------------- 4879@node plock Parameter, portmap_program Parameter, pid_file Parameter, Global Parameters 4880@comment node-name, next, previous, up 4881@subsection @t{plock} Parameter 4882@cindex plock Parameter 4883 4884(type=boolean, default=@samp{yes}). Same as the @code{-S} option to @i{Amd}. 4885If @samp{yes}, lock the running executable pages of @i{Amd} into memory. 4886To improve @i{Amd}'s performance, systems that support the @b{plock}(3) 4887call can lock the @i{Amd} process into memory. This way there is less 4888chance the operating system will schedule, page out, and swap the 4889@i{Amd} process as needed. This improves @i{Amd}'s performance, at the 4890cost of reserving the memory used by the @i{Amd} process (making it 4891unavailable for other processes). 4892 4893@c ---------------------------------------------------------------- 4894@node portmap_program Parameter, print_pid Parameter, plock Parameter, Global Parameters 4895@comment node-name, next, previous, up 4896@subsection @t{portmap_program} Parameter 4897@cindex portmap_program Parameter 4898 4899(type=numeric, default=300019). Specify an alternate Port-mapper RPC 4900program number, other than the official number. This is useful when 4901running multiple @i{Amd} processes. For example, you can run another 4902@i{Amd} in ``test'' mode, without affecting the primary @i{Amd} process 4903in any way. For safety reasons, the alternate program numbers that can 4904be specified must be in the range 300019-300029, inclusive. @i{Amq} has 4905an option @code{-P} which can be used to specify an alternate program 4906number of an @i{Amd} to contact. In this way, amq can fully control any 4907number of @i{Amd} processes running on the same host. 4908 4909@c ---------------------------------------------------------------- 4910@node print_pid Parameter, print_version Parameter, portmap_program Parameter, Global Parameters 4911@comment node-name, next, previous, up 4912@subsection @t{print_pid} Parameter 4913@cindex print_pid Parameter 4914 4915(type=boolean, default=@samp{no}). Same as the @code{-p} option to @i{Amd}. 4916If @samp{yes}, @i{Amd} will print its process ID upon starting. 4917 4918@c ---------------------------------------------------------------- 4919@node print_version Parameter, restart_mounts Parameter, print_pid Parameter, Global Parameters 4920@comment node-name, next, previous, up 4921@subsection @t{print_version} Parameter 4922@cindex print_version Parameter 4923 4924(type=boolean, default=@samp{no}). Same as the @code{-v} option to @i{Amd}, 4925but the version prints and @i{Amd} continues to run. If @samp{yes}, @i{Amd} 4926will print its version information string, which includes some 4927configuration and compilation values. 4928 4929@c ---------------------------------------------------------------- 4930@node restart_mounts Parameter, selectors_in_defaults Parameter, print_version Parameter, Global Parameters 4931@comment node-name, next, previous, up 4932@subsection @t{restart_mounts} Parameter 4933@cindex restart_mounts Parameter 4934 4935(type=boolean, default=@samp{no}). Same as the @code{-r} option to @i{Amd}. 4936If @samp{yes} @i{Amd} will scan the mount table to determine which file 4937systems are currently mounted. Whenever one of these would have been 4938auto-mounted, @i{Amd} inherits it. 4939 4940@c ---------------------------------------------------------------- 4941@node selectors_in_defaults Parameter, show_statfs_entries Parameter, restart_mounts Parameter, Global Parameters 4942@comment node-name, next, previous, up 4943@subsection @t{selectors_in_defaults} Parameter 4944@cindex selectors_in_defaults Parameter 4945 4946(type=boolean, default=@samp{no}). If @samp{yes}, then the @samp{/defaults} entry of 4947maps will search for and process any selectors before setting defaults 4948for all other keys in that map. Useful when you want to set different 4949options for a complete map based on some parameters. For example, you 4950may want to better the NFS performance over slow slip-based networks as 4951follows: 4952 4953@example 4954/defaults \ 4955 wire==slip-net;opts:=intr,rsize=1024,wsize=1024 \ 4956 wire!=slip-net;opts:=intr,rsize=8192,wsize=8192 4957@end example 4958 4959Deprecated form: selectors_on_default. 4960 4961@c ---------------------------------------------------------------- 4962@node show_statfs_entries Parameter, unmount_on_exit Parameter, selectors_in_defaults Parameter, Global Parameters 4963@comment node-name, next, previous, up 4964@subsection @t{show_statfs_entries} Parameter 4965@cindex show_statfs_entries Parameter 4966 4967(type=boolean), default=@samp{no}). If @samp{yes}, then all maps which are 4968browsable will also show the number of entries (keys) they have when 4969@b{df}(1) runs. (This is accomplished by returning non-zero values to 4970the @b{statfs}(2) system call). 4971 4972@c ---------------------------------------------------------------- 4973@node unmount_on_exit Parameter, vendor Parameter, show_statfs_entries Parameter, Global Parameters 4974@comment node-name, next, previous, up 4975@subsection @t{unmount_on_exit} Parameter 4976@cindex unmount_on_exit Parameter 4977 4978(type=boolean), default=@samp{no}). If @samp{yes}, then @i{Amd} will attempt 4979to unmount all file systems which it knows about. Normally it leaves 4980all (esp. NFS) mounted file systems intact. Note that @i{Amd} does not 4981know about file systems mounted before it starts up, unless the 4982@samp{restart_mounts} option is used (@pxref{restart_mounts Parameter}). 4983 4984@c ---------------------------------------------------------------- 4985@node vendor Parameter, , unmount_on_exit Parameter, Global Parameters 4986@comment node-name, next, previous, up 4987@subsection @t{vendor} Parameter 4988@cindex vendor Parameter 4989 4990(type=string, default to compiled in value). The name of the vendor of 4991the operating system. Overrides the compiled-in vendor name. Useful 4992when the compiled-in name is not desired. For example, most Intel based 4993systems set the vendor name to @samp{unknown}, but you can set it to 4994@samp{redhat}. 4995 4996@c ================================================================ 4997@node Regular Map Parameters, amd.conf Examples, Global Parameters, Amd Configuration File 4998@comment node-name, next, previous, up 4999@section Regular Map Parameters 5000@cindex amd.conf regular map parameters 5001 5002The following parameters are applicable only to regular map sections. 5003 5004@menu 5005* map_name Parameter:: 5006* tag Parameter:: 5007@end menu 5008 5009@c ---------------------------------------------------------------- 5010@node map_name Parameter, tag Parameter, Regular Map Parameters, Regular Map Parameters 5011@comment node-name, next, previous, up 5012@subsection map_name Parameter 5013@cindex map_name Parameter 5014 5015(type=string, must be specified). Name of the map where the keys are 5016located. 5017 5018@c ---------------------------------------------------------------- 5019@node tag Parameter, , map_name Parameter, Regular Map Parameters 5020@comment node-name, next, previous, up 5021@subsection tag Parameter 5022@cindex tag Parameter 5023 5024(type=string, default no tag). Each map entry in the configuration file 5025can be tagged. If no tag is specified, that map section will always be 5026processed by @i{Amd}. If it is specified, then @i{Amd} will process the map 5027if the @code{-T} option was given to @i{Amd}, and the value given to that 5028command-line option matches that in the map section. 5029 5030@c ================================================================ 5031@node amd.conf Examples, , Regular Map Parameters, Amd Configuration File 5032@comment node-name, next, previous, up 5033@section amd.conf Examples 5034@cindex amd.conf examples 5035 5036The following is the actual @code{amd.conf} file I use at the 5037Computer Science Department of Columbia University. 5038 5039@example 5040# GLOBAL OPTIONS SECTION 5041[ global ] 5042normalize_hostnames = no 5043print_pid = no 5044#pid_file = /var/run/amd.pid 5045restart_mounts = yes 5046#unmount_on_exit = yes 5047auto_dir = /n 5048log_file = /var/log/amd 5049log_options = all 5050#debug_options = all 5051plock = no 5052selectors_in_defaults = yes 5053# config.guess picks up "sunos5" and I don't want to edit my maps yet 5054os = sos5 5055# if you print_version after setting up "os", it will show it. 5056print_version = no 5057map_type = file 5058search_path = /etc/amdmaps:/usr/lib/amd:/usr/local/AMD/lib 5059browsable_dirs = yes 5060fully_qualified_hosts = no 5061 5062# DEFINE AN AMD MOUNT POINT 5063[ /u ] 5064map_name = amd.u 5065 5066[ /proj ] 5067map_name = amd.proj 5068 5069[ /src ] 5070map_name = amd.src 5071 5072[ /misc ] 5073map_name = amd.misc 5074 5075[ /import ] 5076map_name = amd.import 5077 5078[ /tftpboot/.amd ] 5079tag = tftpboot 5080map_name = amd.tftpboot 5081@end example 5082 5083@c ################################################################ 5084@node Run-time Administration, FSinfo, Amd Configuration File, Top 5085@comment node-name, next, previous, up 5086@chapter Run-time Administration 5087@cindex Run-time administration 5088@cindex Amq command 5089 5090@menu 5091* Starting Amd:: 5092* Stopping Amd:: 5093* Restarting Amd:: 5094* Controlling Amd:: 5095@end menu 5096 5097@node Starting Amd, Stopping Amd, Run-time Administration, Run-time Administration 5098@comment node-name, next, previous, up 5099@section Starting @i{Amd} 5100@cindex Starting Amd 5101@cindex Additions to /etc/rc.local 5102@cindex /etc/rc.local additions 5103@cindex ctl-amd 5104 5105@i{Amd} is best started from @samp{/etc/rc.local} on BSD systems, or 5106from the appropriate start-level script in @samp{/etc/init.d} on System V 5107systems. 5108 5109@example 5110if [ -f /usr/local/sbin/ctl-amd ]; then 5111 /usr/local/sbin/ctl-amd start; (echo -n ' amd') > /dev/console 5112fi 5113@end example 5114 5115@noindent 5116The shell script, @samp{ctl-amd} is used to start, stop, or restart 5117@i{Amd}. It is a relatively generic script. All options you want to 5118set should not be made in this script, but rather updated in the 5119@file{amd.conf} file. @xref{Amd Configuration File}. 5120 5121If you do not wish to use an @i{Amd} configuration file, you may start 5122@i{Amd} manually. For example, getting the map entries via NIS: 5123 5124@example 5125amd -r -l /var/log/amd `ypcat -k auto.master` 5126@end example 5127 5128@node Stopping Amd, Restarting Amd, Starting Amd, Run-time Administration 5129@comment node-name, next, previous, up 5130@section Stopping @i{Amd} 5131@cindex Stopping Amd 5132@cindex SIGTERM signal 5133@cindex SIGINT signal 5134 5135@i{Amd} stops in response to two signals. 5136 5137@table @samp 5138@item SIGTERM 5139causes the top-level automount points to be unmounted and then @i{Amd} 5140to exit. Any automounted filesystems are left mounted. They can be 5141recovered by restarting @i{Amd} with the @code{-r} command line option.@refill 5142 5143@item SIGINT 5144causes @i{Amd} to attempt to unmount any filesystems which it has 5145automounted, in addition to the actions of @samp{SIGTERM}. This signal 5146is primarily used for debugging.@refill 5147@end table 5148 5149Actions taken for other signals are undefined. 5150 5151The easiest and safest way to stop @i{Amd}, without having to find its 5152process ID by hand, is to use the @file{ctl-amd} script, as with: 5153 5154@example 5155ctl-amd stop 5156@end example 5157 5158@node Restarting Amd, Controlling Amd, Stopping Amd, Run-time Administration 5159@comment node-name, next, previous, up 5160@section Restarting @i{Amd} 5161@cindex Restarting Amd 5162@cindex Killing and starting Amd 5163 5164Before @i{Amd} can be started, it is vital to ensure that no other 5165@i{Amd} processes are managing any of the mount points, and that the 5166previous process(es) have terminated cleanly. When a terminating signal 5167is set to @i{Amd}, the automounter does @emph{not} terminate right then. 5168Rather, it starts by unmounting all of its managed mount mounts in the 5169background, and then terminates. It usually takes a few seconds for 5170this process to happen, but it can take an arbitrarily longer time. If 5171two or more @i{Amd} processes attempt to manage the same mount point, it 5172usually will result in a system lockup. 5173 5174The easiest and safest way to restart @i{Amd}, without having to find 5175its process ID by hand, sending it the @samp{SIGTERM} signal, waiting for @i{Amd} 5176to die cleanly, and verifying so, is to use the @file{ctl-amd} script, 5177as with: 5178 5179@example 5180ctl-amd restart 5181@end example 5182 5183The script will locate the process ID of @i{Amd}, kill it, and wait for 5184it to die cleanly before starting a new instance of the automounter. 5185@file{ctl-amd} will wait for a total of 30 seconds for @i{Amd} to die, 5186and will check once every 5 seconds if it had. 5187 5188@node Controlling Amd, , Restarting Amd, Run-time Administration 5189@comment node-name, next, previous, up 5190@section Controlling @i{Amd} 5191@cindex Controlling Amd 5192@cindex Discovering what is going on at run-time 5193@cindex Listing currently mounted filesystems 5194 5195It is sometimes desirable or necessary to exercise external control 5196over some of @i{Amd}'s internal state. To support this requirement, 5197@i{Amd} implements an RPC interface which is used by the @dfn{Amq} program. 5198A variety of information is available. 5199 5200@i{Amq} generally applies an operation, specified by a single letter option, 5201to a list of mount points. The default operation is to obtain statistics 5202about each mount point. This is similar to the output shown above 5203but includes information about the number and type of accesses to each 5204mount point. 5205 5206@menu 5207* Amq default:: Default command behavior. 5208* Amq -f option:: Flushing the map cache. 5209* Amq -h option:: Controlling a non-local host. 5210* Amq -H-option:: Print help message. 5211* Amq -l option:: Controlling the log file. 5212* Amq -m option:: Obtaining mount statistics. 5213* Amq -p option:: Getting Amd's process ID. 5214* Amq -P-option:: Contacting alternate Amd processes. 5215* Amq -s option:: Obtaining global statistics. 5216* Amq -T option:: Use TCP transport. 5217* Amq -U-option:: Use UDP transport. 5218* Amq -u option:: Forcing volumes to time out. 5219* Amq -v option:: Version information. 5220* Amq -w option:: Print Amd current working directory. 5221* Other Amq options:: Three other special options. 5222@end menu 5223 5224@c ---------------------------------------------------------------- 5225@node Amq default, Amq -f option, Controlling Amd, Controlling Amd 5226@comment node-name, next, previous, up 5227@subsection @i{Amq} default information 5228 5229With no arguments, @dfn{Amq} obtains a brief list of all existing 5230mounts created by @i{Amd}. This is different from the list displayed by 5231@b{df}(1) since the latter only includes system mount points. 5232 5233@noindent 5234The output from this option includes the following information: 5235 5236@itemize @bullet 5237@item 5238the automount point, 5239@item 5240the filesystem type, 5241@item 5242the mount map or mount information, 5243@item 5244the internal, or system mount point. 5245@end itemize 5246 5247@noindent 5248For example: 5249 5250@example 5251/ root "root" sky:(pid75) 5252/homes toplvl /usr/local/etc/amd.homes /homes 5253/home toplvl /usr/local/etc/amd.home /home 5254/homes/jsp nfs charm:/home/charm /a/charm/home/charm/jsp 5255/homes/phjk nfs toytown:/home/toytown /a/toytown/home/toytown/ai/phjk 5256@end example 5257 5258@noindent 5259If an argument is given then statistics for that volume name will 5260be output. For example: 5261 5262@example 5263What Uid Getattr Lookup RdDir RdLnk Statfs Mounted@@ 5264/homes 0 1196 512 22 0 30 90/09/14 12:32:55 5265/homes/jsp 0 0 0 0 1180 0 90/10/13 12:56:58 5266@end example 5267 5268@table @code 5269@item What 5270the volume name. 5271 5272@item Uid 5273ignored. 5274 5275@item Getattr 5276the count of NFS @dfn{getattr} requests on this node. This should only be 5277non-zero for directory nodes. 5278 5279@item Lookup 5280the count of NFS @dfn{lookup} requests on this node. This should only be 5281non-zero for directory nodes. 5282 5283@item RdDir 5284the count of NFS @dfn{readdir} requests on this node. This should only 5285be non-zero for directory nodes. 5286 5287@item RdLnk 5288the count of NFS @dfn{readlink} requests on this node. This should be 5289zero for directory nodes. 5290 5291@item Statfs 5292the count of NFS @dfn{statfs} requests on this node. This should only 5293be non-zero for top-level automount points. 5294 5295@item Mounted@@ 5296the date and time the volume name was first referenced. 5297@end table 5298 5299@c ---------------------------------------------------------------- 5300@node Amq -f option, Amq -h option, Amq default, Controlling Amd 5301@comment node-name, next, previous, up 5302@subsection @i{Amq} @code{-f} option 5303@cindex Flushing the map cache 5304@cindex Map cache, flushing 5305 5306The @code{-f} option causes @i{Amd} to flush the internal mount map cache. 5307This is useful for example in Hesiod maps since @i{Amd} will not 5308automatically notice when they have been updated. The map cache can 5309also be synchronized with the map source by using the @samp{sync} option 5310(@pxref{Automount Filesystem}).@refill 5311 5312@c ---------------------------------------------------------------- 5313@node Amq -h option, Amq -H-option, Amq -f option, Controlling Amd 5314@comment node-name, next, previous, up 5315@subsection @i{Amq} @code{-h} option 5316@cindex Querying an alternate host 5317 5318By default the local host is used. In an HP-UX cluster the root server 5319is used since that is the only place in the cluster where @i{Amd} will 5320be running. To query @i{Amd} on another host the @code{-h} option should 5321be used. 5322 5323@c ---------------------------------------------------------------- 5324@node Amq -H-option, Amq -l option, Amq -h option, Controlling Amd 5325@comment node-name, next, previous, up 5326@subsection @i{Amq} @code{-H} option 5327@cindex Displaying brief help 5328@cindex Help; showing from Amq 5329 5330Print a brief help and usage string. 5331 5332@c ---------------------------------------------------------------- 5333@node Amq -l option, Amq -m option, Amq -H-option, Controlling Amd 5334@comment node-name, next, previous, up 5335@subsection @i{Amq} @code{-l} option 5336@cindex Resetting the Amd log file 5337@cindex Setting the Amd log file via Amq 5338@cindex Log file, resetting 5339 5340Tell @i{Amd} to use @i{log_file} as the log file name. For security 5341reasons, this @emph{must} be the same log file which @i{Amd} used when 5342started. This option is therefore only useful to refresh @i{Amd}'s open 5343file handle on the log file, so that it can be rotated and compressed 5344via daily cron jobs. 5345 5346@c ---------------------------------------------------------------- 5347@node Amq -m option, Amq -p option, Amq -l option, Controlling Amd 5348@comment node-name, next, previous, up 5349@subsection @i{Amq} @code{-m} option 5350 5351The @code{-m} option displays similar information about mounted 5352filesystems, rather than automount points. The output includes the 5353following information: 5354 5355@itemize @bullet 5356@item 5357the mount information, 5358@item 5359the mount point, 5360@item 5361the filesystem type, 5362@item 5363the number of references to this filesystem, 5364@item 5365the server hostname, 5366@item 5367the state of the file server, 5368@item 5369any error which has occurred. 5370@end itemize 5371 5372For example: 5373 5374@example 5375"root" truth:(pid602) root 1 localhost is up 5376hesiod.home /home toplvl 1 localhost is up 5377hesiod.vol /vol toplvl 1 localhost is up 5378hesiod.homes /homes toplvl 1 localhost is up 5379amy:/home/amy /a/amy/home/amy nfs 5 amy is up 5380swan:/home/swan /a/swan/home/swan nfs 0 swan is up (Permission denied) 5381ex:/home/ex /a/ex/home/ex nfs 0 ex is down 5382@end example 5383 5384When the reference count is zero the filesystem is not mounted but 5385the mount point and server information is still being maintained 5386by @i{Amd}. 5387 5388@c ---------------------------------------------------------------- 5389@ignore 5390@comment Retained for future consideration: from the description of the 5391@comment amq -M option removed in amd 6.0.5. 5392 5393A future release of @i{Amd} will include code to allow the @b{mount}(8) 5394command to mount automount points: 5395 5396@example 5397mount -t amd /vol hesiod.vol 5398@end example 5399 5400This will then allow @i{Amd} to be controlled from the standard system 5401filesystem mount list. 5402 5403@end ignore 5404 5405@c ---------------------------------------------------------------- 5406@node Amq -p option, Amq -P-option, Amq -m option, Controlling Amd 5407@comment node-name, next, previous, up 5408@subsection @i{Amq} @code{-p} option 5409@cindex Process ID; Amd 5410@cindex Amd's process ID 5411@cindex Amd's PID 5412@cindex PID; Amd 5413 5414Return the process ID of the remote or locally running @i{Amd}. Useful 5415when you need to send a signal to the local @i{Amd} process, and would 5416rather not have to search through the process table. This option is 5417used in the @file{ctl-amd} script. 5418 5419@c ---------------------------------------------------------------- 5420@node Amq -P-option, Amq -s option, Amq -p option, Controlling Amd 5421@comment node-name, next, previous, up 5422@subsection @i{Amq} @code{-P} option 5423@cindex Multiple Amd processes 5424@cindex Running multiple Amd 5425@cindex Debugging a new Amd configuration 5426@cindex RPC Program numbers; Amd 5427 5428Contact an alternate running @i{Amd} that had registered itself on a 5429different RPC @var{program_number} and apply all other operations to 5430that instance of the automounter. This is useful when you run multiple 5431copies of @i{Amd}, and need to manage each one separately. If not 5432specified, @i{Amq} will use the default program number for @i{Amd}, 300019. 5433For security reasons, the only alternate program numbers @i{Amd} can use 5434range from 300019 to 300029, inclusive. 5435 5436For example, to kill an alternate running @i{Amd}: 5437 5438@example 5439kill `amq -p -P 300020` 5440@end example 5441 5442@c ---------------------------------------------------------------- 5443@node Amq -s option, Amq -T option, Amq -P-option, Controlling Amd 5444@comment node-name, next, previous, up 5445@subsection @i{Amq} @code{-s} option 5446@cindex Global statistics 5447@cindex Statistics 5448 5449The @code{-s} option displays global statistics. If any other options are specified 5450or any filesystems named then this option is ignored. For example: 5451 5452@example 5453requests stale mount mount unmount 5454deferred fhandles ok failed failed 54551054 1 487 290 7017 5456@end example 5457 5458@table @samp 5459@item Deferred requests 5460are those for which an immediate reply could not be constructed. For 5461example, this would happen if a background mount was required. 5462 5463@item Stale filehandles 5464counts the number of times the kernel passes a stale filehandle to @i{Amd}. 5465Large numbers indicate problems. 5466 5467@item Mount ok 5468counts the number of automounts which were successful. 5469 5470@item Mount failed 5471counts the number of automounts which failed. 5472 5473@item Unmount failed 5474counts the number of times a filesystem could not be unmounted. Very 5475large numbers here indicate that the time between unmount attempts 5476should be increased. 5477@end table 5478 5479@c ---------------------------------------------------------------- 5480@node Amq -T option, Amq -U-option, Amq -s option, Controlling Amd 5481@comment node-name, next, previous, up 5482@subsection @i{Amq} @code{-T} option 5483@cindex Forcing Amq to use a TCP transport 5484@cindex TCP; using with Amq 5485 5486The @code{-T} option causes the @i{Amq} to contact @i{Amd} using the TCP 5487transport only (connection oriented). Normally, @i{Amq} will use TCP 5488first, and if that failed, will try UDP. 5489 5490@c ---------------------------------------------------------------- 5491@node Amq -U-option, Amq -u option, Amq -T option, Controlling Amd 5492@comment node-name, next, previous, up 5493@subsection @i{Amq} @code{-U} option 5494@cindex Forcing Amq to use a UDP transport 5495@cindex UDP; using with Amq 5496 5497The @code{-U} option causes the @i{Amq} to contact @i{Amd} using the UDP 5498transport only (connectionless). Normally, @i{Amq} will use TCP first, 5499and if that failed, will try UDP. 5500 5501@c ---------------------------------------------------------------- 5502@node Amq -u option, Amq -v option, Amq -U-option, Controlling Amd 5503@comment node-name, next, previous, up 5504@subsection @i{Amq} @code{-u} option 5505@cindex Forcing filesystem to time out 5506@cindex Unmounting a filesystem 5507 5508The @code{-u} option causes the time-to-live interval of the named mount 5509points to be expired, thus causing an unmount attempt. This is the only 5510safe way to unmount an automounted filesystem. It is not possible to 5511unmount a filesystem which has been mounted with the @samp{nounmount} 5512flag. 5513 5514@c The @code{-H} option informs @i{Amd} that the specified mount point 5515@c has hung - as if its keepalive timer had expired. 5516 5517@c ---------------------------------------------------------------- 5518@node Amq -v option, Amq -w option, Amq -u option, Controlling Amd 5519@comment node-name, next, previous, up 5520@subsection @i{Amq} @code{-v} option 5521@cindex Version information at run-time 5522 5523The @code{-v} option displays the version of @i{Amd} in a similar way to 5524@i{Amd}'s @code{-v} option. 5525 5526@c ---------------------------------------------------------------- 5527@node Amq -w option, Other Amq options, Amq -v option, Controlling Amd 5528@comment node-name, next, previous, up 5529@subsection @i{Amq} @code{-w} option 5530@cindex Getting real working directory 5531 5532The @code{-w} option translates a full pathname as returned by 5533@b{getpwd}(3) into a short @i{Amd} pathname that goes through its mount 5534points. This option requires that @i{Amd} is running. 5535 5536@c ---------------------------------------------------------------- 5537@node Other Amq options, , Amq -w option, Controlling Amd 5538@comment node-name, next, previous, up 5539@subsection Other @i{Amq} options 5540@cindex Logging options via Amq 5541@cindex Debugging options via Amq 5542 5543Two other operations are implemented. These modify the state of @i{Amd} 5544as a whole, rather than any particular filesystem. The @code{-x} and 5545@code{-D} options have exactly the same effect as @i{Amd}'s corresponding 5546command line options. 5547 5548When @i{Amd} receives a @code{-x} flag it limits the log options being 5549modified to those which were not enabled at startup. This prevents a 5550user turning @emph{off} any logging option which was specified at 5551startup, though any which have been turned on since then can still be 5552turned off. The @code{-D} option has a similar behavior. 5553 5554@c ################################################################ 5555@node FSinfo, Hlfsd, Run-time Administration, Top 5556@comment node-name, next, previous, up 5557@chapter FSinfo 5558@cindex FSinfo 5559@cindex Filesystem info package 5560 5561XXX: this chapter should be reviewed by someone knowledgeable with 5562fsinfo. 5563 5564@menu 5565* FSinfo Overview:: Introduction to FSinfo. 5566* Using FSinfo:: Basic concepts. 5567* FSinfo Grammar:: Language syntax, semantics and examples. 5568* FSinfo host definitions:: Defining a new host. 5569* FSinfo host attributes:: Definable host attributes. 5570* FSinfo filesystems:: Defining locally attached filesystems. 5571* FSinfo static mounts:: Defining additional static mounts. 5572* FSinfo automount definitions:: 5573* FSinfo Command Line Options:: 5574* FSinfo errors:: 5575@end menu 5576 5577@node FSinfo Overview, Using FSinfo, FSinfo, FSinfo 5578@comment node-name, next, previous, up 5579@section @i{FSinfo} overview 5580@cindex FSinfo overview 5581 5582@i{FSinfo} is a filesystem management tool. It has been designed to 5583work with @i{Amd} to help system administrators keep track of the ever 5584increasing filesystem namespace under their control. 5585 5586The purpose of @i{FSinfo} is to generate all the important standard 5587filesystem data files from a single set of input data. Starting with a 5588single data source guarantees that all the generated files are 5589self-consistent. One of the possible output data formats is a set of 5590@i{Amd} maps which can be used amongst the set of hosts described in the 5591input data. 5592 5593@i{FSinfo} implements a declarative language. This language is 5594specifically designed for describing filesystem namespace and physical 5595layouts. The basic declaration defines a mounted filesystem including 5596its device name, mount point, and all the volumes and access 5597permissions. @i{FSinfo} reads this information and builds an internal 5598map of the entire network of hosts. Using this map, many different data 5599formats can be produced including @file{/etc/fstab}, 5600@file{/etc/exports}, @i{Amd} mount maps and 5601@file{/etc/bootparams}.@refill 5602 5603@node Using FSinfo, FSinfo Grammar, FSinfo Overview, FSinfo 5604@comment node-name, next, previous, up 5605@section Using @i{FSinfo} 5606@cindex Using FSinfo 5607 5608The basic strategy when using @i{FSinfo} is to gather all the 5609information about all disks on all machines into one set of 5610declarations. For each machine being managed, the following data is 5611required: 5612 5613@itemize @bullet 5614@item 5615Hostname 5616@item 5617List of all filesystems and, optionally, their mount points. 5618@item 5619Names of volumes stored on each filesystem. 5620@item 5621NFS export information for each volume. 5622@item 5623The list of static filesystem mounts. 5624@end itemize 5625 5626The following information can also be entered into the same 5627configuration files so that all data can be kept in one place. 5628 5629@itemize @bullet 5630@item 5631List of network interfaces 5632@item 5633IP address of each interface 5634@item 5635Hardware address of each interface 5636@item 5637Dumpset to which each filesystem belongs 5638@item 5639and more @dots{} 5640@end itemize 5641 5642To generate @i{Amd} mount maps, the automount tree must also be defined 5643(@pxref{FSinfo automount definitions}). This will have been designed at 5644the time the volume names were allocated. Some volume names will not be 5645automounted, so @i{FSinfo} needs an explicit list of which volumes 5646should be automounted.@refill 5647 5648Hostnames are required at several places in the @i{FSinfo} language. It 5649is important to stick to either fully qualified names or unqualified 5650names. Using a mixture of the two will inevitably result in confusion. 5651 5652Sometimes volumes need to be referenced which are not defined in the set 5653of hosts being managed with @i{FSinfo}. The required action is to add a 5654dummy set of definitions for the host and volume names required. Since 5655the files generated for those particular hosts will not be used on them, 5656the exact values used is not critical. 5657 5658@node FSinfo Grammar, FSinfo host definitions, Using FSinfo, FSinfo 5659@comment node-name, next, previous, up 5660@section @i{FSinfo} grammar 5661@cindex FSinfo grammar 5662@cindex Grammar, FSinfo 5663 5664@i{FSinfo} has a relatively simple grammar. Distinct syntactic 5665constructs exist for each of the different types of data, though they 5666share a common flavor. Several conventions are used in the grammar 5667fragments below. 5668 5669The notation, @i{list(}@t{xxx}@i{)}, indicates a list of zero or more 5670@t{xxx}'s. The notation, @i{opt(}@t{xxx}@i{)}, indicates zero or one 5671@t{xxx}. Items in double quotes, @i{eg} @t{"host"}, represent input 5672tokens. Items in angle brackets, @i{eg} @var{<hostname>}, represent 5673strings in the input. Strings need not be in double quotes, except to 5674differentiate them from reserved words. Quoted strings may include the 5675usual set of C ``@t{\}'' escape sequences with one exception: a 5676backslash-newline-whitespace sequence is squashed into a single space 5677character. To defeat this feature, put a further backslash at the start 5678of the second line. 5679 5680At the outermost level of the grammar, the input consists of a 5681sequence of host and automount declarations. These declarations are 5682all parsed before they are analyzed. This means they can appear in 5683any order and cyclic host references are possible. 5684 5685@example 5686fsinfo : @i{list(}fsinfo_attr@i{)} ; 5687 5688fsinfo_attr : host | automount ; 5689@end example 5690 5691@menu 5692* FSinfo host definitions:: 5693* FSinfo automount definitions:: 5694@end menu 5695 5696@node FSinfo host definitions, FSinfo host attributes, FSinfo Grammar, FSinfo 5697@comment node-name, next, previous, up 5698@section @i{FSinfo} host definitions 5699@cindex FSinfo host definitions 5700@cindex Defining a host, FSinfo 5701 5702A host declaration consists of three parts: a set of machine attribute 5703data, a list of filesystems physically attached to the machine, and a 5704list of additional statically mounted filesystems. 5705 5706@example 5707host : "host" host_data @i{list(}filesystem@i{@i{)}} @i{list(}mount@i{@i{)}} ; 5708@end example 5709 5710Each host must be declared in this way exactly once. Such things as the 5711hardware address, the architecture and operating system types and the 5712cluster name are all specified within the @dfn{host data}. 5713 5714All the disks the machine has should then be described in the @dfn{list 5715of filesystems}. When describing disks, you can specify what 5716@dfn{volname} the disk/partition should have and all such entries are 5717built up into a dictionary which can then be used for building the 5718automounter maps. 5719 5720The @dfn{list of mounts} specifies all the filesystems that should be 5721statically mounted on the machine. 5722 5723@menu 5724* FSinfo host attributes:: 5725* FSinfo filesystems:: 5726* FSinfo static mounts:: 5727@end menu 5728 5729@node FSinfo host attributes, FSinfo filesystems, FSinfo host definitions , FSinfo host definitions 5730@comment node-name, next, previous, up 5731@section @i{FSinfo} host attributes 5732@cindex FSinfo host attributes 5733@cindex Defining host attributes, FSinfo 5734 5735The host data, @dfn{host_data}, always includes the @dfn{hostname}. In 5736addition, several other host attributes can be given. 5737 5738@example 5739host_data : @var{<hostname>} 5740 | "@{" @i{list(}host_attrs@i{)} "@}" @var{<hostname>} 5741 ; 5742 5743host_attrs : host_attr "=" @var{<string>} 5744 | netif 5745 ; 5746 5747host_attr : "config" 5748 | "arch" 5749 | "os" 5750 | "cluster" 5751 ; 5752@end example 5753 5754The @dfn{hostname} is, typically, the fully qualified hostname of the 5755machine. 5756 5757Examples: 5758 5759@example 5760host dylan.doc.ic.ac.uk 5761 5762host @{ 5763 os = hpux 5764 arch = hp300 5765@} dougal.doc.ic.ac.uk 5766@end example 5767 5768The options that can be given as host attributes are shown below. 5769 5770@menu 5771* netif Option: FSinfo host netif: 5772* config Option: FSinfo host config: 5773* arch Option: FSinfo host arch: 5774* os Option: FSinfo host os: 5775* cluster Option: FSinfo host cluster: 5776@end menu 5777 5778@node FSinfo host netif, FSinfo host config, , FSinfo host attributes 5779@comment node-name, next, previous, up 5780@subsection netif Option 5781 5782This defines the set of network interfaces configured on the machine. 5783The interface attributes collected by @i{FSinfo} are the IP address, 5784subnet mask and hardware address. Multiple interfaces may be defined 5785for hosts with several interfaces by an entry for each interface. The 5786values given are sanity checked, but are currently unused for anything 5787else. 5788 5789@example 5790netif : "netif" @var{<string>} "@{" @i{list(}netif_attrs@i{)} "@}" ; 5791 5792netif_attrs : netif_attr "=" @var{<string>} ; 5793 5794netif_attr : "inaddr" | "netmask" | "hwaddr" ; 5795@end example 5796 5797Examples: 5798 5799@example 5800netif ie0 @{ 5801 inaddr = 129.31.81.37 5802 netmask = 0xfffffe00 5803 hwaddr = "08:00:20:01:a6:a5" 5804@} 5805 5806netif ec0 @{ @} 5807@end example 5808 5809@node FSinfo host config, FSinfo host arch, FSinfo host netif, FSinfo host attributes 5810@comment node-name, next, previous, up 5811@subsection config Option 5812@cindex FSinfo config host attribute 5813@cindex config, FSinfo host attribute 5814 5815This option allows you to specify configuration variables for the 5816startup scripts (@file{rc} scripts). A simple string should immediately 5817follow the keyword. 5818 5819Example: 5820 5821@example 5822config "NFS_SERVER=true" 5823config "ZEPHYR=true" 5824@end example 5825 5826This option is currently unsupported. 5827 5828@node FSinfo host arch, FSinfo host os, FSinfo host config, FSinfo host attributes 5829@comment node-name, next, previous, up 5830@subsection arch Option 5831@cindex FSinfo arch host attribute 5832@cindex arch, FSinfo host attribute 5833 5834This defines the architecture of the machine. For example: 5835 5836@example 5837arch = hp300 5838@end example 5839 5840This is intended to be of use when building architecture specific 5841mountmaps, however, the option is currently unsupported. 5842 5843@node FSinfo host os, FSinfo host cluster, FSinfo host arch, FSinfo host attributes 5844@comment node-name, next, previous, up 5845@subsection os Option 5846@cindex FSinfo os host attribute 5847@cindex os, FSinfo host attribute 5848 5849This defines the operating system type of the host. For example: 5850 5851@example 5852os = hpux 5853@end example 5854 5855This information is used when creating the @file{fstab} files, for 5856example in choosing which format to use for the @file{fstab} entries 5857within the file. 5858 5859@node FSinfo host cluster, , FSinfo host os, FSinfo host attributes 5860@comment node-name, next, previous, up 5861@subsection cluster Option 5862@cindex FSinfo cluster host attribute 5863@cindex cluster, FSinfo host attribute 5864 5865This is used for specifying in which cluster the machine belongs. For 5866example: 5867 5868@example 5869cluster = "theory" 5870@end example 5871 5872The cluster is intended to be used when generating the automount maps, 5873although it is currently unsupported. 5874 5875@node FSinfo filesystems, FSinfo static mounts, FSinfo host attributes, FSinfo host definitions 5876@comment node-name, next, previous, up 5877@section @i{FSinfo} filesystems 5878@cindex FSinfo filesystems 5879 5880The list of physically attached filesystems follows the machine 5881attributes. These should define all the filesystems available from this 5882machine, whether exported or not. In addition to the device name, 5883filesystems have several attributes, such as filesystem type, mount 5884options, and @samp{fsck} pass number which are needed to generate 5885@file{fstab} entries. 5886 5887@example 5888filesystem : "fs" @var{<device>} "@{" @i{list(}fs_data@i{)} "@}" ; 5889 5890fs_data : fs_data_attr "=" @var{<string>} 5891 | mount 5892 ; 5893 5894fs_data_attr 5895 : "fstype" | "opts" | "passno" 5896 | "freq" | "dumpset" | "log" 5897 ; 5898@end example 5899 5900Here, @var{<device>} is the device name of the disk (for example, 5901@file{/dev/dsk/2s0}). The device name is used for building the mount 5902maps and for the @file{fstab} file. The attributes that can be 5903specified are shown in the following section. 5904 5905The @i{FSinfo} configuration file for @code{dylan.doc.ic.ac.uk} is listed below. 5906 5907@example 5908host dylan.doc.ic.ac.uk 5909 5910fs /dev/dsk/0s0 @{ 5911 fstype = swap 5912@} 5913 5914fs /dev/dsk/0s0 @{ 5915 fstype = hfs 5916 opts = rw,noquota,grpid 5917 passno = 0; 5918 freq = 1; 5919 mount / @{ @} 5920@} 5921 5922fs /dev/dsk/1s0 @{ 5923 fstype = hfs 5924 opts = defaults 5925 passno = 1; 5926 freq = 1; 5927 mount /usr @{ 5928 local @{ 5929 exportfs "dougal eden dylan zebedee brian" 5930 volname /nfs/hp300/local 5931 @} 5932 @} 5933@} 5934 5935fs /dev/dsk/2s0 @{ 5936 fstype = hfs 5937 opts = defaults 5938 passno = 1; 5939 freq = 1; 5940 mount default @{ 5941 exportfs "toytown_clients hangers_on" 5942 volname /home/dylan/dk2 5943 @} 5944@} 5945 5946fs /dev/dsk/3s0 @{ 5947 fstype = hfs 5948 opts = defaults 5949 passno = 1; 5950 freq = 1; 5951 mount default @{ 5952 exportfs "toytown_clients hangers_on" 5953 volname /home/dylan/dk3 5954 @} 5955@} 5956 5957fs /dev/dsk/5s0 @{ 5958 fstype = hfs 5959 opts = defaults 5960 passno = 1; 5961 freq = 1; 5962 mount default @{ 5963 exportfs "toytown_clients hangers_on" 5964 volname /home/dylan/dk5 5965 @} 5966@} 5967@end example 5968 5969@menu 5970* fstype Option: FSinfo filesystems fstype: 5971* opts Option: FSinfo filesystems opts: 5972* passno Option: FSinfo filesystems passno: 5973* freq Option: FSinfo filesystems freq: 5974* mount Option: FSinfo filesystems mount: 5975* dumpset Option: FSinfo filesystems dumpset: 5976* log Option: FSinfo filesystems log: 5977@end menu 5978 5979@node FSinfo filesystems fstype, FSinfo filesystems opts, , FSinfo filesystems 5980@comment node-name, next, previous, up 5981@subsection fstype Option 5982@cindex FSinfo fstype filesystems option 5983@cindex fstype, FSinfo filesystems option 5984@cindex export, FSinfo special fstype 5985 5986This specifies the type of filesystem being declared and will be placed 5987into the @file{fstab} file as is. The value of this option will be 5988handed to @code{mount} as the filesystem type---it should have such 5989values as @code{4.2}, @code{nfs} or @code{swap}. The value is not 5990examined for correctness. 5991 5992There is one special case. If the filesystem type is specified as 5993@samp{export} then the filesystem information will not be added to the 5994host's @file{fstab} information, but it will still be visible on the 5995network. This is useful for defining hosts which contain referenced 5996volumes but which are not under full control of @i{FSinfo}. 5997 5998Example: 5999 6000@example 6001fstype = swap 6002@end example 6003 6004@node FSinfo filesystems opts, FSinfo filesystems passno, FSinfo filesystems fstype, FSinfo filesystems 6005@comment node-name, next, previous, up 6006@subsection opts Option 6007@cindex FSinfo opts filesystems option 6008@cindex opts, FSinfo filesystems option 6009 6010This defines any options that should be given to @b{mount}(8) in the 6011@file{fstab} file. For example: 6012 6013@example 6014opts = rw,nosuid,grpid 6015@end example 6016 6017@node FSinfo filesystems passno, FSinfo filesystems freq, FSinfo filesystems opts, FSinfo filesystems 6018@comment node-name, next, previous, up 6019@subsection passno Option 6020@cindex FSinfo passno filesystems option 6021@cindex passno, FSinfo filesystems option 6022 6023This defines the @b{fsck}(8) pass number in which to check the 6024filesystem. This value will be placed into the @file{fstab} file. 6025 6026Example: 6027 6028@example 6029passno = 1 6030@end example 6031 6032@node FSinfo filesystems freq, FSinfo filesystems mount, FSinfo filesystems passno, FSinfo filesystems 6033@comment node-name, next, previous, up 6034@subsection freq Option 6035@cindex FSinfo freq filesystems option 6036@cindex freq, FSinfo filesystems option 6037 6038This defines the interval (in days) between dumps. The value is placed 6039as is into the @file{fstab} file. 6040 6041Example: 6042 6043@example 6044freq = 3 6045@end example 6046 6047@node FSinfo filesystems mount, FSinfo filesystems dumpset, FSinfo filesystems freq, FSinfo filesystems 6048@comment node-name, next, previous, up 6049@subsection mount Option 6050@cindex FSinfo mount filesystems option 6051@cindex mount, FSinfo filesystems option 6052@cindex exportfs, FSinfo mount option 6053@cindex volname, FSinfo mount option 6054@cindex sel, FSinfo mount option 6055 6056This defines the mountpoint at which to place the filesystem. If the 6057mountpoint of the filesystem is specified as @code{default}, then the 6058filesystem will be mounted in the automounter's tree under its volume 6059name and the mount will automatically be inherited by the automounter. 6060 6061Following the mountpoint, namespace information for the filesystem may 6062be described. The options that can be given here are @code{exportfs}, 6063@code{volname} and @code{sel}. 6064 6065The format is: 6066 6067@example 6068mount : "mount" vol_tree ; 6069 6070vol_tree : @i{list(}vol_tree_attr@i{)} ; 6071 6072vol_tree_attr 6073 : @var{<string>} "@{" @i{list(}vol_tree_info@i{)} vol_tree "@}" ; 6074 6075vol_tree_info 6076 : "exportfs" @var{<export-data>} 6077 | "volname" @var{<volname>} 6078 | "sel" @var{<selector-list>} 6079 ; 6080@end example 6081 6082Example: 6083 6084@example 6085mount default @{ 6086 exportfs "dylan dougal florence zebedee" 6087 volname /vol/andrew 6088@} 6089@end example 6090 6091In the above example, the filesystem currently being declared will have 6092an entry placed into the @file{exports} file allowing the filesystem to 6093be exported to the machines @code{dylan}, @code{dougal}, @code{florence} 6094and @code{zebedee}. The volume name by which the filesystem will be 6095referred to remotely, is @file{/vol/andrew}. By declaring the 6096mountpoint to be @code{default}, the filesystem will be mounted on the 6097local machine in the automounter tree, where @i{Amd} will automatically 6098inherit the mount as @file{/vol/andrew}.@refill 6099 6100@table @samp 6101@item exportfs 6102a string defining which machines the filesystem may be exported to. 6103This is copied, as is, into the @file{exports} file---no sanity checking 6104is performed on this string.@refill 6105 6106@item volname 6107a string which declares the remote name by which to reference the 6108filesystem. The string is entered into a dictionary and allows you to 6109refer to this filesystem in other places by this volume name.@refill 6110 6111@item sel 6112a string which is placed into the automounter maps as a selector for the 6113filesystem.@refill 6114 6115@end table 6116 6117@node FSinfo filesystems dumpset, FSinfo filesystems log, FSinfo filesystems mount, FSinfo filesystems 6118@comment node-name, next, previous, up 6119@subsection dumpset Option 6120@cindex FSinfo dumpset filesystems option 6121@cindex dumpset, FSinfo filesystems option 6122 6123This provides support for Imperial College's local file backup tools and 6124is not documented further here. 6125 6126@node FSinfo filesystems log, , FSinfo filesystems dumpset, FSinfo filesystems 6127@comment node-name, next, previous, up 6128@subsection log Option 6129@cindex FSinfo log filesystems option 6130@cindex log, FSinfo filesystems option 6131 6132Specifies the log device for the current filesystem. This is ignored if 6133not required by the particular filesystem type. 6134 6135@node FSinfo static mounts, FSinfo automount definitions , FSinfo filesystems, FSinfo host definitions 6136@comment node-name, next, previous, up 6137@section @i{FSinfo} static mounts 6138@cindex FSinfo static mounts 6139@cindex Statically mounts filesystems, FSinfo 6140 6141Each host may also have a number of statically mounted filesystems. For 6142example, the host may be a diskless workstation in which case it will 6143have no @code{fs} declarations. In this case the @code{mount} 6144declaration is used to determine from where its filesystems will be 6145mounted. In addition to being added to the @file{fstab} file, this 6146information can also be used to generate a suitable @file{bootparams} 6147file.@refill 6148 6149@example 6150mount : "mount" @var{<volname>} @i{list(}localinfo@i{)} ; 6151 6152localinfo : localinfo_attr @var{<string>} ; 6153 6154localinfo_attr 6155 : "as" 6156 | "from" 6157 | "fstype" 6158 | "opts" 6159 ; 6160@end example 6161 6162The filesystem specified to be mounted will be searched for in the 6163dictionary of volume names built when scanning the list of hosts' 6164definitions. 6165 6166The attributes have the following semantics: 6167@table @samp 6168@item from @var{machine} 6169mount the filesystem from the machine with the hostname of 6170@dfn{machine}.@refill 6171 6172@item as @var{mountpoint} 6173mount the filesystem locally as the name given, in case this is 6174different from the advertised volume name of the filesystem. 6175 6176@item opts @var{options} 6177native @b{mount}(8) options. 6178 6179@item fstype @var{type} 6180type of filesystem to be mounted. 6181@end table 6182 6183An example: 6184 6185@example 6186mount /export/exec/hp300/local as /usr/local 6187@end example 6188 6189If the mountpoint specified is either @file{/} or @file{swap}, the 6190machine will be considered to be booting off the net and this will be 6191noted for use in generating a @file{bootparams} file for the host which 6192owns the filesystems. 6193 6194@node FSinfo automount definitions, FSinfo Command Line Options, FSinfo static mounts, FSinfo 6195@comment node-name, next, previous, up 6196@section Defining an @i{Amd} Mount Map in @i{FSinfo} 6197@cindex FSinfo automount definitions 6198@cindex Defining an Amd mount map, FSinfo 6199 6200The maps used by @i{Amd} can be constructed from @i{FSinfo} by defining 6201all the automount trees. @i{FSinfo} takes all the definitions found and 6202builds one map for each top level tree. 6203 6204The automount tree is usually defined last. A single automount 6205configuration will usually apply to an entire management domain. One 6206@code{automount} declaration is needed for each @i{Amd} automount point. 6207@i{FSinfo} determines whether the automount point is @dfn{direct} 6208(@pxref{Direct Automount Filesystem}) or @dfn{indirect} 6209(@pxref{Top-level Filesystem}). Direct automount points are 6210distinguished by the fact that there is no underlying 6211@dfn{automount_tree}.@refill 6212 6213@example 6214automount : "automount" @i{opt(}auto_opts@i{)} automount_tree ; 6215 6216auto_opts : "opts" @var{<mount-options>} ; 6217 6218automount_tree 6219 : @i{list(}automount_attr@i{)} 6220 ; 6221 6222automount_attr 6223 : @var{<string>} "=" @var{<volname>} 6224 | @var{<string>} "->" @var{<symlink>} 6225 | @var{<string>} "@{" automount_tree "@}" 6226 ; 6227@end example 6228 6229If @var{<mount-options>} is given, then it is the string to be placed in 6230the maps for @i{Amd} for the @code{opts} option. 6231 6232A @dfn{map} is typically a tree of filesystems, for example @file{home} 6233normally contains a tree of filesystems representing other machines in 6234the network. 6235 6236A map can either be given as a name representing an already defined 6237volume name, or it can be a tree. A tree is represented by placing 6238braces after the name. For example, to define a tree @file{/vol}, the 6239following map would be defined: 6240 6241@example 6242automount /vol @{ @} 6243@end example 6244 6245Within a tree, the only items that can appear are more maps. 6246For example: 6247 6248@example 6249automount /vol @{ 6250 andrew @{ @} 6251 X11 @{ @} 6252@} 6253@end example 6254 6255In this case, @i{FSinfo} will look for volumes named @file{/vol/andrew} 6256and @file{/vol/X11} and a map entry will be generated for each. If the 6257volumes are defined more than once, then @i{FSinfo} will generate 6258a series of alternate entries for them in the maps.@refill 6259 6260Instead of a tree, either a link (@var{name} @code{->} 6261@var{destination}) or a reference can be specified (@var{name} @code{=} 6262@var{destination}). A link creates a symbolic link to the string 6263specified, without further processing the entry. A reference will 6264examine the destination filesystem and optimize the reference. For 6265example, to create an entry for @code{njw} in the @file{/homes} map, 6266either of the two forms can be used:@refill 6267 6268@example 6269automount /homes @{ 6270 njw -> /home/dylan/njw 6271@} 6272@end example 6273 6274or 6275 6276@example 6277automount /homes @{ 6278 njw = /home/dylan/njw 6279@} 6280@end example 6281 6282In the first example, when @file{/homes/njw} is referenced from @i{Amd}, 6283a link will be created leading to @file{/home/dylan/njw} and the 6284automounter will be referenced a second time to resolve this filename. 6285The map entry would be: 6286 6287@example 6288njw type:=link;fs:=/home/dylan/njw 6289@end example 6290 6291In the second example, the destination directory is analyzed and found 6292to be in the filesystem @file{/home/dylan} which has previously been 6293defined in the maps. Hence the map entry will look like: 6294 6295@example 6296njw rhost:=dylan;rfs:=/home/dylan;sublink:=njw 6297@end example 6298 6299Creating only one symbolic link, and one access to @i{Amd}. 6300 6301@node FSinfo Command Line Options, FSinfo errors, FSinfo automount definitions, FSinfo 6302@comment node-name, next, previous, up 6303@section @i{FSinfo} Command Line Options 6304@cindex FSinfo command line options 6305@cindex Command line options, FSinfo 6306 6307@i{FSinfo} is started from the command line by using the command: 6308 6309@example 6310fsinfo [@i{options}] @i{files} ... 6311@end example 6312 6313The input to @i{FSinfo} is a single set of definitions of machines and 6314automount maps. If multiple files are given on the command-line, then 6315the files are concatenated together to form the input source. The files 6316are passed individually through the C pre-processor before being parsed. 6317 6318Several options define a prefix for the name of an output file. If the 6319prefix is not specified no output of that type is produced. The suffix 6320used will correspond either to the hostname to which a file belongs, or 6321to the type of output if only one file is produced. Dumpsets and the 6322@file{bootparams} file are in the latter class. To put the output into 6323a subdirectory simply put a @file{/} at the end of the prefix, making 6324sure that the directory has already been made before running 6325@i{Fsinfo}. 6326 6327@menu 6328* -a FSinfo Option:: Amd automount directory: 6329* -b FSinfo Option:: Prefix for bootparams files. 6330* -d FSinfo Option:: Prefix for dumpset data files. 6331* -e FSinfo Option:: Prefix for exports files. 6332* -f FSinfo Option:: Prefix for fstab files. 6333* -h FSinfo Option:: Local hostname. 6334* -m FSinfo Option:: Prefix for automount maps. 6335* -q FSinfo Option:: Ultra quiet mode. 6336* -v FSinfo Option:: Verbose mode. 6337* -I FSinfo Option:: Define new #include directory. 6338* -D-FSinfo Option:: Define macro. 6339* -U FSinfo Option:: Undefine macro. 6340@end menu 6341 6342@node -a FSinfo Option, -b FSinfo Option, FSinfo Command Line Options, FSinfo Command Line Options 6343@comment node-name, next, previous, up 6344@subsection @code{-a} @var{autodir} 6345 6346Specifies the directory name in which to place the automounter's 6347mountpoints. This defaults to @file{/a}. Some sites have the autodir set 6348to be @file{/amd}, and this would be achieved by: 6349 6350@example 6351fsinfo -a /amd ... 6352@end example 6353 6354@node -b FSinfo Option, -d FSinfo Option, -a FSinfo Option, FSinfo Command Line Options 6355@comment node-name, next, previous, up 6356@subsection @code{-b} @var{bootparams} 6357@cindex bootparams, FSinfo prefix 6358 6359This specifies the prefix for the @file{bootparams} filename. If it is 6360not given, then the file will not be generated. The @file{bootparams} 6361file will be constructed for the destination machine and will be placed 6362into a file named @file{bootparams} and prefixed by this string. The 6363file generated contains a list of entries describing each diskless 6364client that can boot from the destination machine. 6365 6366As an example, to create a @file{bootparams} file in the directory 6367@file{generic}, the following would be used: 6368 6369@example 6370fsinfo -b generic/ ... 6371@end example 6372 6373@node -d FSinfo Option, -e FSinfo Option, -b FSinfo Option, FSinfo Command Line Options 6374@comment node-name, next, previous, up 6375@subsection @code{-d} @var{dumpsets} 6376@cindex dumpset, FSinfo prefix 6377 6378This specifies the prefix for the @file{dumpsets} file. If it is not 6379specified, then the file will not be generated. The file will be for 6380the destination machine and will be placed into a filename 6381@file{dumpsets}, prefixed by this string. The @file{dumpsets} file is 6382for use by Imperial College's local backup system. 6383 6384For example, to create a @file{dumpsets} file in the directory @file{generic}, 6385then you would use the following: 6386 6387@example 6388fsinfo -d generic/ ... 6389@end example 6390 6391@node -e FSinfo Option, -f FSinfo Option, -d FSinfo Option, FSinfo Command Line Options 6392@comment node-name, next, previous, up 6393@subsection @code{-e} @var{exportfs} 6394@cindex exports, FSinfo prefix 6395 6396Defines the prefix for the @file{exports} files. If it is not given, 6397then the file will not be generated. For each machine defined in the 6398configuration files as having disks, an @file{exports} file is 6399constructed and given a filename determined by the name of the machine, 6400prefixed with this string. If a machine is defined as diskless, then no 6401@file{exports} file will be created for it. The files contain entries 6402for directories on the machine that may be exported to clients. 6403 6404Example: To create the @file{exports} files for each diskfull machine 6405and place them into the directory @file{exports}: 6406 6407@example 6408fsinfo -e exports/ ... 6409@end example 6410 6411@node -f FSinfo Option, -h FSinfo Option, -e FSinfo Option, FSinfo Command Line Options 6412@comment node-name, next, previous, up 6413@subsection @code{-f} @var{fstab} 6414@cindex fstab, FSinfo prefix 6415 6416This defines the prefix for the @file{fstab} files. The files will only 6417be created if this prefix is defined. For each machine defined in the 6418configuration files, a @file{fstab} file is created with the filename 6419determined by prefixing this string with the name of the machine. These 6420files contain entries for filesystems and partitions to mount at boot 6421time. 6422 6423Example, to create the files in the directory @file{fstabs}: 6424 6425@example 6426fsinfo -f fstabs/ ... 6427@end example 6428 6429@node -h FSinfo Option, -m FSinfo Option, -f FSinfo Option, FSinfo Command Line Options 6430@comment node-name, next, previous, up 6431@subsection @code{-h} @var{hostname} 6432@cindex hostname, FSinfo command line option 6433 6434Defines the hostname of the destination machine to process for. If this 6435is not specified, it defaults to the local machine name, as returned by 6436@b{gethostname}(2). 6437 6438Example: 6439 6440@example 6441fsinfo -h dylan.doc.ic.ac.uk ... 6442@end example 6443 6444@node -m FSinfo Option, -q FSinfo Option, -h FSinfo Option, FSinfo Command Line Options 6445@comment node-name, next, previous, up 6446@subsection @code{-m} @var{mount-maps} 6447@cindex maps, FSinfo command line option 6448 6449Defines the prefix for the automounter files. The maps will only be 6450produced if this prefix is defined. The mount maps suitable for the 6451network defined by the configuration files will be placed into files 6452with names calculated by prefixing this string to the name of each map. 6453 6454For example, to create the automounter maps and place them in the 6455directory @file{automaps}: 6456 6457@example 6458fsinfo -m automaps/ ... 6459@end example 6460 6461@node -q FSinfo Option, -v FSinfo Option, -m FSinfo Option, FSinfo Command Line Options 6462@comment node-name, next, previous, up 6463@subsection @code{-q} 6464@cindex quiet, FSinfo command line option 6465 6466Selects quiet mode. @i{FSinfo} suppress the ``running commentary'' and 6467only outputs any error messages which are generated. 6468 6469@node -v FSinfo Option, -D-FSinfo Option, -q FSinfo Option, FSinfo Command Line Options 6470@comment node-name, next, previous, up 6471@subsection @code{-v} 6472@cindex verbose, FSinfo command line option 6473 6474Selects verbose mode. When this is activated, the program will display 6475more messages, and display all the information discovered when 6476performing the semantic analysis phase. Each verbose message is output 6477to @file{stdout} on a line starting with a @samp{#} character. 6478 6479@node -D-FSinfo Option, -I FSinfo Option, -v FSinfo Option, FSinfo Command Line Options 6480@comment node-name, next, previous, up 6481@subsection @code{-D} @var{name}@i{[=defn]} 6482 6483Defines a symbol @dfn{name} for the preprocessor when reading the 6484configuration files. Equivalent to @code{#define} directive. 6485 6486@node -I FSinfo Option, -U FSinfo Option, -D-FSinfo Option, FSinfo Command Line Options 6487@comment node-name, next, previous, up 6488@subsection @code{-I} @var{directory} 6489 6490This option is passed into the preprocessor for the configuration files. 6491It specifies directories in which to find include files 6492 6493@node -U FSinfo Option, , -I FSinfo Option, FSinfo Command Line Options 6494@comment node-name, next, previous, up 6495@subsection @code{-U} @var{name} 6496 6497Removes any initial definition of the symbol @dfn{name}. Inverse of the 6498@code{-D} option. 6499 6500@node FSinfo errors, , FSinfo Command Line Options, FSinfo 6501@comment node-name, next, previous, up 6502@section Errors produced by @i{FSinfo} 6503@cindex FSinfo error messages 6504 6505The following table documents the errors and warnings which @i{FSinfo} may produce. 6506 6507@table @t 6508 6509@item " expected 6510Occurs if an unescaped newline is found in a quoted string. 6511 6512@item ambiguous mount: @var{volume} is a replicated filesystem 6513If several filesystems are declared as having the same volume name, they 6514will be considered replicated filesystems. To mount a replicated 6515filesystem statically, a specific host will need to be named, to say 6516which particular copy to try and mount, else this error will 6517result. 6518 6519@item can't open @var{filename} for writing 6520Occurs if any errors are encountered when opening an output file. 6521 6522@item cannot determine localname since volname @var{volume} is not uniquely defined 6523If a volume is replicated and an attempt is made to mount the filesystem 6524statically without specifying a local mountpoint, @i{FSinfo} cannot 6525calculate a mountpoint, as the desired pathname would be 6526ambiguous. 6527 6528@item @var{device} has duplicate exportfs data 6529Produced if the @samp{exportfs} option is used multiple times within the 6530same branch of a filesystem definition. For example, if you attempt to 6531set the @samp{exportfs} data at different levels of the mountpoint 6532directory tree. 6533 6534@item dump frequency for @var{host}:@var{device} is non-zero 6535Occurs if @var{device} has its @samp{fstype} declared to be @samp{swap} 6536or @samp{export} and the @samp{dump} option is set to a value greater 6537than zero. Swap devices should not be dumped. 6538 6539@item duplicate host @var{hostname}! 6540If a host has more than one definition. 6541 6542@item end of file within comment 6543A comment was unterminated before the end of one of the configuration 6544files. 6545 6546@item @var{filename}: cannot open for reading 6547If a file specified on the command line as containing configuration data 6548could not be opened. 6549 6550@item @var{filesystem} has a volname but no exportfs data 6551Occurs when a volume name is declared for a file system, but the string 6552specifying what machines the filesystem can be exported to is 6553missing. 6554 6555@item fs field "@var{field-name}" already set 6556Occurs when multiple definitions are given for one of the attributes of a 6557host's filesystem. 6558 6559@item host field "@var{field-name}" already set 6560If duplicate definitions are given for any of the fields with a host 6561definition. 6562 6563@item @var{host}:@var{device} has more than one mount point 6564Occurs if the mount option for a host's filesystem specifies multiple 6565trees at which to place the mountpoint. 6566 6567@item @var{host}:@var{device} has no mount point 6568Occurs if the @samp{mount} option is not specified for a host's 6569filesystem. 6570 6571@item @var{host}:@var{device} needs field "@var{field-name}" 6572Occurs when a filesystem is missing a required field. @var{field-name} could 6573be one of @samp{fstype}, @samp{opts}, @samp{passno} or 6574@samp{mount}. 6575 6576@item @var{host}:mount field specified for swap partition 6577Occurs if a mountpoint is given for a filesystem whose type is declared 6578to be @samp{swap}. 6579 6580@item malformed IP dotted quad: @var{address} 6581If the Internet address of an interface is incorrectly specified. An 6582Internet address definition is handled to @b{inet_addr}(3N) to see if it 6583can cope. If not, then this message will be displayed. 6584 6585@item malformed netmask: @var{netmask} 6586If the netmask cannot be decoded as though it were a hexadecimal number, 6587then this message will be displayed. It will typically be caused by 6588incorrect characters in the @var{netmask} value. 6589 6590@item mount field "@var{field-name}" already set 6591Occurs when a static mount has multiple definitions of the same field. 6592 6593@item mount tree field "@var{field-name}" already set 6594Occurs when the @var{field-name} is defined more than once during the 6595definition of a filesystems mountpoint. 6596 6597@item netif field @var{field-name} already set 6598Occurs if you attempt to define an attribute of an interface more than 6599once. 6600 6601@item network booting requires both root and swap areas 6602Occurs if a machine has mount declarations for either the root partition 6603or the swap area, but not both. You cannot define a machine to only 6604partially boot via the network. 6605 6606@item no disk mounts on @var{hostname} 6607If there are no static mounts, nor local disk mounts specified for a 6608machine, this message will be displayed. 6609 6610@item no volname given for @var{host}:@var{device} 6611Occurs when a filesystem is defined to be mounted on @file{default}, but 6612no volume name is given for the file system, then the mountpoint cannot 6613be determined. 6614 6615@item not allowed '/' in a directory name 6616Occurs when a pathname with multiple directory elements is specified as 6617the name for an automounter tree. A tree should only have one name at 6618each level. 6619 6620@item pass number for @var{host}:@var{device} is non-zero 6621Occurs if @var{device} has its @samp{fstype} declared to be @samp{swap} 6622or @samp{export} and the @b{fsck}(8) pass number is set. Swap devices should not be 6623fsck'd. @xref{FSinfo filesystems fstype}. 6624 6625@item sub-directory @var{directory} of @var{directory-tree} starts with '/' 6626Within the filesystem specification for a host, if an element 6627@var{directory} of the mountpoint begins with a @samp{/} and it is not 6628the start of the tree. 6629 6630@item sub-directory of @var{directory-tree} is named "default" 6631@samp{default} is a keyword used to specify if a mountpoint should be 6632automatically calculated by @i{FSinfo}. If you attempt to specify a 6633directory name as this, it will use the filename of @file{default} but 6634will produce this warning. 6635 6636@item unknown \ sequence 6637Occurs if an unknown escape sequence is found inside a string. Within a 6638string, you can give the standard C escape sequences for strings, such 6639as newlines and tab characters. 6640 6641@item unknown directory attribute 6642If an unknown keyword is found while reading the definition of a host's 6643filesystem mount option. 6644 6645@item unknown filesystem attribute 6646Occurs if an unrecognized keyword is used when defining a host's 6647filesystems. 6648 6649@item unknown host attribute 6650Occurs if an unrecognized keyword is used when defining a host. 6651 6652@item unknown mount attribute 6653Occurs if an unrecognized keyword is found while parsing the list of 6654static mounts. 6655 6656@item unknown volname @var{volume} automounted @i{[} on @i{name} @i{]} 6657Occurs if @var{volume} is used in a definition of an automount map but the volume 6658name has not been declared during the host filesystem definitions. 6659 6660@item volname @var{volume} is unknown 6661Occurs if an attempt is made to mount or reference a volume name which 6662has not been declared during the host filesystem definitions. 6663 6664@item volname @var{volume} not exported from @var{machine} 6665Occurs if you attempt to mount the volume @var{volume} from a machine 6666which has not declared itself to have such a filesystem 6667available. 6668 6669@end table 6670 6671@c ################################################################ 6672@node Hlfsd, Assorted Tools, FSinfo, Top 6673@comment node-name, next, previous, up 6674@chapter Hlfsd 6675@pindex Hlfsd 6676@cindex Home-Link Filesystem 6677 6678@i{Hlfsd} is a daemon which implements a filesystem containing a 6679symbolic link to subdirectory within a user's home directory, depending 6680on the user which accessed that link. It was primarily designed to 6681redirect incoming mail to users' home directories, so that it can be read 6682from anywhere. It was designed and implemented by 6683@email{ezk@@cs.columbia.edu,Erez Zadok} and 6684@email{dupuy@@cs.columbia.edu,Alexander Dupuy}, at the 6685@uref{http://www.cs.columbia.edu/,Computer Science Department} of 6686@uref{http://www.columbia.edu/,Columbia University}. A 6687@uref{http://www.cs.columbia.edu/~ezk/research/hlfsd/hlfsd.html,paper} 6688on @i{Hlfsd} was presented at the Usenix LISA VII conference in 1993. 6689 6690@i{Hlfsd} operates by mounting itself as an NFS server for the directory 6691containing @i{linkname}, which defaults to @file{/hlfs/home}. Lookups 6692within that directory are handled by @i{Hlfsd}, which uses the 6693password map to determine how to resolve the lookup. The directory will 6694be created if it doesn't already exist. The symbolic link will be to 6695the accessing user's home directory, with @i{subdir} appended to it. If 6696not specified, @i{subdir} defaults to @file{.hlfsdir}. This directory 6697will also be created if it does not already exist. 6698 6699A @samp{SIGTERM} sent to @i{Hlfsd} will cause it to shutdown. A 6700@samp{SIGHUP} will flush the internal caches, and reload the password 6701map. It will also close and reopen the log file, to enable the original 6702log file to be removed or rotated. A @samp{SIGUSR1} will cause it to 6703dump its internal table of user IDs and home directories to the file 6704@file{/tmp/hlfsddump}. 6705 6706@menu 6707* Introduction to Hlfsd:: 6708* Background to Mail Delivery:: 6709* Using Hlfsd:: 6710@end menu 6711 6712@c ================================================================ 6713@node Introduction to Hlfsd, Background to Mail Delivery, Hlfsd, Hlfsd 6714@comment node-name, next, previous, up 6715@section Introduction to Hlfsd 6716@cindex Introduction to Hlfsd 6717@cindex Hlfsd; introduction 6718 6719Electronic mail has become one of the major applications for many 6720computer networks, and use of this service is expected to increase over 6721time, as networks proliferate and become faster. Providing a convenient 6722environment for users to read, compose, and send electronic mail has 6723become a requirement for systems administrators (SAs). 6724 6725Widely used methods for handling mail usually require users to be logged 6726into a designated ``home'' machine, where their mailbox files reside. 6727Only on that one machine can they read newly arrived mail. Since users 6728have to be logged into that system to read their mail, they often find 6729it convenient to run all of their other processes on that system as 6730well, including memory and CPU-intensive jobs. For example, in our 6731department, we have allocated and configured several multi-processor 6732servers to handle such demanding CPU/memory applications, but these were 6733underutilized, in large part due to the inconvenience of not being able 6734to read mail on those machines. (No home directories were located on 6735these designated CPU-servers, since we did not want NFS service for 6736users' home directories to have to compete with CPU-intensive jobs. At the 6737same time, we discouraged users from running demanding applications on 6738their home machines.) 6739 6740Many different solutions have been proposed to allow users to read their 6741mail on any host. However, all of these solutions fail in one or more 6742of several ways: 6743 6744@itemize @bullet 6745 6746@item 6747they introduce new single points of failure 6748 6749@item 6750they require using different mail transfer agents (MTAs) or user agents 6751(UAs) 6752 6753@item 6754they do not solve the problem for all cases, i.e. the solution is only 6755partially successful for a particular environment. 6756 6757@end itemize 6758 6759We have designed a simple filesystem, called the @dfn{Home-Link File 6760System}, to provide the ability to deliver mail to users' home 6761directories, without modification to mail-related applications. We have 6762endeavored to make it as stable as possible. Of great importance to us 6763was to make sure the HLFS daemon, @file{hlfsd} , would not hang under 6764any circumstances, and would take the next-best action when faced with 6765problems. Compared to alternative methods, @i{Hlfsd} is a stable, more 6766general solution, and easier to install/use. In fact, in some ways, we 6767have even managed to improve the reliability and security of mail 6768service. 6769 6770Our server implements a small filesystem containing a symbolic link 6771to a subdirectory of the invoking user's home directory, and named symbolic 6772links to users' mailbox files. 6773 6774The @i{Hlfsd} server finds out the @var{uid} of the process that is 6775accessing its mount point, and resolves the pathname component @samp{home} as a 6776symbolic link to a subdirectory within the home directory given by the 6777@var{uid}'s entry in the password file. If the @var{gid} of the process 6778that attempts to access a mailbox file is a special one (called 6779HLFS_GID), then the server maps the name of the @emph{next} pathname 6780component directly to the user's mailbox. This is necessary so that 6781access to a mailbox file by users other than the owner can succeed. The 6782server has safety features in case of failures such as hung filesystems 6783or home directory filesystems that are inaccessible or full. 6784 6785On most of our machines, mail gets delivered to the directory 6786@file{/var/spool/mail}. Many programs, including UAs, depend on that 6787path. @i{Hlfsd} creates a directory @file{/mail}, and mounts itself on 6788top of that directory. @i{Hlfsd} implements the path name component 6789called @samp{home}, pointing to a subdirectory of the user's home directory. 6790We have made @file{/var/spool/mail} a symbolic link to 6791@file{/mail/home}, so that accessing @file{/var/spool/mail} actually 6792causes access to a subdirectory within a user's home directory. 6793 6794The following table shows an example of how resolving the pathname 6795@file{/var/mail/@i{NAME}} to @file{/users/ezk/.mailspool/@i{NAME}} proceeds. 6796 6797@multitable {Resolving Component} {Pathname left to resolve} {Value if symbolic link} 6798 6799@item @b{Resolving Component} 6800@tab @b{Pathname left to resolve} 6801@tab @b{Value if symbolic link} 6802 6803@item @t{/} 6804@tab @t{var/mail/}@i{NAME} 6805 6806@item @t{var/} 6807@tab @t{mail/}@i{NAME} 6808 6809@item @t{mail}@@ 6810@tab @t{/mail/home/}@i{NAME} 6811@tab @t{mail}@@ -> @t{/mail/home} 6812 6813@item @t{/} 6814@tab @t{mail/home/}@i{NAME} 6815 6816@item @t{mail/} 6817@tab @t{home/}@i{NAME} 6818 6819@item @t{home}@@ 6820@tab @i{NAME} 6821@tab @t{home}@@ -> @t{/users/ezk/.mailspool} 6822 6823@item @t{/} 6824@tab @t{users/ezk/.mailspool/}@i{NAME} 6825 6826@item @t{users/} 6827@tab @t{ezk/.mailspool/}@i{NAME} 6828 6829@item @t{ezk/} 6830@tab @t{.mailspool/}@i{NAME} 6831 6832@item @t{.mailspool/} 6833@tab @i{NAME} 6834 6835@item @i{NAME} 6836 6837@end multitable 6838 6839@c ================================================================ 6840@node Background to Mail Delivery, Using Hlfsd, Introduction to Hlfsd, Hlfsd 6841@comment node-name, next, previous, up 6842@section Background to Mail Delivery 6843@cindex Background to Mail Delivery 6844@cindex Hlfsd; background 6845 6846This section provides an in-depth discussion of why available methods 6847for delivering mail to home directories are not as good as the one used 6848by @i{Hlfsd}. 6849 6850@menu 6851* Single-Host Mail Spool Directory:: 6852* Centralized Mail Spool Directory:: 6853* Distributed Mail Spool Service:: 6854* Why Deliver Into the Home Directory?:: 6855@end menu 6856 6857@c ---------------------------------------------------------------- 6858@node Single-Host Mail Spool Directory, Centralized Mail Spool Directory, Background to Mail Delivery, Background to Mail Delivery 6859@comment node-name, next, previous, up 6860@subsection Single-Host Mail Spool Directory 6861@cindex Single-Host Mail Spool Directory 6862 6863The most common method for mail delivery is for mail to be appended to a 6864mailbox file in a standard spool directory on the designated ``mail 6865home'' machine of the user. The greatest advantage of this method is 6866that it is the default method most vendors provide with their systems, 6867thus very little (if any) configuration is required on the SA's part. 6868All they need to set up are mail aliases directing mail to the host on 6869which the user's mailbox file is assigned. (Otherwise, mail is 6870delivered locally, and users find mailboxes on many machines.) 6871 6872As users become more sophisticated, and aided by windowing systems, they 6873find themselves logging in on multiple hosts at once, performing several 6874tasks concurrently. They ask to be able to read their mail on any host 6875on the network, not just the one designated as their ``mail home''. 6876 6877@c ---------------------------------------------------------------- 6878@node Centralized Mail Spool Directory, Distributed Mail Spool Service, Single-Host Mail Spool Directory, Background to Mail Delivery 6879@comment node-name, next, previous, up 6880@subsection Centralized Mail Spool Directory 6881@cindex Centralized Mail Spool Directory 6882 6883A popular method for providing mail readability from any host is to have 6884all mail delivered to a mail spool directory on a designated 6885``mail-server'' which is exported via NFS to all of the hosts on the 6886network. Configuring such a system is relatively easy. On most 6887systems, the bulk of the work is a one-time addition to one or two 6888configuration files in @file{/etc}. The file-server's spool directory 6889is then hard-mounted across every machine on the local network. In 6890small environments with only a handful of hosts this can be an 6891acceptable solution. In our department, with a couple of hundred active 6892hosts and thousands of mail messages processed daily, this was deemed 6893completely unacceptable, as it introduced several types of problems: 6894 6895@table @b 6896 6897@item Scalability and Performance 6898 6899As more and more machines get added to the network, more mail traffic 6900has to go over NFS to and from the mail-server. Users like to run 6901mail-watchers, and read their mail often. The stress on the shared 6902infrastructure increases with every user and host added; loads on the 6903mail server would most certainly be high since all mail delivery goes 6904through that one machine.@footnote{ Delivery via NFS-mounted filesystems 6905may require usage of @samp{rpc.lockd} and @samp{rpc.statd} to provide 6906distributed file-locking, both of which are widely regarded as unstable 6907and unreliable. Furthermore, this will degrade performance, as local 6908processes as well as remote @samp{nfsd} processes are kept busy.} This 6909leads to lower reliability and performance. To reduce the number of 6910concurrent connections between clients and the server host, some SAs 6911have resorted to automounting the mail-spool directory. But this 6912solution only makes things worse: since users often run mail watchers, 6913and many popular applications such as @samp{trn}, @samp{emacs}, 6914@samp{csh} or @samp{ksh} check periodically for new mail, the 6915automounted directory would be effectively permanently mounted. If it 6916gets unmounted automatically by the automounter program, it is most 6917likely to get mounted shortly afterwards, consuming more I/O resources 6918by the constant cycle of mount and umount calls. 6919 6920@item Reliability 6921 6922The mail-server host and its network connectivity must be very reliable. 6923Worse, since the spool directory has to be hard-mounted,@footnote{No SA 6924in their right minds would soft-mount read/write partitions --- the 6925chances for data loss are too great.} many processes which access the 6926spool directory (various shells, @samp{login}, @samp{emacs}, etc.) 6927would be hung as long as connectivity to the mail-server is severed. To 6928improve reliability, SAs may choose to backup the mail-server's spool 6929partition several times a day. This may make things worse since reading 6930or delivering mail while backups are in progress may cause backups to be 6931inconsistent; more backups consume more backup-media resources, and 6932increase the load on the mail-server host. 6933 6934@end table 6935 6936@c ---------------------------------------------------------------- 6937@node Distributed Mail Spool Service, Why Deliver Into the Home Directory?, Centralized Mail Spool Directory, Background to Mail Delivery 6938@comment node-name, next, previous, up 6939@subsection Distributed Mail Spool Service 6940@cindex Distributed Mail Spool Service 6941 6942Despite the existence of a few systems that support delivery to users' 6943home directories, mail delivery to home directories hasn't caught on. 6944We believe the main reason is that there are too many programs that 6945``know'' where mailbox files reside. Besides the obvious (the delivery 6946program @file{/bin/mail} and mail readers like @file{/usr/ucb/Mail}, 6947@samp{mush}, @samp{mm}, etc.), other programs that know mailbox location 6948are login, from, almost every shell, @samp{xbiff}, @samp{xmailbox}, and 6949even some programs not directly related to mail, such as @samp{emacs} 6950and @samp{trn}. Although some of these programs can be configured to 6951look in different directories with the use of environment variables and 6952other resources, many of them cannot. The overall porting work is 6953significant. 6954 6955Other methods that have yet to catch on require the use of a special 6956mail-reading server, such as IMAP or POP. The main disadvantage of 6957these systems is that UAs need to be modified to use these services --- 6958a long and involved task. That is why they are not popular at this 6959time. 6960 6961Several other ideas have been proposed and even used in various 6962environments. None of them is robust. They are mostly very 6963specialized, inflexible, and do not extend to the general case. Some of 6964the ideas are plain bad, potentially leading to lost or corrupt mail: 6965 6966@table @b 6967 6968@item automounters 6969 6970Using an automounter such as @i{Amd} to provide a set of symbolic links 6971from the normal spool directory to user home directories is not 6972sufficient. UAs rename, unlink, and recreate the mailbox as a regular 6973file, therefore it must be a real file, not a symbolic link. 6974Furthermore, it must reside in a real directory which is writable by the 6975UAs and MTAs. This method may also require populating 6976@file{/var/spool/mail} with symbolic links and making sure they are 6977updated. Making @i{Amd} manage that directory directly fails, since 6978many various lock files need to be managed as well. Also, @i{Amd} does 6979not provide all of the NFS operations which are required to write mail 6980such as write, create, remove, and unlink. 6981 6982@item @code{$MAIL} 6983 6984Setting this variable to an automounted directory pointing to the user's 6985mail spool host only solves the problem for those programs which know 6986and use @code{$MAIL}. Many programs don't, therefore this solution is partial 6987and of limited flexibility. Also, it requires the SAs or the users to 6988set it themselves --- an added level of inconvenience and possible 6989failures. 6990 6991@item @t{/bin/mail} 6992 6993Using a different mail delivery agent could be the solution. One such 6994example is @samp{hdmail}. However, @samp{hdmail} still requires 6995modifying all UAs, the MTA's configuration, installing new daemons, and 6996changing login scripts. This makes the system less upgradable or 6997compatible with others, and adds one more complicated system for SAs to 6998deal with. It is not a complete solution because it still requires each 6999user have their @code{$MAIL} variable setup correctly, and that every program 7000use this variable. 7001 7002@end table 7003 7004@c ---------------------------------------------------------------- 7005@node Why Deliver Into the Home Directory?, , Distributed Mail Spool Service, Background to Mail Delivery 7006@comment node-name, next, previous, up 7007@subsection Why Deliver Into the Home Directory? 7008@cindex Why Deliver Into the Home Directory? 7009@cindex Hlfsd; Why Deliver Into the Home Directory? 7010 7011There are several major reasons why SAs might want to deliver mail 7012directly into the users' home directories: 7013 7014@table @b 7015 7016@item Location 7017 7018Many mail readers need to move mail from the spool directory to the 7019user's home directory. It speeds up this operation if the two are on 7020the same filesystem. If for some reason the user's home directory is 7021inaccessible, it isn't that useful to be able to read mail, since there 7022is no place to move it to. In some cases, trying to move mail to a 7023non-existent or hung filesystem may result in mail loss. 7024 7025@item Distribution 7026 7027Having all mail spool directories spread among the many more filesystems 7028minimizes the chances that complete environments will grind to a halt 7029when a single server is down. It does increase the chance that there 7030will be someone who is not able to read their mail when a machine is 7031down, but that is usually preferred to having no one be able to read 7032their mail because a centralized mail server is down. The problem of 7033losing some mail due to the (presumably) higher chances that a user's 7034machine is down is minimized in HLFS. 7035 7036@item Security 7037 7038Delivering mail to users' home directories has another advantage --- 7039enhanced security and privacy. Since a shared system mail spool 7040directory has to be world-readable and searchable, any user can see 7041whether other users have mail, when they last received new mail, or when 7042they last read their mail. Programs such as @samp{finger} display this 7043information, which some consider an infringement of privacy. While it 7044is possible to disable this feature of @samp{finger} so that remote 7045users cannot see a mailbox file's status, this doesn't prevent local 7046users from getting the information. Furthermore, there are more 7047programs which make use of this information. In shared environments, 7048disabling such programs has to be done on a system-wide basis, but with 7049mail delivered to users' home directories, users less concerned with 7050privacy who do want to let others know when they last received or read 7051mail can easily do so using file protection bits. 7052 7053@c Lastly, on systems that do not export their NFS filesystem with 7054@c @t{anon=0}, superusers are less likely to snoop around others' mail, as 7055@c they become ``nobodies'' across NFS. 7056 7057@end table 7058 7059In summary, delivering mail to home directories provides users the 7060functionality sought, and also avoids most of the problems just 7061discussed. 7062 7063@c ================================================================ 7064@node Using Hlfsd, , Background to Mail Delivery, Hlfsd 7065@comment node-name, next, previous, up 7066@section Using Hlfsd 7067@cindex Using Hlfsd 7068@cindex Hlfsd; using 7069 7070@menu 7071* Controlling Hlfsd:: 7072* Hlfsd Options:: 7073* Hlfsd Files:: 7074@end menu 7075 7076@c ---------------------------------------------------------------- 7077@node Controlling Hlfsd, Hlfsd Options, Using Hlfsd, Using Hlfsd 7078@comment node-name, next, previous, up 7079@subsection Controlling Hlfsd 7080@cindex Controlling Hlfsd 7081@cindex Hlfsd; controlling 7082@pindex ctl-hlfsd 7083 7084Much the same way @i{Amd} is controlled by @file{ctl-amd}, so does 7085@i{Hlfsd} get controlled by the @file{ctl-hlfsd} script: 7086 7087@table @t 7088 7089@item ctl-hlfsd start 7090Start a new @i{Hlfsd}. 7091 7092@item ctl-hlfsd stop 7093Stop a running @i{Hlfsd}. 7094 7095@item ctl-hlfsd restart 7096Stop a running @i{Hlfsd}, wait for 10 seconds, and then start a new 7097one. It is hoped that within 10 seconds, the previously running 7098@i{Hlfsd} terminate properly; otherwise, starting a second one could 7099cause system lockup. 7100 7101@end table 7102 7103For example, on our systems, we start @i{Hlfsd} within @file{ctl-hlfsd} 7104as follows on Solaris 2 systems: 7105 7106@example 7107hlfsd -a /var/alt_mail -x all -l /var/log/hlfsd /mail/home .mailspool 7108@end example 7109 7110The directory @file{/var/alt_mail} is a directory in the root partition 7111where alternate mail will be delivered into, when it cannot be delivered 7112into the user's home directory. 7113 7114Normal mail gets delivered into @file{/var/mail}, but on our systems, 7115that is a symbolic link to @file{/mail/home}. @file{/mail} is managed 7116by @i{Hlfsd}, which creates a dynamic symlink named @samp{home}, 7117pointing to the subdirectory @file{.mailspool} @emph{within} the 7118accessing user's home directory. This results in mail which normally 7119should go to @file{/var/mail/@code{$USER}}, to go to 7120@file{@code{$HOME}/.mailspool/@code{$USER}}. 7121 7122@i{Hlfsd} does not create the @file{/var/mail} symlink. This needs to 7123be created (manually) once on each host, by the system administrators, 7124as follows: 7125 7126@example 7127mv /var/mail /var/alt_mail 7128ln -s /mail/home /var/mail 7129@end example 7130 7131@c ---------------------------------------------------------------- 7132@node Hlfsd Options, Hlfsd Files, Controlling Hlfsd, Using Hlfsd 7133@comment node-name, next, previous, up 7134@subsection Hlfsd Options 7135@cindex Hlfsd Options 7136@cindex Hlfsd; Options 7137 7138@table @t 7139 7140@item -a @var{alt_dir} 7141Alternate directory. The name of the directory to which the symbolic 7142link returned by @i{Hlfsd} will point, if it cannot access the home 7143directory of the user. This defaults to @file{/var/hlfs}. This 7144directory will be created if it doesn't exist. It is expected that 7145either users will read these files, or the system administrators will 7146run a script to resend this ``lost mail'' to its owner. 7147 7148@item -c @var{cache-interval} 7149Caching interval. @i{Hlfsd} will cache the validity of home directories 7150for this interval, in seconds. Entries which have been verified within 7151the last @var{cache-interval} seconds will not be verified again, since 7152the operation could be expensive, and the entries are most likely still 7153valid. After the interval has expired, @i{Hlfsd} will re-verify the 7154validity of the user's home directory, and reset the cache time-counter. 7155The default value for @var{cache-interval} is 300 seconds (5 minutes). 7156 7157@item -f 7158Force fast startup. This option tells @i{Hlfsd} to skip startup-time 7159consistency checks such as existence of mount directory, alternate spool 7160directory, symlink to be hidden under the mount directory, their 7161permissions and validity. 7162 7163@item -g @var{group} 7164Set the special group HLFS_GID to @var{group}. Programs such as 7165@file{/usr/ucb/from} or @file{/usr/sbin/in.comsat}, which access the 7166mailboxes of other users, must be setgid @samp{HLFS_GID} to work properly. The 7167default group is @samp{hlfs}. If no group is provided, and there is no 7168group @samp{hlfs}, this feature is disabled. 7169 7170@item -h 7171Help. Print a brief help message, and exit. 7172 7173@item -i @var{reload-interval} 7174Map-reloading interval. Each @var{reload-interval} seconds, @i{Hlfsd} 7175will reload the password map. @i{Hlfsd} needs the password map for the 7176UIDs and home directory pathnames. @i{Hlfsd} schedules a @samp{SIGALRM} to 7177reload the password maps. A @samp{SIGHUP} sent to @i{Hlfsd} will force it to 7178reload the maps immediately. The default value for 7179@var{reload-interval} is 900 seconds (15 minutes.) 7180 7181@item -l @var{logfile} 7182Specify a log file to which @i{Hlfsd} will record events. If 7183@var{logfile} is the string @samp{syslog} then the log messages will be 7184sent to the system log daemon by @b{syslog}(3), using the @samp{LOG_DAEMON} 7185facility. This is also the default. 7186 7187@item -n 7188No verify. @i{Hlfsd} will not verify the validity of the symbolic link 7189it will be returning, or that the user's home directory contains 7190sufficient disk-space for spooling. This can speed up @i{Hlfsd} at the 7191cost of possibly returning symbolic links to home directories which are 7192not currently accessible or are full. By default, @i{Hlfsd} validates 7193the symbolic-link in the background. The @code{-n} option overrides the 7194meaning of the @code{-c} option, since no caching is necessary. 7195 7196@item -o @var{mount-options} 7197Mount options which @i{Hlfsd} will use to mount itself on top of 7198@var{dirname}. By default, @var{mount-options} is set to @samp{ro}. If 7199the system supports symbolic-link caching, default options are set 7200to @samp{ro,nocache}. 7201 7202@item -p 7203Print PID. Outputs the process-id of @i{Hlfsd} to standard output where 7204it can be saved into a file. 7205 7206@item -v 7207Version. Displays version information to standard error. 7208 7209@item -x @var{log-options} 7210Specify run-time logging options. The options are a comma separated 7211list chosen from: @samp{fatal}, @samp{error}, @samp{user}, @samp{warn}, @samp{info}, @samp{map}, @samp{stats}, @samp{all}. 7212 7213@item -C 7214Force @i{Hlfsd} to run on systems that cannot turn off the NFS 7215attribute-cache. Use of this option on those systems is discouraged, as 7216it may result in loss or misdelivery of mail. The option is ignored on 7217systems that can turn off the attribute-cache. 7218 7219@item -D @var{log-options} 7220Select from a variety of debugging options. Prefixing an option with 7221the string @samp{no} reverses the effect of that option. Options are 7222cumulative. The most useful option is @samp{all}. Since this option is 7223only used for debugging other options are not documented here. A fuller 7224description is available in the program source. A @samp{SIGUSR1} sent 7225to @i{Hlfsd} will cause it to dump its internal password map to the file 7226@file{/usr/tmp/hlfsd.dump.XXXXXX}, where @samp{XXXXXX} will be replaced 7227by a random string generated by @b{mktemp}(3) or (the more secure) 7228@b{mkstemp}(3). 7229 7230@item -P @var{password-file} 7231Read the user-name, user-id, and home directory information from the 7232file @var{password-file}. Normally, @i{Hlfsd} will use @b{getpwent}(3) 7233to read the password database. This option allows you to override the 7234default database, and is useful if you want to map users' mail files to 7235a directory other than their home directory. Only the username, uid, 7236and home-directory fields of the file @var{password-file} are read and 7237checked. All other fields are ignored. The file @var{password-file} 7238must otherwise be compliant with Unix Version 7 colon-delimited format 7239@b{passwd}(4). 7240 7241@end table 7242 7243@c ---------------------------------------------------------------- 7244@node Hlfsd Files, , Hlfsd Options, Using Hlfsd 7245@comment node-name, next, previous, up 7246@subsection Hlfsd Files 7247@cindex Hlfsd Files 7248@cindex Hlfsd; Files 7249 7250The following files are used by @i{Hlfsd}: 7251 7252@table @file 7253 7254@item /hlfs 7255directory under which @i{Hlfsd} mounts itself and manages the symbolic 7256link @file{home}. 7257 7258@item .hlfsdir 7259default sub-directory in the user's home directory, to which the 7260@file{home} symbolic link returned by @i{Hlfsd} points. 7261 7262@item /var/hlfs 7263directory to which @file{home} symbolic link returned by @i{Hlfsd} 7264points if it is unable to verify the that user's home directory is 7265accessible. 7266 7267@end table 7268 7269For discussion on other files used by @i{Hlfsd}, see @xref{lostaltmail}, and 7270@ref{lostaltmail.conf-sample}. 7271 7272@c ################################################################ 7273@node Assorted Tools, Examples, Hlfsd, Top 7274@comment node-name, next, previous, up 7275@chapter Assorted Tools 7276@cindex Assorted Tools 7277 7278The following are additional utilities and scripts included with 7279am-utils, and get installed. 7280 7281@menu 7282* am-eject:: 7283* amd.conf-sample:: 7284* amd2ldif:: 7285* amd2sun:: 7286* automount2amd:: 7287* ctl-amd:: 7288* ctl-hlfsd:: 7289* expn:: 7290* fix-amd-map:: 7291* fixmount:: 7292* fixrmtab:: 7293* lostaltmail:: 7294* lostaltmail.conf-sample:: 7295* mk-amd-map:: 7296* pawd:: 7297* redhat-ctl-amd:: 7298* wait4amd:: 7299* wait4amd2die:: 7300* wire-test:: 7301@end menu 7302 7303@c ---------------------------------------------------------------- 7304@node am-eject, amd.conf-sample, Assorted Tools, Assorted Tools 7305@comment node-name, next, previous, up 7306@section am-eject 7307@pindex am-eject 7308 7309A shell script unmounts a floppy or CD-ROM that is automounted, and 7310then attempts to eject the removable device. 7311 7312@c ---------------------------------------------------------------- 7313@node amd.conf-sample, amd2ldif, am-eject, Assorted Tools 7314@comment node-name, next, previous, up 7315@section amd.conf-sample 7316@pindex amd.conf-sample 7317 7318A sample @i{Amd} configuration file. @xref{Amd Configuration File}. 7319 7320@c ---------------------------------------------------------------- 7321@node amd2ldif, amd2sun, amd.conf-sample, Assorted Tools 7322@comment node-name, next, previous, up 7323@section amd2ldif 7324@pindex amd2ldif 7325 7326A script to convert @i{Amd} maps to LDAP input files. Use it as follows: 7327 7328@example 7329amd2ldif @i{mapname} @i{base} < @i{amd.mapfile} > @i{mapfile.ldif} 7330@end example 7331 7332@c ---------------------------------------------------------------- 7333@node amd2sun, automount2amd, amd2ldif, Assorted Tools 7334@comment node-name, next, previous, up 7335@section amd2sun 7336@pindex amd2sun 7337 7338A script to convert @i{Amd} maps to Sun Automounter maps. Use it as 7339follows 7340 7341@example 7342amd2sun < @i{amd.mapfile} > @i{auto_mapfile} 7343@end example 7344 7345@c ---------------------------------------------------------------- 7346@node automount2amd, ctl-amd, amd2sun, Assorted Tools 7347@comment node-name, next, previous, up 7348@section automount2amd 7349@pindex automount2amd 7350 7351A script to convert old Sun Automounter maps to @i{Amd} maps. 7352 7353Say you have the Sun automount file @i{auto.foo}, with these two lines: 7354@example 7355home earth:/home 7356moon -ro,intr server:/proj/images 7357@end example 7358Running 7359@example 7360automount2amd auto.foo > amd.foo 7361@end example 7362 7363will produce the @i{Amd} map @i{amd.foo} with this content: 7364 7365@example 7366# generated by automount2amd on Sat Aug 14 17:59:32 US/Eastern 1999 7367 7368/defaults \\ 7369 type:=nfs;opts:=rw,grpid,nosuid,utimeout=600 7370 7371home \ 7372 host==earth;type:=link;fs:=/home \\ 7373 rhost:=earth;rfs:=/home 7374 7375moon \ 7376 -addopts:=ro,intr \\ 7377 host==server;type:=link;fs:=/proj/images \\ 7378 rhost:=server;rfs:=/proj/images 7379@end example 7380 7381This perl script will use the following @i{/default} entry 7382@example 7383type:=nfs;opts:=rw,grpid,nosuid,utimeout=600 7384@end example 7385If you wish to override that, define the @b{$DEFAULTS} environment 7386variable, or modify the script. 7387 7388If you wish to generate Amd maps using the @i{hostd} (@pxref{hostd 7389Selector Variable}) @i{Amd} map syntax, then define the environment 7390variable @b{$DOMAIN} or modify the script. 7391 7392Note that automount2amd does not understand the syntax in newer Sun 7393Automount maps, those used with autofs. 7394 7395@c ---------------------------------------------------------------- 7396@node ctl-amd, ctl-hlfsd, automount2amd, Assorted Tools 7397@comment node-name, next, previous, up 7398@section ctl-amd 7399@pindex ctl-amd 7400 7401A script to start, stop, or restart @i{Amd}. Use it as follows: 7402 7403@table @t 7404@item ctl-amd start 7405Start a new @i{Amd} process. 7406@item ctl-amd stop 7407Stop the running @i{Amd}. 7408@item ctl-amd restart 7409Stop the running @i{Amd} (if any), safely wait for it to terminate, and 7410then start a new process --- only if the previous one died cleanly. 7411@end table 7412 7413@xref{Run-time Administration}, for more details. 7414 7415@c ---------------------------------------------------------------- 7416@node ctl-hlfsd, expn, ctl-amd, Assorted Tools 7417@comment node-name, next, previous, up 7418@section ctl-hlfsd 7419@pindex ctl-hlfsd 7420 7421A script for controlling @i{Hlfsd}, much the same way @file{ctl-amd} 7422controls @i{Amd}. Use it as follows: 7423 7424@table @t 7425@item ctl-hlfsd start 7426Start a new @i{Hlfsd} process. 7427@item ctl-hlfsd stop 7428Stop the running @i{Hlfsd}. 7429@item ctl-hlfsd restart 7430Stop the running @i{Hlfsd} (if any), wait for 10 seconds for it to 7431terminate, and then start a new process --- only if the previous one 7432died cleanly. 7433@end table 7434 7435@xref{Hlfsd}, for more details. 7436 7437@c ---------------------------------------------------------------- 7438@node expn, fix-amd-map, ctl-hlfsd, Assorted Tools 7439@comment node-name, next, previous, up 7440@section expn 7441@pindex expn 7442 7443A script to expand email addresses into their full name. It is 7444generally useful when using with the @file{lostaltmail} script, but is a 7445useful tools otherwise. 7446 7447@example 7448$ expn -v ezk@@cs.columbia.edu 7449ezk@@cs.columbia.edu -> 7450 ezk@@shekel.mcl.cs.columbia.edu 7451ezk@@shekel.mcl.cs.columbia.edu -> 7452 Erez Zadok <"| /usr/local/mh/lib/slocal -user ezk || exit 75> 7453 Erez Zadok <\ezk> 7454 Erez Zadok </u/zing/ezk/.mailspool/backup> 7455@end example 7456 7457@c ---------------------------------------------------------------- 7458@node fix-amd-map, fixmount, expn, Assorted Tools 7459@comment node-name, next, previous, up 7460@section fix-amd-map 7461@pindex fix-amd-map 7462 7463Am-utils changed some of the syntax and default values of some 7464variables. For example, the default value for @samp{$@{os@}} for 7465Solaris 2.x (aka SunOS 5.x) systems used to be @samp{sos5}, it is now 7466more automatically generated from @file{config.guess} and its value is 7467@samp{sunos5}. 7468 7469This script converts older @i{Amd} maps to new ones. Use it as follows: 7470 7471@example 7472fix-amd-map < @i{old.map} > @i{new.map} 7473@end example 7474 7475@c ---------------------------------------------------------------- 7476@node fixmount, fixrmtab, fix-amd-map, Assorted Tools 7477@comment node-name, next, previous, up 7478@section fixmount 7479@pindex fixmount 7480 7481@samp{fixmount} is a variant of @b{showmount}(8) that can delete bogus 7482mount entries in remote @b{mountd}(8) daemons. This is useful to 7483cleanup otherwise ever-accumulating ``junk''. Use it for example: 7484 7485@example 7486fixmount -r @i{host} 7487@end example 7488 7489See the online manual page for @samp{fixmount} for more details of its 7490usage. 7491 7492@c ---------------------------------------------------------------- 7493@node fixrmtab, lostaltmail, fixmount, Assorted Tools 7494@comment node-name, next, previous, up 7495@section fixrmtab 7496@pindex fixrmtab 7497 7498A script to invalidate @file{/etc/rmtab} entries for hosts named. Also 7499restart mountd for changes to take effect. Use it for example: 7500 7501@example 7502fixrmtab @i{host1} @i{host2} @i{...} 7503@end example 7504 7505@c ---------------------------------------------------------------- 7506@node lostaltmail, lostaltmail.conf-sample, fixrmtab, Assorted Tools 7507@comment node-name, next, previous, up 7508@section lostaltmail 7509@pindex lostaltmail 7510 7511A script used with @i{Hlfsd} to resend any ``lost'' mail. @i{Hlfsd} 7512redirects mail which cannot be written into the user's home directory to 7513an alternate directory. This is useful to continue delivering mail, 7514even if the user's file system was unavailable, full, or over quota. 7515But, the mail which gets delivered to the alternate directory needs to 7516be resent to its respective users. This is what the @samp{lostaltmail} 7517script does. 7518 7519Use it as follows: 7520 7521@example 7522lostaltmail 7523@end example 7524 7525This script needs a configuration file @samp{lostaltmail.conf} set up 7526with the right parameters to properly work. @xref{Hlfsd}, for more 7527details. 7528 7529@c ---------------------------------------------------------------- 7530@node lostaltmail.conf-sample, mk-amd-map, lostaltmail, Assorted Tools 7531@comment node-name, next, previous, up 7532@section lostaltmail.conf-sample 7533@pindex lostaltmail.conf-sample 7534@cindex lostaltmail; configuration file 7535 7536This is a text file with configuration parameters needed for the 7537@samp{lostaltmail} script. The script includes comments explaining each 7538of the configuration variables. See it for more information. Also 7539@pxref{Hlfsd} for general information. 7540 7541@c ---------------------------------------------------------------- 7542@node mk-amd-map, pawd, lostaltmail.conf-sample, Assorted Tools 7543@comment node-name, next, previous, up 7544@section mk-amd-map 7545@pindex mk-amd-map 7546 7547This program converts a normal @i{Amd} map file into an ndbm database 7548with the same prefix as the named file. Use it as follows: 7549 7550@example 7551mk-amd-map @i{mapname} 7552@end example 7553 7554@c ---------------------------------------------------------------- 7555@node pawd, redhat-ctl-amd, mk-amd-map, Assorted Tools 7556@comment node-name, next, previous, up 7557@section pawd 7558@pindex pawd 7559 7560@i{Pawd} is used to print the current working directory, adjusted to 7561reflect proper paths that can be reused to go through the automounter 7562for the shortest possible path. In particular, the path printed back 7563does not include any of @i{Amd}'s local mount points. Using them is 7564unsafe, because @i{Amd} may unmount managed file systems from the mount 7565points, and thus including them in paths may not always find the files 7566within. 7567 7568Without any arguments, @i{Pawd} will print the automounter adjusted 7569current working directory. With any number of arguments, it will print 7570the adjusted path of each one of the arguments. 7571 7572@c ---------------------------------------------------------------- 7573@node redhat-ctl-amd, wait4amd, pawd, Assorted Tools 7574@comment node-name, next, previous, up 7575@section redhat-ctl-amd 7576@pindex redhat-ctl-amd 7577 7578This script is similar to @i{ctl-amd} (@pxref{ctl-amd}) but is intended 7579for Red Hat Linux systems. You can safely copy @i{redhat-ctl-amd} onto 7580@file{/etc/rc.d/init.d/amd}. The script supplied by @i{Am-utils} is 7581usually better than the one provided by Red Hat, because the Red Hat 7582script does not correctly kill @i{Amd} processes: it is too quick to 7583kill the wrong processes, leaving stale or hung mount points behind. 7584 7585@c ---------------------------------------------------------------- 7586@node wait4amd, wait4amd2die, redhat-ctl-amd, Assorted Tools 7587@comment node-name, next, previous, up 7588@section wait4amd 7589@pindex wait4amd 7590 7591A script to wait for @i{Amd} to start on a particular host before 7592performing an arbitrary command. The command is executed repeatedly, 7593with 1 second intervals in between. You may interrupt the script using 7594@samp{^C} (or whatever keyboard sequence your terminal's @samp{intr} function 7595is bound to). 7596 7597Examples: 7598 7599@table @t 7600@item wait4amd saturn amq -p -h saturn 7601When @i{Amd} is up on host @samp{saturn}, get the process ID of that 7602running @i{Amd}. 7603@item wait4amd pluto rlogin pluto 7604Remote login to host @samp{pluto} when @i{Amd} is up on that host. It 7605is generally necessary to wait for @i{Amd} to properly start and 7606initialize on a remote host before logging in to it, because otherwise 7607user home directories may not be accessible across the network. 7608@item wait4amd pluto 7609A short-hand version of the previous command, since the most useful 7610reason for this script is to login to a remote host. I use it very 7611often when testing out new versions of @i{Amd}, and need to reboot hung 7612hosts. 7613@end table 7614 7615@c ---------------------------------------------------------------- 7616@node wait4amd2die, wire-test, wait4amd, Assorted Tools 7617@comment node-name, next, previous, up 7618@section wait4amd2die 7619@pindex wait4amd2die 7620 7621This script is used internally by @samp{ctl-amd} when used to restart 7622@i{Amd}. It waits for @i{Amd} to terminate. If it detected that 7623@i{Amd} terminated cleanly, this script will return an exist status of 7624zero. Otherwise, it will return a non-zero exit status. 7625 7626The script tests for @i{Amd}'s existence once every 5 seconds, six 7627times, for a total of 30 seconds. It will return a zero exist status as 7628soon as it detects that @i{Amd} dies. 7629 7630@c ---------------------------------------------------------------- 7631@node wire-test, , wait4amd2die, Assorted Tools 7632@comment node-name, next, previous, up 7633@section wire-test 7634@pindex wire-test 7635 7636A simple program to test if some of the most basic networking functions 7637in am-util's library @file{libamu} work. It also tests the combination 7638of NFS protocol and version number that are supported from the current 7639host, to a remote one. 7640 7641For example, in this test a machine which only supports NFS Version 2 is 7642contacting a remote host that can support the same version, but using 7643both UDP and TCP. If no host name is specified, @samp{wire-test} will 7644try @file{localhost}. 7645 7646@example 7647$ wire-test moisil 7648Network name is "mcl-lab-net.cs.columbia.edu" 7649Network number is "128.59.13" 7650Network name is "old-net.cs.columbia.edu" 7651Network number is "128.59.16" 7652My IP address is 0x7f000001. 7653NFS Version and protocol tests to host "moisil"... 7654 testing vers=2, proto="udp" -> found version 2. 7655 testing vers=3, proto="udp" -> failed! 7656 testing vers=2, proto="tcp" -> found version 2. 7657 testing vers=3, proto="tcp" -> failed! 7658@end example 7659 7660@c ################################################################ 7661@node Examples, Internals, Assorted Tools, Top 7662@comment node-name, next, previous, up 7663@chapter Examples 7664 7665@menu 7666* User Filesystems:: 7667* Home Directories:: 7668* Architecture Sharing:: 7669* Wildcard Names:: 7670* rwho servers:: 7671* /vol:: 7672* /defaults with selectors:: 7673* /tftpboot in a chroot-ed environment:: 7674 7675@end menu 7676 7677@node User Filesystems, Home Directories, Examples, Examples 7678@comment node-name, next, previous, up 7679@section User Filesystems 7680@cindex User filesystems 7681@cindex Mounting user filesystems 7682 7683With more than one fileserver, the directories most frequently 7684cross-mounted are those containing user home directories. A common 7685convention used at Imperial College is to mount the user disks under 7686@t{/home/}@i{machine}. 7687 7688Typically, the @samp{/etc/fstab} file contained a long list of entries 7689such as: 7690 7691@example 7692@i{machine}:/home/@i{machine} /home/@i{machine} nfs ... 7693@end example 7694 7695for each fileserver on the network. 7696 7697There are numerous problems with this system. The mount list can become 7698quite large and some of the machines may be down when a system is 7699booted. When a new fileserver is installed, @samp{/etc/fstab} must be 7700updated on every machine, the mount directory created and the filesystem 7701mounted. 7702 7703In many environments most people use the same few workstations, but 7704it is convenient to go to a colleague's machine and access your own 7705files. When a server goes down, it can cause a process on a client 7706machine to hang. By minimizing the mounted filesystems to only include 7707those actively being used, there is less chance that a filesystem will 7708be mounted when a server goes down. 7709 7710The following is a short extract from a map taken from a research fileserver 7711at Imperial College. 7712 7713Note the entry for @samp{localhost} which is used for users such as 7714the operator (@samp{opr}) who have a home directory on most machine as 7715@samp{/home/localhost/opr}. 7716 7717@example 7718/defaults opts:=rw,intr,grpid,nosuid 7719charm host!=$@{key@};type:=nfs;rhost:=$@{key@};rfs:=/home/$@{key@} \ 7720 host==$@{key@};type:=ufs;dev:=/dev/xd0g 7721# 7722... 7723 7724# 7725localhost type:=link;fs:=$@{host@} 7726... 7727# 7728# dylan has two user disks so have a 7729# top directory in which to mount them. 7730# 7731dylan type:=auto;fs:=$@{map@};pref:=$@{key@}/ 7732# 7733dylan/dk2 host!=dylan;type:=nfs;rhost:=dylan;rfs:=/home/$@{key@} \ 7734 host==dylan;type:=ufs;dev:=/dev/dsk/2s0 7735# 7736dylan/dk5 host!=dylan;type:=nfs;rhost:=dylan;rfs:=/home/$@{key@} \ 7737 host==dylan;type:=ufs;dev:=/dev/dsk/5s0 7738... 7739# 7740toytown host!=$@{key@};type:=nfs;rhost:=$@{key@};rfs:=/home/$@{key@} \ 7741 host==$@{key@};type:=ufs;dev:=/dev/xy1g 7742... 7743# 7744zebedee host!=$@{key@};type:=nfs;rhost:=$@{key@};rfs:=/home/$@{key@} \ 7745 host==$@{key@};type:=ufs;dev:=/dev/dsk/1s0 7746# 7747# Just for access... 7748# 7749gould type:=auto;fs:=$@{map@};pref:=$@{key@}/ 7750gould/staff host!=gould;type:=nfs;rhost:=gould;rfs:=/home/$@{key@} 7751# 7752gummo host!=$@{key@};type:=nfs;rhost:=$@{key@};rfs:=/home/$@{key@} 7753... 7754@end example 7755 7756This map is shared by most of the machines listed so on those 7757systems any of the user disks is accessible via a consistent name. 7758@i{Amd} is started with the following command 7759 7760@example 7761amd /home amd.home 7762@end example 7763 7764Note that when mounting a remote filesystem, the @dfn{automounted} 7765mount point is referenced, so that the filesystem will be mounted if 7766it is not yet (at the time the remote @samp{mountd} obtains the file handle). 7767 7768@node Home Directories, Architecture Sharing, User Filesystems, Examples 7769@comment node-name, next, previous, up 7770@section Home Directories 7771@cindex Home directories 7772@cindex Example of mounting home directories 7773@cindex Mount home directories 7774 7775One convention for home directories is to locate them in @samp{/homes} 7776so user @samp{jsp}'s home directory is @samp{/homes/jsp}. With more 7777than a single fileserver it is convenient to spread user files across 7778several machines. All that is required is a mount-map which converts 7779login names to an automounted directory. 7780 7781Such a map might be started by the command: 7782 7783@example 7784amd /homes amd.homes 7785@end example 7786 7787where the map @samp{amd.homes} contained the entries: 7788 7789@example 7790/defaults type:=link # All the entries are of type:=link 7791jsp fs:=/home/charm/jsp 7792njw fs:=/home/dylan/dk5/njw 7793... 7794phjk fs:=/home/toytown/ai/phjk 7795sjv fs:=/home/ganymede/sjv 7796@end example 7797 7798Whenever a login name is accessed in @samp{/homes} a symbolic link 7799appears pointing to the real location of that user's home directory. In 7800this example, @samp{/homes/jsp} would appear to be a symbolic link 7801pointing to @samp{/home/charm/jsp}. Of course, @samp{/home} would also 7802be an automount point. 7803 7804This system causes an extra level of symbolic links to be used. 7805Although that turns out to be relatively inexpensive, an alternative is 7806to directly mount the required filesystems in the @samp{/homes} 7807map. The required map is simple, but long, and its creation is best automated. 7808The entry for @samp{jsp} could be: 7809 7810@example 7811jsp -sublink:=$@{key@};rfs:=/home/charm \ 7812 host==charm;type:=ufs;dev:=/dev/xd0g \ 7813 host!=charm;type:=nfs;rhost:=charm 7814@end example 7815 7816This map can become quite big if it contains a large number of entries. 7817By combining two other features of @i{Amd} it can be greatly simplified. 7818 7819First the UFS partitions should be mounted under the control of 7820@samp{/etc/fstab}, taking care that they are mounted in the same place 7821that @i{Amd} would have automounted them. In most cases this would be 7822something like @samp{/a/@dfn{host}/home/@dfn{host}} and 7823@samp{/etc/fstab} on host @samp{charm} would have a line:@refill 7824 7825@example 7826/dev/xy0g /a/charm/home/charm 4.2 rw,nosuid,grpid 1 5 7827@end example 7828 7829The map can then be changed to: 7830 7831@example 7832/defaults type:=nfs;sublink:=$@{key@};opts:=rw,intr,nosuid,grpid 7833jsp rhost:=charm;rfs:=/home/charm 7834njw rhost:=dylan;rfs:=/home/dylan/dk5 7835... 7836phjk rhost:=toytown;rfs:=/home/toytown;sublink:=ai/$@{key@} 7837sjv rhost:=ganymede;rfs:=/home/ganymede 7838@end example 7839 7840This map operates as usual on a remote machine (@i{ie} @code{$@{host@}} 7841not equal to @code{$@{rhost@}}). On the machine where the filesystem is 7842stored (@i{ie} @code{$@{host@}} equal to @code{$@{rhost@}}), @i{Amd} 7843will construct a local filesystem mount point which corresponds to the 7844name of the locally mounted UFS partition. If @i{Amd} is started with 7845the @code{-r} option then instead of attempting an NFS mount, @i{Amd} will 7846simply inherit the UFS mount (@pxref{Inheritance Filesystem}). If 7847@code{-r} is not used then a loopback NFS mount will be made. This type of 7848mount is known to cause a deadlock on many systems. 7849 7850@node Architecture Sharing, Wildcard Names, Home Directories, Examples 7851@comment node-name, next, previous, up 7852@section Architecture Sharing 7853@cindex Architecture sharing 7854@cindex Sharing a fileserver between architectures 7855@cindex Architecture dependent volumes 7856 7857@c %At the moment some of the research machines have sets of software 7858@c %mounted in @samp{/vol}. This contains subdirectories for \TeX, 7859@c %system sources, local sources, prolog libraries and so on. 7860Often a filesystem will be shared by machines of different architectures. 7861Separate trees can be maintained for the executable images for each 7862architecture, but it may be more convenient to have a shared tree, 7863with distinct subdirectories. 7864 7865A shared tree might have the following structure on the fileserver (called 7866@samp{fserver} in the example): 7867 7868@example 7869local/tex 7870local/tex/fonts 7871local/tex/lib 7872local/tex/bin 7873local/tex/bin/sun3 7874local/tex/bin/sun4 7875local/tex/bin/hp9000 7876... 7877@end example 7878 7879In this example, the subdirectories of @samp{local/tex/bin} should be 7880hidden when accessed via the automount point (conventionally @samp{/vol}). 7881A mount-map for @samp{/vol} to achieve this would look like: 7882 7883@example 7884/defaults sublink:=$@{/key@};rhost:=fserver;type:=link 7885tex type:=auto;fs:=$@{map@};pref:=$@{key@}/ 7886tex/fonts host!=fserver;type:=nfs;rfs:=/vol/tex \ 7887 host==fserver;fs:=/usr/local/tex 7888tex/lib host!=fserver;type:=nfs;rfs:=/vol/tex \ 7889 host==fserver;fs:=/usr/local/tex 7890tex/bin -sublink:=$@{/key@}/$@{arch@} \ 7891 host!=fserver;type:=nfs;rfs:=/vol/tex \ 7892 host:=fserver;fs:=/usr/local/tex 7893@end example 7894 7895When @samp{/vol/tex/bin} is referenced, the current machine architecture 7896is automatically appended to the path by the @code{$@{sublink@}} 7897variable. This means that users can have @samp{/vol/tex/bin} in their 7898@samp{PATH} without concern for architecture dependencies. 7899 7900@node Wildcard Names, rwho servers, Architecture Sharing, Examples 7901@comment node-name, next, previous, up 7902@section Wildcard Names & Replicated Servers 7903 7904By using the wildcard facility, @i{Amd} can @dfn{overlay} an existing 7905directory with additional entries. 7906The system files are usually mounted under @samp{/usr}. If instead, 7907@i{Amd} is mounted on @samp{/usr}, additional 7908names can be overlayed to augment or replace names in the ``master'' @samp{/usr}. 7909A map to do this would have the form: 7910 7911@example 7912local type:=auto;fs:=local-map 7913share type:=auto;fs:=share-map 7914* -type:=nfs;rfs:=/export/exec/$@{arch@};sublink:="$@{key@}" \ 7915 rhost:=fserv1 rhost:=fserv2 rhost:=fserv3 7916@end example 7917 7918Note that the assignment to @code{$@{sublink@}} is surrounded by double 7919quotes to prevent the incoming key from causing the map to be 7920misinterpreted. This map has the effect of directing any access to 7921@samp{/usr/local} or @samp{/usr/share} to another automount point. 7922 7923In this example, it is assumed that the @samp{/usr} files are replicated 7924on three fileservers: @samp{fserv1}, @samp{fserv2} and @samp{fserv3}. 7925For any references other than to @samp{local} and @samp{share} one of 7926the servers is used and a symbolic link to 7927@t{$@{autodir@}/$@{rhost@}/export/exec/$@{arch@}/@i{whatever}} is 7928returned once an appropriate filesystem has been mounted.@refill 7929 7930@node rwho servers, /vol, Wildcard Names, Examples 7931@comment node-name, next, previous, up 7932@section @samp{rwho} servers 7933@cindex rwho servers 7934@cindex Architecture specific mounts 7935@cindex Example of architecture specific mounts 7936 7937The @samp{/usr/spool/rwho} directory is a good candidate for automounting. 7938For efficiency reasons it is best to capture the rwho data on a small 7939number of machines and then mount that information onto a large number 7940of clients. The data written into the rwho files is byte order dependent 7941so only servers with the correct byte ordering can be used by a client: 7942 7943@example 7944/defaults type:=nfs 7945usr/spool/rwho -byte==little;rfs:=/usr/spool/rwho \ 7946 rhost:=vaxA rhost:=vaxB \ 7947 || -rfs:=/usr/spool/rwho \ 7948 rhost:=sun4 rhost:=hp300 7949@end example 7950 7951@node /vol, /defaults with selectors, rwho servers, Examples 7952@comment node-name, next, previous, up 7953@section @samp{/vol} 7954@cindex /vol 7955@cindex Catch-all mount point 7956@cindex Generic volume name 7957 7958@samp{/vol} is used as a catch-all for volumes which do not have other 7959conventional names. 7960 7961Below is part of the @samp{/vol} map for the domain @samp{doc.ic.ac.uk}. 7962The @samp{r+d} tree is used for new or experimental software that needs 7963to be available everywhere without installing it on all the fileservers. 7964Users wishing to try out the new software then simply include 7965@samp{/vol/r+d/@{bin,ucb@}} in their path.@refill 7966 7967The main tree resides on one host @samp{gould.doc.ic.ac.uk}, which has 7968different @samp{bin}, @samp{etc}, @samp{lib} and @samp{ucb} 7969sub-directories for each machine architecture. For example, 7970@samp{/vol/r+d/bin} for a Sun-4 would be stored in the sub-directory 7971@samp{bin/sun4} of the filesystem @samp{/usr/r+d}. When it was accessed 7972a symbolic link pointing to @samp{/a/gould/usr/r+d/bin/sun4} would be 7973returned.@refill 7974 7975@example 7976/defaults type:=nfs;opts:=rw,grpid,nosuid,intr,soft 7977wp -opts:=rw,grpid,nosuid;rhost:=charm \ 7978 host==charm;type:=link;fs:=/usr/local/wp \ 7979 host!=charm;type:=nfs;rfs:=/vol/wp 7980... 7981# 7982src -opts:=rw,grpid,nosuid;rhost:=charm \ 7983 host==charm;type:=link;fs:=/usr/src \ 7984 host!=charm;type:=nfs;rfs:=/vol/src 7985# 7986r+d type:=auto;fs:=$@{map@};pref:=r+d/ 7987# per architecture bin,etc,lib&ucb... 7988r+d/bin rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=$@{/key@}/$@{arch@} 7989r+d/etc rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=$@{/key@}/$@{arch@} 7990r+d/include rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=$@{/key@} 7991r+d/lib rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=$@{/key@}/$@{arch@} 7992r+d/man rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=$@{/key@} 7993r+d/src rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=$@{/key@} 7994r+d/ucb rhost:=gould.doc.ic.ac.uk;rfs:=/usr/r+d;sublink:=$@{/key@}/$@{arch@} 7995# hades pictures 7996pictures -opts:=rw,grpid,nosuid;rhost:=thpfs \ 7997 host==thpfs;type:=link;fs:=/nbsd/pictures \ 7998 host!=thpfs;type:=nfs;rfs:=/nbsd;sublink:=pictures 7999# hades tools 8000hades -opts:=rw,grpid,nosuid;rhost:=thpfs \ 8001 host==thpfs;type:=link;fs:=/nbsd/hades \ 8002 host!=thpfs;type:=nfs;rfs:=/nbsd;sublink:=hades 8003# bsd tools for hp. 8004bsd -opts:=rw,grpid,nosuid;arch==hp9000;rhost:=thpfs \ 8005 host==thpfs;type:=link;fs:=/nbsd/bsd \ 8006 host!=thpfs;type:=nfs;rfs:=/nbsd;sublink:=bsd 8007@end example 8008 8009@node /defaults with selectors, /tftpboot in a chroot-ed environment, /vol, Examples 8010@comment node-name, next, previous, up 8011@section @samp{/defaults} with selectors 8012@cindex /defaults with selectors 8013@cindex selectors on default 8014 8015It is sometimes useful to have different defaults for a given map. To 8016achieve this, the @samp{/defaults} entry must be able to process normal 8017selectors. This feature is turned on by setting 8018@samp{selectors_in_defaults = yes} in the @file{amd.conf} file. 8019@xref{selectors_in_defaults Parameter}. 8020 8021In this example, I set different default NFS mount options for hosts 8022which are running over a slower network link. By setting a smaller size 8023for the NFS read and write buffer sizes, you can greatly improve remote 8024file service performance. 8025 8026@example 8027/defaults \ 8028 wire==slip-net;opts:=rw,intr,rsize=1024,wsize=1024,timeo=20,retrans=10 \ 8029 wire!=slip-net;opts:=rw,intr 8030@end example 8031 8032@node /tftpboot in a chroot-ed environment, , /defaults with selectors, Examples 8033@comment node-name, next, previous, up 8034@section @samp{/tftpboot} in a chroot-ed environment 8035@cindex /tftpboot in a chroot-ed environment 8036@cindex chroot; /tftpboot example 8037 8038In this complex example, we attempt to run an @i{Amd} process 8039@emph{inside} a chroot-ed environment. @samp{tftpd} (Trivial FTP) is 8040used to trivially retrieve files used to boot X-Terminals, Network 8041Printers, Network routers, diskless workstations, and other such 8042devices. For security reasons, @samp{tftpd} (and also @samp{ftpd}) 8043processes are run using the @b{chroot}(2) system call. This provides an 8044environment for these processes, where access to any files outside the 8045directory where the chroot-ed process runs is denied. 8046 8047For example, if you start @samp{tftpd} on your system with 8048 8049@example 8050chroot /tftpboot /usr/sbin/tftpd 8051@end example 8052 8053@noindent 8054then the @samp{tftpd} process will not be able to access any files 8055outside @file{/tftpboot}. This ensures that no one can retrieve files 8056such as @file{/etc/passwd} and run password crackers on it. 8057 8058Since the TFTP service works by broadcast, it is necessary to have at 8059least one TFTP server running on each subnet. If you have lots of files 8060that you need to make available for @samp{tftp}, and many subnets, it 8061could take significant amounts of disk space on each host serving them. 8062 8063A solution we implemented at Columbia University was to have every host 8064run @samp{tftpd}, but have those servers retrieve the boot files from 8065two replicated servers. Those replicated servers have special 8066partitions dedicated to the many network boot files. 8067 8068We start @i{Amd} as follows: 8069 8070@example 8071amd /tftpboot/.amd amd.tftpboot 8072@end example 8073 8074That is, @i{Amd} is serving the directory @file{/tftpboot/.amd}. The 8075@samp{tftp} server runs inside @file{/tftpboot} and is chroot-ed in that 8076directory too. The @file{amd.tftpboot} map looks like: 8077 8078@example 8079# 8080# Amd /tftpboot directory -> host map 8081# 8082 8083/defaults opts:=nosuid,ro,intr,soft;fs:=/tftpboot/import;type:=nfs 8084 8085tp host==lol;rfs:=/n/lol/import/tftpboot;type:=lofs \ 8086 host==ober;rfs:=/n/ober/misc/win/tftpboot;type:=lofs \ 8087 rhost:=ober;rfs:=/n/ober/misc/win/tftpboot \ 8088 rhost:=lol;rfs:=/n/lol/import/tftpboot 8089@end example 8090 8091To help understand this example, I list a few of the file entries that 8092are created inside @file{/tftpboot}: 8093 8094@example 8095$ ls -la /tftpboot 8096dr-xr-xr-x 2 root 512 Aug 30 23:11 .amd 8097drwxrwsr-x 12 root 512 Aug 30 08:00 import 8098lrwxrwxrwx 1 root 33 Feb 27 1997 adminpr.cfg -> ./.amd/tp/hplj/adminpr.cfg 8099lrwxrwxrwx 1 root 22 Dec 5 1996 tekxp -> ./.amd/tp/xterms/tekxp 8100lrwxrwxrwx 1 root 1 Dec 5 1996 tftpboot -> . 8101@end example 8102 8103Here is an explanation of each of the entries listed above: 8104 8105@table @code 8106 8107@item .amd 8108This is the @i{Amd} mount point. Note that you do not need to run a 8109separate @i{Amd} process for the TFTP service. The @b{chroot}(2) system 8110call only protects against file access, but the same process can still 8111serve files and directories inside and outside the chroot-ed 8112environment, because @i{Amd} itself was not run in chroot-ed mode. 8113 8114@item import 8115This is the mount point where @i{Amd} will mount the directories 8116containing the boot files. The map is designed so that remote 8117directories will be NFS mounted (even if they are already mounted 8118elsewhere), and local directories are loopback mounted (since they are 8119not accessible outside the chroot-ed @file{/tftpboot} directory). 8120 8121@item adminpr.cfg 8122@itemx tekxp 8123Two manually created symbolic links to directories @emph{inside} the 8124@i{Amd}-managed directory. The crossing of the component @file{tp} will 8125cause @i{Amd} to automount one of the remote replicas. Once crossed, 8126access to files inside proceeds as usual. The @samp{adminpr.cfg} is a 8127configuration file for an HP Laser-Jet 4si printer, and the @samp{tekxp} 8128is a directory for Tektronix X-Terminal boot files. 8129 8130@item tftpboot 8131This innocent looking symlink is important. Usually, when devices boot 8132via the TFTP service, they perform the @samp{get file} command to 8133retrieve @var{file}. However, some devices assume that @samp{tftpd} 8134does not run in a chroot-ed environment, but rather ``unprotected'', and 8135thus use a full pathname for files to retrieve, as in @samp{get 8136/tftpboot/file}. This symlink effectively strips out the leading 8137@file{/tftpboot/}. 8138 8139@end table 8140 8141@c ################################################################ 8142@node Internals, Acknowledgments & Trademarks, Examples, Top 8143@comment node-name, next, previous, up 8144@chapter Internals 8145 8146Note that there are more error and logging messages possible than are 8147listed here. Most of them are self-explanatory. Refer to the program 8148sources for more details on the rest. 8149 8150@menu 8151* Log Messages:: 8152@end menu 8153 8154@node Log Messages, , Internals, Internals 8155@comment node-name, next, previous, up 8156@section Log Messages 8157 8158In the following sections a brief explanation is given of some of the 8159log messages made by @i{Amd}. Where the message is in @samp{typewriter} 8160font, it corresponds exactly to the message produced by @i{Amd}. Words 8161in @dfn{italic} are replaced by an appropriate string. Variables, 8162@code{$@{@i{var}@}}, indicate that the value of the appropriate variable is 8163output. 8164 8165Log messages are either sent directly to a file, 8166or logged via the @b{syslog}(3) mechanism. @xref{log_file Parameter}. 8167In either case, entries in the file are of the form: 8168@example 8169@i{date-string} @i{hostname} @t{amd[}@i{pid}@t{]} @i{message} 8170@end example 8171 8172@menu 8173* Fatal errors:: 8174* Info messages:: 8175@end menu 8176 8177@node Fatal errors, Info messages, Log Messages, Log Messages 8178@comment node-name, next, previous, up 8179@subsection Fatal errors 8180 8181@i{Amd} attempts to deal with unusual events. Whenever it is not 8182possible to deal with such an error, @i{Amd} will log an appropriate 8183message and, if it cannot possibly continue, will either exit or abort. 8184These messages are selected by @samp{-x fatal} on the command line. 8185When @b{syslog}(3) is being used, they are logged with level 8186@samp{LOG_FATAL}. Even if @i{Amd} continues to operate it is likely to 8187remain in a precarious state and should be restarted at the earliest 8188opportunity. 8189 8190@table @t 8191 8192@item Attempting to inherit not-a-filesystem 8193The prototype mount point created during a filesystem restart did not 8194contain a reference to the restarted filesystem. This error ``should 8195never happen''. 8196 8197@item Can't bind to domain "@i{NIS-domain}" 8198A specific NIS domain was requested on the command line, but no server 8199for that domain is available on the local net. 8200 8201@item Can't determine IP address of this host (@i{hostname}) 8202When @i{Amd} starts it determines its own IP address. If this lookup 8203fails then @i{Amd} cannot continue. The hostname it looks up is that 8204obtained returned by @b{gethostname}(2) system call. 8205 8206@item Can't find root file handle for @i{automount point} 8207@i{Amd} creates its own file handles for the automount points. When it 8208mounts itself as a server, it must pass these file handles to the local 8209kernel. If the filehandle is not obtainable the mount point is ignored. 8210This error ``should never happen''. 8211 8212@item Must be root to mount filesystems (euid = @i{euid}) 8213To prevent embarrassment, @i{Amd} makes sure it has appropriate system 8214privileges. This amounts to having an euid of 0. The check is made 8215after argument processing complete to give non-root users a chance to 8216access the @code{-v} option. 8217 8218@item No work to do - quitting 8219No automount points were given on the command line and so there is no 8220work to do. 8221 8222@item Out of memory 8223While attempting to malloc some memory, the memory space available to 8224@i{Amd} was exhausted. This is an unrecoverable error. 8225 8226@item Out of memory in realloc 8227While attempting to realloc some memory, the memory space available to 8228@i{Amd} was exhausted. This is an unrecoverable error. 8229 8230@item cannot create rpc/udp service 8231Either the NFS or AMQ endpoint could not be created. 8232 8233@item gethostname: @i{description} 8234The @b{gethostname}(2) system call failed during startup. 8235 8236@item host name is not set 8237The @b{gethostname}(2) system call returned a zero length host name. 8238This can happen if @i{Amd} is started in single user mode just after 8239booting the system. 8240 8241@item ifs_match called! 8242An internal error occurred while restarting a pre-mounted filesystem. 8243This error ``should never happen''. 8244 8245@item mount_afs: @i{description} 8246An error occurred while @i{Amd} was mounting itself. 8247 8248@item run_rpc failed 8249Somehow the main NFS server loop failed. This error ``should never 8250happen''. 8251 8252@item unable to free rpc arguments in amqprog_1 8253The incoming arguments to the AMQ server could not be free'ed. 8254 8255@item unable to free rpc arguments in nfs_program_1 8256The incoming arguments to the NFS server could not be free'ed. 8257 8258@item unable to register (AMQ_PROGRAM, AMQ_VERSION, udp) 8259The AMQ server could not be registered with the local portmapper or the 8260internal RPC dispatcher. 8261 8262@item unable to register (NFS_PROGRAM, NFS_VERSION, 0) 8263The NFS server could not be registered with the internal RPC dispatcher. 8264 8265@end table 8266 8267XXX: This section needs to be updated 8268 8269@node Info messages, , Fatal errors, Log Messages 8270@comment node-name, next, previous, up 8271@subsection Info messages 8272 8273@i{Amd} generates information messages to record state changes. These 8274messages are selected by @samp{-x info} on the command line. When 8275@b{syslog}(3) is being used, they are logged with level @samp{LOG_INFO}. 8276 8277The messages listed below can be generated and are in a format suitable 8278for simple statistical analysis. @dfn{mount-info} is the string 8279that is displayed by @dfn{Amq} in its mount information column and 8280placed in the system mount table. 8281 8282@table @t 8283 8284@item "@t{$@{@i{path}@}}" forcibly timed out 8285An automount point has been timed out by the @i{Amq} command. 8286 8287@item "@t{$@{@i{path}@}}" has timed out 8288No access to the automount point has been made within the timeout 8289period. 8290 8291@item Filehandle denied for "$@{@i{rhost}@}:$@{@i{rfs}@}" 8292The mount daemon refused to return a file handle for the requested filesystem. 8293 8294@item Filehandle error for "$@{@i{rhost}@}:$@{@i{rfs}@}": @i{description} 8295The mount daemon gave some other error for the requested filesystem. 8296 8297@item Finishing with status @i{exit-status} 8298@i{Amd} is about to exit with the given exit status. 8299 8300@item Re-synchronizing cache for map @t{$@{@i{map}@}} 8301The named map has been modified and the internal cache is being re-synchronized. 8302 8303@item file server @t{$@{@i{rhost}@}} is down - timeout of "@t{$@{@i{path}@}}" ignored 8304An automount point has timed out, but the corresponding file server is 8305known to be down. This message is only produced once for each mount 8306point for which the server is down. 8307 8308@item file server @t{$@{@i{rhost}@}} type nfs is down 8309An NFS file server that was previously up is now down. 8310 8311@item file server @t{$@{@i{rhost}@}} type nfs is up 8312An NFS file server that was previously down is now up. 8313 8314@item file server @t{$@{@i{rhost}@}} type nfs starts down 8315A new NFS file server has been referenced and is known to be down. 8316 8317@item file server @t{$@{@i{rhost}@}} type nfs starts up 8318A new NFS file server has been referenced and is known to be up. 8319 8320@item mount of "@t{$@{@i{path}@}}" on @t{$@{@i{fs}@}} timed out 8321Attempts to mount a filesystem for the given automount point have failed 8322to complete within 30 seconds. 8323 8324@item @i{mount-info} mounted fstype @t{$@{@i{type}@}} on @t{$@{@i{fs}@}} 8325A new file system has been mounted. 8326 8327@item @i{mount-info} restarted fstype @t{$@{@i{type}@}} on @t{$@{@i{fs}@}} 8328@i{Amd} is using a pre-mounted filesystem to satisfy a mount request. 8329 8330@item @i{mount-info} unmounted fstype @t{$@{@i{type}@}} from @t{$@{@i{fs}@}} 8331A file system has been unmounted. 8332 8333@item @i{mount-info} unmounted fstype @t{$@{@i{type}@}} from @t{$@{@i{fs}@}} link @t{$@{@i{fs}@}}/@t{$@{@i{sublink}@}} 8334A file system of which only a sub-directory was in use has been unmounted. 8335 8336@item restarting @i{mount-info} on @t{$@{@i{fs}@}} 8337A pre-mounted file system has been noted. 8338 8339@end table 8340 8341XXX: This section needs to be updated 8342 8343@c ################################################################ 8344@node Acknowledgments & Trademarks, Index, Internals, Top 8345@comment node-name, next, previous, up 8346@unnumbered Acknowledgments & Trademarks 8347 8348Many thanks to the @email{am-utils@@am-utils.org,Am-Utils Users} 8349mailing list through the months developing am-utils. These members 8350have contributed to the discussions, ideas, code and documentation, 8351and subjected their systems to alpha quality code. Special thanks go 8352to those @uref{http://www.am-utils.org/AUTHORS.txt,authors} who have 8353submitted patches, and especially to the maintainers: 8354 8355@itemize @bullet 8356@item @email{ezk@@cs.sunysb.edu,Erez Zadok} 8357@item @email{ib42@@cs.columbia.edu,Ion Badulescu} 8358@item @email{ro@@techfak.uni-bielefeld.de,Rainer Orth} 8359@item @email{nick.williams@@morganstanley.com,Nick Williams} 8360@end itemize 8361 8362Thanks to the Formal Methods Group at Imperial College for suffering 8363patiently while @i{Amd} was being developed on their machines. 8364 8365Thanks to the many people who have helped with the development of 8366@i{Amd}, especially Piete Brooks at the Cambridge University Computing 8367Lab for many hours of testing, experimentation and discussion. 8368 8369Thanks to the older @email{amd-workers@@majordomo.glue.umd.edu,Amd 8370Workers} mailing list (now defunct) members for many suggestions and 8371bug reports to @i{Amd}. 8372 8373@itemize @bullet 8374@item 8375@b{DEC}, @b{VAX} and @b{Ultrix} are registered trademarks of Digital 8376Equipment Corporation. 8377@item 8378@b{AIX} and @b{IBM} are registered trademarks of International Business 8379Machines Corporation. 8380@item 8381@b{Sun}, @b{NFS} and @b{SunOS} are registered trademarks of Sun 8382Microsystems, Inc. 8383@item 8384@b{UNIX} is a registered trademark in the USA and other countries, 8385exclusively licensed through X/Open Company, Ltd. 8386@item 8387All other registered trademarks are owned by their respective owners. 8388@end itemize 8389 8390@c ################################################################ 8391@node Index, , Acknowledgments & Trademarks, Top 8392@comment node-name, next, previous, up 8393@unnumbered Index 8394 8395@printindex cp 8396 8397@contents 8398@bye 8399 8400@c ==================================================================== 8401@c ISPELL LOCAL WORDS: 8402@c LocalWords: setfilename amdref overfullrule settitle titlepage titlefont nz 8403@c LocalWords: authorfont vskip ifinfo iftex cindex unnumberedsec dfn xref vol 8404@c LocalWords: locationN pxref jpo nott concentrix Sjoerd sjoerd cwi Eitan vuw 8405@c LocalWords: Mizrotsky eitan shumuji dgux fpx scp hcx metcalf masala hlh OTS 8406@c LocalWords: Presnell srp cgl Trost trost ogi pyrOSx OSx tubsibr riscix iX 8407@c LocalWords: Piete pb Lindblad cjl ai umax utek xinu Mitchum D'Souza dsouza 8408@c LocalWords: mrc apu alliant aviion AViiON fps macII multimax tahoe vax emph 8409@c LocalWords: mapdefault valA valB valC YPTSDIR ETCDIR substr MAKEDBM YPDBDIR 8410@c LocalWords: NOPUSH njw dylan dk dylan njw anydir domN achilles mjh pref sel 8411@c LocalWords: gdef loc loc loc ldots autodir remopts rwho rwho styx styx yoyo 8412@c LocalWords: noindent gould rvdmount rvdunmount fserver mtmp unioned logfile 8413@c LocalWords: dmn esac phjk toytown toytown toytown toytown phjk RdDir RdLnk 8414@c LocalWords: volname attrs netif dougal inaddr hwaddr ec mountmaps passno xy 8415@c LocalWords: freq dumpset hfs brian florence localinfo fstabs automaps defn 8416@c LocalWords: localname fsck'd opr gummo sjv ganymede sjv fserv fserv fserv 8417@c LocalWords: vaxA vaxB wp thpfs nbsd asis ifs amqprog free'ed printindex gov 8418@c LocalWords: LocalWords syncodeindex Distrib bsdnet lanl AutoMounter acis ic 8419@c LocalWords: ac uk aix bsd Mullender nl il DG lcs hpux irix ucsf NeXT cse cl 8420@c LocalWords: mt FX hp ibm mips utils def def Domainname eg hostd getwd tmp 8421@c LocalWords: subsubsection rw grpid intr noconn nocto nodevs nosuid retrans 8422@c LocalWords: rsize tcp timeo nounmount utimeout DDEBUG nodaemon fd hostnames 8423@c LocalWords: pid Amd's pendry vangogh nfsx backoff stats nomap nostats CRIT 8424@c LocalWords: noinfo clustername RVD dsk dsk amq hostports osver statfs str 8425@c LocalWords: ou counter's amdmaps proj src tftpboot sh mv cd sbin ypcat inet 8426@c LocalWords: Getattr getattr localhost fhandles netmask fstype noquota addr 8427@c LocalWords: exportfs Dumpsets dumpsets pindex ldif fixmount fixrmtab euid 8428@c LocalWords: lostaltmail realloc netnumber itemx primnetnum primnetname ARG 8429@c LocalWords: subsnetname subsnetnum netgrp netgroup multitable Shlib dec osf 8430@c LocalWords: hppa pc bsdi freebsd netbsd openbsd ncr sysv rs acdirmax fsid 8431@c LocalWords: acdirmin acregmax acregmin actimeo dumbtimr nfsv noac noauto sd 8432@c LocalWords: nocache nodev noint nosub pgthresh posix rdonly suid symttl mfs 8433@c LocalWords: AMFS umapfs myftpdir unionfs es mapname mapfile mapfile slocal 8434@c LocalWords: mailspool saturn saturn notknown lol ober dr xr xr drwxrwsr cfg 8435@c LocalWords: lrwxrwxrwx adminpr hplj adminpr cfg tekxp xterms tekxp Dupuy tp 8436@c LocalWords: linkname hlfsddump dirname rmtab pluto rlogin direntry pg vr dn 8437@c LocalWords: maxmem hlfsdir xmailbox showmount cn amdmap amdmapName resvport 8438@c LocalWords: objectClass amdmapKey amdmapValue ln powerpc amdmapTimestamp ez 8439@c LocalWords: moisil FSinfo Libtool Unmounting sublink fileservers NullProc 8440@c LocalWords: gethostname mount's unmounts linkx remounts unmounting UAs SA's 8441@c LocalWords: mountpoint mountpoints unescaped UIDs util's overlayed uref EFS 8442@c LocalWords: serv maxgroups nfsl cachedir copt cfsadmin efs addopts fg ROMs 8443@c LocalWords: nointr extatt setchapternewpage columnfractions alphaev gnulibc 8444@c LocalWords: freebsdelf gnuoldld ifhtml defperm nodefperm norrip RRIP rrip 8445@c LocalWords: noversion attr XXXXXX netgrpd rh mkstemp uid gid noexec mntfs 8446@c LocalWords: nomnttab optionstr hrtime xdrtrace getpwd proplist redhat ctl 8447