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