xref: /original-bsd/usr.sbin/amd/amd/amd.8 (revision 7afc0fa3)
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.10 (Berkeley) 04/19/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.It Fl w Ar interval
126Specify an
127.Ar interval ,
128in seconds, between attempts to dismount
129filesystems that have exceeded their cached times.
130The default is 2 minutes.
131.It Fl y Ar domain
132Specify an alternative
133.Tn NIS
134domain from which to fetch the
135.Tn NIS
136maps.
137The default is the system domain name.
138This option is ignored if
139.Tn NIS
140support is not available.
141.It Fl x Ar options
142Specify run-time logging options.  The options are a comma separated
143list chosen from: fatal, error, user, warn, info, map, stats, all.
144.It Fl D Ar option
145Select from a variety of debug options.  Prefixing an
146option with the string
147.Em no
148reverses the effect of that option.  Options are cumulative.
149The most useful option is
150.Ar all .
151.El
152.Pp
153Since
154.Fl D
155is only used for debugging other options are not documented here:
156the current supported set of options is listed by the
157.Fl v
158option
159and a fuller description is available in the program source.
160.Sh FILES
161.Bl -tag -width /axx
162.It Pa /a
163directory under which filesystems are dynamically mounted
164.El
165.Sh CAVEATS
166Some care may be required when creating a mount map.
167.Pp
168Symbolic links on an
169.Tn NFS
170filesystem can be incredibly inefficient.
171In most implementations of
172.Tn NFS ,
173their interpolations are not cached by
174the kernel and each time a symbolic link is
175encountered during a
176.Em lookuppn
177translation it costs an
178.Tn RPC
179call to the
180.Tn NFS
181server.
182A large improvement in real-time
183performance could be gained by adding a cache somewhere.
184Replacing
185.Xr symlinks 2
186with a suitable incarnation of the auto-mounter
187results in a large real-time speedup, but also causes a large
188number of process context switches.
189.Pp
190A weird imagination is most useful to gain full advantage of all
191the features.
192.Sh SEE ALSO
193.Xr amq 8 ,
194.Xr hostname 1 ,
195.Xr mount 8 ,
196.Xr umount 8 ,
197.Rs
198.%T Amd \- The 4.4 BSD Automounter
199.Re
200.Sh AUTHOR
201.An Jan-Simon Pendry
202<jsp@doc.ic.ac.uk>, Department of Computing, Imperial College, London, UK.
203.Sh HISTORY
204The
205.Nm amd
206utility first appeared in 4.4BSD.
207