1.\" Copyright (c) 1989 Jan-Simon Pendry 2.\" Copyright (c) 1989 Imperial College of Science, Technology & Medicine 3.\" Copyright (c) 1989, 1991 The Regents of the University of California. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to Berkeley by 7.\" Jan-Simon Pendry at Imperial College, London. 8.\" 9.\" %sccs.include.redist.roff% 10.\" 11.\" @(#)amd.8 5.5 (Berkeley) 08/05/91 12.\" 13.\" $Id: amd.8,v 5.2.1.2 91/05/07 22:20:43 jsp Alpha $ 14.\" 15.Dd March 17, 1991 16.Dt AMD 8 17.Os 18.Sh NAME 19.Nm amd 20.Nd automatically mount file systems 21.Sh SYNOPSIS 22.Nm amd 23.Op Fl nprv 24.Op Fl a Ar mount_point 25.Op Fl c Ar duration 26.Op Fl d Ar domain 27.Bk -words 28.Op Fl k Ar kernel-arch 29.Ek 30.Bk -words 31.Op Fl l Ar logfile 32.Ek 33.Op Fl t Ar interval.interval 34.Bk -words 35.Op Fl w Ar interval 36.Ek 37.Op Fl x Ar log-option 38.Bk -words 39.Op Fl y Ar YP-domain 40.Ek 41.Bk -words 42.Op Fl C Ar cluster-name 43.Ek 44.Op Fl D Ar option 45.Bk -words 46.Oo 47.Ar directory mapname 48.Op Fl map-options 49.Oc 50.Ar ... 51.Ek 52.Sh DESCRIPTION 53.Nm Amd 54is a daemon that automatically mounts filesystems 55whenever a file or directory 56within that filesystem is accessed. 57Filesystems are automatically unmounted when they 58appear to be quiescent. 59.Pp 60.Nm Amd 61operates by attaching itself as an 62.Tn NFS 63server to each of the specified 64.Ar directories . 65Lookups within the specified directories 66are handled by 67.Nm amd , 68which uses the map defined by 69.Ar mapname 70to determine how to resolve the lookup. 71Generally, this will be a host name, some filesystem information 72and some mount options for the given filesystem. 73.Sh OPTIONS 74.Bl -tag -width Ds 75.It Fl a Ar temporary-directory 76Specify an alternative location for the real mount points. 77The default is 78.Pa /a . 79.It Fl c Ar duration 80Specify a 81.Ar duration , 82in seconds, that a looked up name remains 83cached when not in use. The default is 5 minutes. 84.It Fl d Ar domain 85Specify the local domain name. If this option is not 86given the domain name is determined from the hostname. 87.It Fl k Ar kernel-arch 88Specifies the kernel architecture. This is used solely 89to set the ${karch} selector. 90.It Fl l Ar logfile 91Specify a logfile in which to record mount and unmount events. 92If 93.Ar logfile 94is the string 95.Em syslog , 96the log messages will be sent to the system log daemon by 97.Xr syslog 3 . 98.It Fl n 99Normalize hostnames. 100The name refered to by ${rhost} is normalized relative to the 101host database before being used. The effect is to translate 102aliases into ``official'' names. 103.It Fl p 104Print 105.Em PID . 106Outputs the process-id of 107.Nm amd 108to standard output where it can be saved into a file. 109.It Fl r 110Restart existing mounts. 111.Nm Amd 112will scan the mount file table to determine which filesystems 113are currently mounted. Whenever one of these would have 114been auto-mounted, 115.Nm amd 116.Em inherits 117it. 118.It Fl t Ar interval.interval 119Specify the 120.Ar interval , 121in tenths of a second, between 122.Tn NFS/RPC/UDP 123retries. 124The default is 0.8 seconds. 125The second values alters the restransmit counter. 126Useful defaults are supplied if either or both 127values are missing. 128.It Fl v 129Version. Displays version and configuration information on standard error. 130.It Fl w Ar interval 131Specify an 132.Ar interval , 133in seconds, between attempts to dismount 134filesystems that have exceeded their cached times. 135The default is 2 minutes. 136.It Fl y Ar domain 137Specify an alternative 138.Tn NIS 139domain from which to fetch the 140.Tn NIS 141maps. 142The default is the system domain name. 143This option is ignored if 144.Tn NIS 145support is not available. 146.It Fl x Ar options 147Specify run-time logging options. The options are a comma separated 148list chosen from: fatal, error, user, warn, info, map, stats, all. 149.It Fl D Ar option 150Select from a variety of debug options. Prefixing an 151option with the strings 152.Em no 153reverses the effect of that option. Options are cumulative. 154The most useful option is 155.Ar all . 156.El 157.Pp 158Since 159.Fl D 160is only used for debugging other options are not documented here: 161the current supported set of options is listed by the 162.Fl v 163option 164and a fuller description is available in the program source. 165.Sh FILES 166.Bl -tag -width /axx 167.It Pa /a 168directory under which filesystems are dynamically mounted 169.El 170.Sh CAVEATS 171Some care may be required when creating a mount map. 172.Pp 173Symbolic links on an 174.Tn NFS 175filesystem can be incredibly inefficient. 176In most implementations of 177.Tn NFS , 178their interpolations are not cached by 179the kernel and each time a symbolic link is 180encountered during a 181.Em lookuppn 182translation it costs an 183.Tn RPC 184call to the 185.Tn NFS 186server. 187A large improvement in real-time 188performance could be gained by adding a cache somewhere. 189Replacing 190.Xr symlinks 2 191with a suitable incarnation of the auto-mounter 192results in a large real-time speedup, but also causes a large 193number of process context switches. 194.Pp 195A weird imagination is most useful to gain full advantage of all 196the features. 197.Sh SEE ALSO 198.Xr amq 8 , 199.Xr domainname 1 , 200.Xr hostname 1 , 201.Xr automount 8 , 202.Xr mount 8 , 203.Xr umount 8 , 204.Xr mtab 5 , 205.Rs 206.%T Amd \- The 4.4 BSD Automounter 207.Re 208.Sh AUTHOR 209.An Jan-Simon Pendry 210<jsp@doc.ic.ac.uk>, Department of Computing, Imperial College, London, UK. 211.Sh HISTORY 212The 213.Nm amd 214automounter is 215.Ud . 216