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