AMD.CONF(5) | MidnightBSD File Formats Manual | AMD.CONF(5) |
amd.conf
—
amd(8)
configuration file
amd.conf |
The amd.conf
file is the configuration
file for amd(8), as part of
the am-utils suite.
The amd.conf
file contains runtime
configuration information for the
amd(8) automounter
program.
The file consists of sections and parameters. A section begins with the name of the section in square brackets and continues until the next section begins or the end of the file is reached. Sections contain parameters of the form “name = value”.
The file is line-based — that is, each newline-terminated line represents either a comment, a section name or a parameter. No line-continuation syntax is available.
Section, parameter names and their values are case sensitive.
Only the first equals sign in a parameter is significant.
Whitespace before or after the first equals sign is discarded. Leading,
trailing and internal whitespace in section and parameter names is
irrelevant. Leading and trailing whitespace in a parameter value is
discarded. Internal whitespace within a parameter value is not allowed,
unless the whole parameter value is quoted with double quotes as in
“name =
"some value
"”.
Any line beginning with a pound sign (#) is ignored, as are lines containing only whitespace.
The values following the equals sign in parameters are all either
a string (no quotes needed if string does not include spaces) or a boolean,
which may be given as “yes/no
”. Case
is significant in all values. Some items such as cache timeouts are
numeric.
Parameters in this section either apply to
amd
as a whole, or to all other regular map sections
which follow. There should be only one global section defined in one
configuration file.
It is highly recommended that this section be specified first in the configuration file. If it is not, then regular map sections which precede it will not use global values defined later.
Parameters in regular (non-global) sections apply to a single map
entry. For example, if the map section [/homes] is
defined, then all parameters following it will be applied to the
/homes amd
-managed mount
point.
These parameters can be specified either in the global or a map specific section. Entries specified in a map-specific section override the default value or one defined in the global section. If such a common parameter is specified only in the global section, it is applicable to all regular map sections that follow.
yes
”, then
amd
's top-level mount points will be browsable to
readdir(3) calls. This
means you could run for example
ls(1) and see what keys are
available to mount in that directory. Not all entries are made visible to
readdir(3): the
“/default
” entry, wildcard entries,
and those with a ‘/
’ in them are not
included. If you specify “full
” to
this option, all but “/default
” will
be visible. Note that if you run a command which will attempt to
stat(2) the entries, such
as often done by “ls -l
” or
“ls -F
”,
amd(8) will attempt to
mount
every
entry in that map. This is often called a “mount
storm”.cache:=all
”.autofs
” is specified,
amd(8) will be an autofs
server for those mount points.yes
” and using Autofs,
amd(8) will use lofs-type
(loopback) mounts for type:=link mounts. This has the advantage of
mounting in place, and users get to the see the same pathname that they
chdir'ed into. If this option is set to
“no
”, then
amd(8) will use symlinks
instead: that code is more tested, but negates autofs's big advantage of
in-place mounts.yes
”, then the /defaults entry
of maps will search for and process any selectors before setting defaults
for all other keys in that map. Useful when you want to set different
options for a complete map based on some parameters. For example, you may
want to better the NFS performance over slow slip-based networks as
follows:
/defaults \ wire==slip-net;opts:=intr,rsize=1024,wsize=1024 \ wire!=slip-net;opts:=intr,rsize=8192,wsize=8192
-A
option to
amd(8). Allows you to
override the value of the arch
amd(8) variable.amd
's own automount points. A value of 0 is
supposed to turn off attribute caching, meaning that
amd(8) will be consulted
via a kernel-RPC each time someone stat()'s the mount point (which could
be abused as a denial-of-service attack). Warning: some OSs are incapable
of turning off the NFS attribute cache reliably. On such systems,
amd
may not work reliably under heavy load. See
the README.attrcache document in the Am-utils
distribution for more details.-a
option to
amd(8). This sets the
private directory where amd
will create
sub-directories for its real mount points.-c
option to
amd(8). Sets the duration
in seconds that looked-up or mounted map entries remain in the cache.-C
option to
amd(8). Specifies the
alternate HP-UX cluster to use.-D
option to
amd(8). Specify any
debugging options for
amd(8). Works only if
Works only if am-utils was configured for debugging using the
--enable-debug
option. The
mem
option, as well as all other options, can be
turned on via
--enable-debug
=mem
.
Otherwise debugging options are ignored. Options are comma delimited, and
can be preceded by the string “no
”
to negate their meaning. You can get the list of supported debugging
options by running amd
-v
.
Possible values are:
all
defaults
amq
daemon
fork
full
hrtime
info
mem
mtab
str
test
trace
xdrtrace
-w
option to
amd(8). Specify, in
seconds, the time between attempts to dismount file systems that have
exceeded their cached times.yes
”, then the domain name part
referred to by ${rhost} is stripped off. This is useful to keep logs and
smaller. If “no
”, then the domain
name part is left changed. This is useful when using multiple domains with
the same maps (as you may have hosts whose domain-stripped name is
identical).yes
”, and the client OS
supports forced or lazy unmounts, then
amd(8) will attempt to use
them if it gets any of three serious error conditions when trying to
unmount an existing mount point or mount on top of one:
EIO
, ESTALE
, or
EBUSY
.
This could be useful to recover from serious conditions such
as hardware failure of mounted disks, or NFS servers which are down
permanently, were migrated, or changed their IP address. Only
“type:=toplvl
” mounts hung with
EBUSY
are forcibly unmounted using this option,
which is useful to recover from a hung
amd(8)).
linux
”, but you can override it to
“linux-2.2.5
”.yes
”,
amd(8) will perform RPC
authentication using fully-qualified host names. This is necessary for
some systems, and especially when performing cross-domain mounting. For
this function to work, the
amd(8) variable ${hostd}
is used, requiring that ${domain} not be null.-k
option to
amd(8). Allows you to
override the kernel-architecture of your system. Useful for example on Sun
(Sparc) machines, where you can build one amd
binary and run it on multiple machines, yet you want each one to get the
correct karch variable set (for example, sun4c,
sun4m, sun4u, etc.) Note that if not specified,
amd(8) will use
uname(3) to figure out
the kernel architecture of the machine.-d
option to
amd(8). Specify the local
domain name. If this option is not given the domain name is determined
from the hostname by removing the first component of the fully-qualified
host name.-l
option to
amd(8). Specify a file
name to log amd(8) events
to. If the string /dev/stderr is specified,
amd(8) will send its
events to the standard error file descriptor. If the string
syslog is given,
amd(8) will record its
events with the system logger
syslogd(8). The
default syslog facility used is LOG_DAEMON
. If you
wish to change it, append its name to the log file name, delimited by a
single colon. For example, if logfile is the
string “syslog:local7
” then
amd(8) will log messages
via syslog(3) using the
LOG_LOCAL7
facility (if it exists on the
system).-x
option to
amd(8). Specify any
logging options for
amd(8). Options are comma
delimited, and can be preceded by the string
“no
” to negate their meaning. The
“debug
” logging option is only
available if am-utils was configured with
--enable-debug
. You can get the list of supported
debugging and logging options by running amd
-H
. Possible values are:
all
defaults
debug
error
fatal
info
map
stats
user
warn
warning
yes
” then
amd(8) will accept local
NFS packets from any local interface; this is useful on hosts that may
have multiple interfaces where the system is forced to send all outgoing
packets (even those bound to the same host) via an address other than
127.0.0.1.ignoring request from foo:1234, port not
reserved
” in your
amd(8) log, try enabling
this parameter and give it another go.amd
is compiled with NFSv3 support that may
not be stable. With this option you can turn off the complete usage of
NFSv3 dynamically (without having to recompile
amd
) until such time as NFSv3 support is desired
again.-t
timeout.retransmit option
to amd(8). Specifies the
number of NFS retransmissions that the kernel will use to communicate with
amd(8).amd
's top-level UDP mounts.-t
timeout.retransmit option
to amd(8). Specifies the
NFS timeout interval, in
tenths
of seconds, between NFS/RPC retries (for UDP and TCP). This is the value
that the kernel will use to communicate with
amd(8).
amd(8) relies on the kernel RPC retransmit mechanism to trigger mount retries. The values of the nfs_retransmit_counter and the nfs_retry_interval parameters change the overall retry interval. Too long an interval gives poor interactive response; too short an interval causes excessive retries.
amd
's top-level UDP
mounts.amd
is compiled with NFSv3 support that may
not be stable. With this option you can turn off the complete usage of
NFSv3 dynamically (without having to recompile
amd
) until such time as NFSv3 support is desired
again.-y
option to
amd(8). Specify an
alternative NIS domain from which to fetch the NIS maps. The default is
the system domain name. This option is ignored if NIS support is not
available.-n
option to
amd(8). If
“yes
”, then the name referred to by
${rhost} is normalized relative to the host database
before being used. The effect is to translate aliases into
“official” names.yes
”, then
amd(8) will condense all
multiple ‘/
’ (slash) characters into
one and remove all trailing slashes. If
“no
”, then
amd(8) will not touch
strings that may contain repeated or trailing slashes. The latter is
sometimes useful with SMB mounts, which often require multiple slash
characters in pathnames.-O
option to
amd(8). Allows you to
override the compiled-in name of the operating system. Useful when the
built-in name is not desired for backward compatibility reasons. For
example, if the build in name is
“sunos5
”, you can override it to
“sos5
”, and use older maps which
were written with the latter in mind.-o
option to
amd(8). Overrides the
compiled-in version number of the operating system. Useful when the built
in version is not desired for backward compatibility reasons. For example,
if the build in version is “2.5.1
”,
you can override it to “5.5.1
”, and
use older maps that were written with the latter in mind.amd
can also be
retrieved via amq
-p
. This
file is used only if the print_pid option is
on.-S
option to
amd(8). If
“yes
”, lock the running executable
pages of amd
into memory. To improve
amd
's performance, systems that support the
plock(3) or
mlockall(2) call can
lock the amd
process into memory. This way there
is less chance that the operating system will schedule, page out, and swap
the amd
process as needed. This improves
amd
's performance, at the cost of reserving the
memory used by the amd
process (making it
unavailable for other processes).amd
processes. For example, you can run another
amd(8) in
“test” mode, without affecting the primary
amd
process in any way. For safety reasons, the
alternate program numbers that can be specified must be in the range
300019-300029, inclusive. The
amq(8) utility has an
option -P
which can be used to specify an
alternate program number of an amd
to contact. In
this way, amq
can fully control any number of
amd
processes running on the same host.amd
's
amq(8) service. This is
used for both UDP and TCP. Setting this value to 0 (or not defining it)
will cause amd(8) to
select an arbitrary port number. Setting the
amq(8) RPC service port to
a specific number is useful in firewalled or NAT'ed environments, where
you need to know which port
amd(8) will listen
on.-p
option to
amd(8). If
“yes
”, amd
will print its process ID upon starting.-v
option to
amd(8), but the version
prints and amd
continues to run. If
“yes
”, amd
will print its version information string, which includes some
configuration and compilation values.-r
option to
amd(8). If
“yes
”, amd
will scan the mount table to determine which file systems are currently
mounted. Whenever one of these would have been auto-mounted,
amd
inherits it.yes
”, then all maps which are
browsable will also show the number of entries (keys) they have when
df(1) runs. (This is
accomplished by returning non-zero values to the
statfs(2) system
call.)yes
”, then the log file (if it
is a regular file), will be truncated upon startup.yes
”, then
amd(8) will attempt to
unmount all file systems which it knows about. Normally
amd
leaves all (esp. NFS) mounted file systems
intact. Note that amd
does not know about file
systems mounted before it starts up, unless the
restart_mounts option or -r
flag are used.yes
”, then
amd(8) will use the
tcpd/libwrap tcpwrappers library (if available) to control access to
amd
via the
/etc/hosts.allow and
/etc/hosts.deny files.unknown
”, but you can set it to
“redhat
”.amd
will process the map if the
-T
option was given to
amd(8), and the value
given to that command-line option matches that in the map section.Here is a real amd(8) configuration I use daily.
# GLOBAL OPTIONS SECTION [ global ] normalize_hostnames = no print_pid = no restart_mounts = yes auto_dir = /n log_file = /var/log/amd log_options = all #debug_options = all plock = no selectors_in_defaults = yes # config.guess picks up "sunos5" and I don't want to edit my maps yet os = sos5 # if you print_version after setting up "os", it will show it. print_version = no map_type = file search_path = /etc/amdmaps:/usr/lib/amd:/usr/local/AMD/lib browsable_dirs = yes # DEFINE AN AMD MOUNT POINT [ /u ] map_name = amd.u [ /proj ] map_name = amd.proj [ /src ] map_name = amd.src [ /misc ] map_name = amd.misc [ /import ] map_name = amd.import [ /tftpboot/.amd ] tag = tftpboot map_name = amd.tftpboot
hosts_access(5), amd(8), amq(8), ctl-amd(8).
“am-utils” info(1) entry.
Erez Zadok, Linux NFS and Automounter Administration, Sybex, 2001, ISBN 0-7821-2739-8.
http://www.am-utils.org/
Amd - The 4.4 BSD Automounter.
The amd(8) utility first appeared in 4.4BSD.
Erez Zadok ⟨ezk@cs.sunysb.edu⟩, Computer Science Department, Stony Brook University, Stony Brook, New York, USA.
Other authors and contributors to am-utils are listed in the AUTHORS file distributed with am-utils.
February 26, 2016 | midnightbsd-3.1 |