[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6. Amd Configuration File

The `amd.conf' file is the configuration file for Amd, as part of the am-utils suite. This file contains runtime configuration information for the Amd automounter program.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.1 File Format

The `amd.conf' 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 names, 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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.2 The Global Section

The global section must be specified as `[global]'. 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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.3 Regular Map Sections

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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.4 Common Parameters

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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.4.1 autofs_use_lofs Parameter

(type=string, default=`yes'). When set to `yes', Amd's autofs code will use lofs-type (loopback) mounts for type:=link mounts, as well as several other cases that require local references. This has the advantage that Amd does not use a secondary mount point and users do not see external pathnames (the infamous /bin/pwd problem, where it reports a different path than the user chdir'ed into). One of the disadvantages of using this option is that the autofs code is relatively new and the in-place mounts have not been throughly tested.

If this option is set to `no', then Amd's autofs code will use symlinks instead of lofs-type mounts for local references. This has the advantage of using simpler (more stable) code, but at the expense of negating one of autofs's big advantages: the hiding of Amd's internal paths. Note that symlinks are not supported in all autofs implementations, especially those derived from Solaris Autofs v1. Also, on Solaris 2.6 and newer, autofs symlinks are not cached, resulting in repeated up-call requests to Amd.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.4.2 browsable_dirs Parameter

(type=string, default=`no'). If `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 `/defaults' entry, wildcard entries, and those with a `/' in them are not included. If you specify `full' to this option, all but the `/defaults' entry 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 will attempt to mount every entry in that map. This is often called a "mount storm".

Note that mount storms are mostly avoided by using autofs mounts (`mount_type = autofs').


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.4.3 map_defaults Parameter

(type=string, default to empty). This option sets a string to be used as the map's /defaults entry, overriding any /defaults specified in the map. This allows local users to override a given map's defaults without modifying maps globally (which is impossible in sites where the maps are managed by a different administrative group).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.4.4 map_options Parameter

(type=string, default no options). This option is the same as specifying map options on the command line to Amd, such as `cache:=all'.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.4.5 map_type Parameter

(type=string, default search all map types). If specified, Amd will initialize the map only for the type given. This is useful to avoid the default map search type used by Amd which takes longer and can have undesired side-effects such as initializing NIS even if not used. Possible values are

`file'

plain files

`hesiod'

Hesiod name service from MIT

`ldap'

Lightweight Directory Access Protocol

`ndbm'

(New) dbm style hash files

`nis'

Network Information Services (version 2)

`nisplus'

Network Information Services Plus (version 3)

`passwd'

local password files

`union'

union maps


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.4.6 mount_type Parameter

(type=string, default=`nfs'). All Amd mount types default to NFS. That is, Amd is an NFS server on the map mount points, for the local host it is running on. If `autofs' is specified, Amd will be an autofs server for those mount points.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.4.7 search_path Parameter

(type=string, default no search path). This provides a (colon-delimited) search path for file maps. Using a search path, sites can allow for local map customizations and overrides, and can distributed maps in several locations as needed.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.4.8 selectors_in_defaults Parameter

(type=boolean, default=`no'). If `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

Deprecated form: selectors_on_default.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.4.9 sun_map_syntax Parameter

(type=boolean, default=`no'). If `yes', then Amd will parse the map according to the Sun Automount syntax.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5 Global Parameters

The following parameters are applicable to the `[global]' section only.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.1 arch Parameter

(type=string, default to compiled in value). Same as the -A option to Amd. Allows you to override the value of the arch Amd variable.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.2 auto_attrcache Parameter

(type=numeric, default=0). Specify in seconds (or units of 0.1 seconds, depending on the OS), what is the (kernel-side) NFS attribute cache timeout for Amd's own automount points. A value of 0 is supposed to turn off attribute caching, meaning that Amd 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: Amd depends on being able to turn off the NFS attribute cache of the client OS. If it cannot be turned off, then users may get ESTALE errors or symlinks that point to the wrong places. This is more likely under heavy use of Amd, for example if your system is experiencing frequent map changes or frequent mounts/unmounts. Therefore, under normal circumstances, this parameter should remain set to 0, to ensure that the attribute cache is indeed off.

Unfortunately, some kernels (e.g., certain BSDs) don't have a way to turn off the NFS attribute cache. Setting this parameter to 0 is supposed to turn off attribute caching entirely, but unfortunately it does not; instead, the attribute cache is set to some internal hard-coded default (usually anywhere from 5-30 seconds). If you suspect that your OS doesn't have a reliable way of turning off the attribute cache, then it is better to set this parameter to the smallest possible non-zero value (set `auto_attrcache=1' in your amd.conf). This will not eliminate the problem, but reduce the risk window somewhat. The best solutions are (1) to use Amd in Autofs mode, if it's supported in your OS, and (2) talk to your OS vendor to support a true `noac' flag. See the README.attrcache document for more details.

If you are able to turn off the attribute cache on your OS, alas, Amd's performance may degrade (when not using Autofs) because every traversal of an automounter-controlled pathname will result in a lookup request from the kernel to Amd. Under heavy loads, for example when using recursive tools like `find', `rdist', or `rsync', this performance degradation can be noticeable. There are two possible solutions that some administrators have chosen to improve performance:

  1. First, you can turn off unmounting using the `nounmount' mount option. This will ensure that no Amd symlink could ever change, thereby the kernel's attribute cache and Amd will always be in sync. However, this method will cause the number of mounts to keep growing, even if some are no longer in use; this has the disadvantage that your system could be more susceptible to hangs if even one of those accumulating mounts hangs due to a downed server.
  2. Second, you can turn on attribute caching carefully by setting a small automounter attribute cache value (say, one second), and a relatively large dismount interval (say, one hour). (See section dismount_interval Parameter.) For example, you can set this in your amd.conf:
     
    [global]
    auto_attrcache = 1
    dismount_interval = 3600
    

    This has the benefit of using the kernel's attribute cache and thus improving performance. The disadvantage with this option is that the window of vulnerability is not eliminated entirely: it is only made smaller.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.3 auto_dir Parameter

(type=string, default=`/a'). Same as the -a option to Amd. This sets the private directory where Amd will create sub-directories for its real mount points.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.4 cache_duration Parameter

(type=numeric, default=300). Same as the -c option to Amd. Sets the duration in seconds that looked-up or mounted map entries remain in the cache.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.5 cluster Parameter

(type=string, default no cluster). Same as the -C option to Amd. Specifies the alternate HP-UX cluster to use.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.6 debug_mtab_file Parameter

(type=string, default="/tmp/mtab"). Path to mtab file that is used by Amd to store a list of mounted file systems during debug-mtab mode. This option only applies to systems that store mtab information on disk.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.7 debug_options Parameter

(type=string, default no debug options). Same as the -D option to Amd. Specify any debugging options for Amd. Works only if am-utils was configured for debugging using the --enable-debug option. The additional `mem' option 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 and logging options by running amd -H. Possible values those listed for the -D option. See section -D opts.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.8 dismount_interval Parameter

(type=numeric, default=120). Same as the -w option to Amd. Specify in seconds, the time between attempts to dismount file systems that have exceeded their cached times.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.9 domain_strip Parameter

(type=boolean, default=`yes'). If `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).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.10 exec_map_timeout Parameter

(type=numeric, default=10). The timeout in seconds that Amd will wait for an executable map program before an answer is returned from that program (or script). This value should be set to as small as possible while still allowing normal replies to be returned before the timer expires, because during the time that the executable map program is queried, Amd is essentially waiting and is thus not responding to any other queries. See section Executable maps.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.11 forced_unmounts Parameter

(type=boolean, default=`no'). Sometimes, mount points are hung due to unrecoverable conditions, such as when NFS servers migrate, change their IP address, are down permanently, or due to hardware failures, and more. In this case, attempting to unmount an existing mount point, or even just to stat(2) it, results in one of three fatal errors: EIO, ESTALE, or EBUSY. At that point, Amd can do little to recover that hung point (in fact, the OS cannot automatically recover either). For that reason, some OSs support special kinds of forced unmounts, which must be used very carefully: they will force an unmount immediately (or lazily on Linux), which could result in application data loss. However, that may be the only way to recover the entire host (without rebooting). Once a hung mount point is forced out, Amd can then re-mount a replacement one (if available), bringing a mostly-hung system back to operation and avoiding a potentially costly reboot.

If the `forced_unmounts' option is set to `yes', and the client OS supports forced or lazy unmounts, then Amd will attempt to use them if it gets any of the three serious error conditions listed above. Note that Amd will force the unmount of mount points that returned EBUSY only for `type:=toplvl' mounts (see section Top-level Filesystem (`toplvl')): that is, Amd's own mount points. This is useful to recover from a previously hung Amd, and to ensure that an existing Amd can shutdown cleanly even if some processes are keeping its mount points busy (i.e., when a user's shell process uses cd to set its CWD to Amd's own mount point).

If this option is set to `no' (the default), then Amd will not attempt this special recovery procedure.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.12 full_os Parameter

(type=string, default to compiled in value). The full name of the operating system, along with its version. Allows you to override the compiled-in full name and version of the operating system. Useful when the compiled-in name is not desired. For example, the full operating system name on linux comes up as `linux', but you can override it to `linux-2.2.5'.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.13 fully_qualified_hosts Parameter

(type=string, default=`no'). If `yes', Amd 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 variable `${hostd}' is used, requiring that `${domain}' not be null.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.14 hesiod_base Parameter

(type=string, default=`automount'). Specify the base name for hesiod maps.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.15 karch Parameter

(type=string, default to karch of the system). Same as the -k option to Amd. 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 will use uname(2) to figure out the kernel architecture of the machine.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.16 ldap_base Parameter

(type=string, default not set). Specify the base name for LDAP. This often includes LDAP-specific values such as country and organization.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.17 ldap_cache_maxmem Parameter

(type=numeric, default=131072). Specify the maximum memory Amd should use to cache LDAP entries.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.18 ldap_cache_seconds Parameter

(type=numeric, default=0). Specify the number of seconds to keep entries in the cache.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.19 ldap_hostports Parameter

(type=string, default not set). Specify the LDAP host and port values.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.20 ldap_proto_version Parameter

(type=numeric, default=2). Specify the LDAP protocol version to use. With a value of 3 will use LDAPv3 protocol.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.21 local_domain Parameter

(type=string, default no sub-domain). Same as the -d option to Amd. 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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.22 localhost_address Parameter

(type=string, default to localhost or 127.0.0.1). Specify the name or IP address for Amd to use when connecting the sockets for the local NFS server and the RPC server. This defaults to 127.0.0.1 or whatever the host reports as its local address. This parameter is useful on hosts with multiple addresses where you want to force Amd to connect to a specific address.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.23 log_file Parameter

(type=string, default=`stderr'). Same as the -l option to Amd. Specify a file name to log Amd events to. If the string `/dev/stderr' is specified, Amd will send its events to the standard error file descriptor.

If the string `syslog' is given, Amd will record its events with the system logger syslogd(8). If your system supports syslog facilities, then the default facility used is `LOG_DAEMON'.

When using syslog, if you wish to change the facility, append its name to the option name, delimited by a single colon. For example, if it is the string `syslog:local7' then Amd will log messages via syslog(3) using the `LOG_LOCAL7' facility. If the facility name specified is not recognized, Amd will default to `LOG_DAEMON'. Note: while you can use any syslog facility available on your system, it is generally a bad idea to use those reserved for other services such as `kern', `lpr', `cron', etc.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.24 log_options Parameter

(type=string, default="defaults"). Same as the -x option to Amd. Specify any logging options for Amd. 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 options by running amd -H. Possible values are:

`all'

all messages

`defaults'

an alias for "fatal,error,user,warning,info"

`debug'

debug messages

`error'

non-fatal system errors (cannot be turned off)

`fatal'

fatal errors (cannot be turned off)

`info'

information

`map'

map errors

`stats'

additional statistical information

`user'

non-fatal user errors

`warn'

warnings

`warning'

warnings


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.25 map_reload_interval Parameter

(type=numeric, default=3600). The number of seconds that Amd will wait before it checks to see if any maps have changed at their source (NIS servers, LDAP servers, files, etc.). Amd will reload only those maps that have changed.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.26 nfs_allow_any_interface Parameter

(type=string, default=`no'). Normally Amd accepts local NFS packets only from 127.0.0.1. If this parameter is set to `yes', then amd 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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.27 nfs_allow_insecure_port Parameter

(type=string, default=`no'). Normally Amd will refuse requests coming from unprivileged ports (i.e., ports >= 1024 on Unix systems), so that only privileged users and the kernel can send NFS requests to it. However, some kernels (certain versions of Darwin, MacOS X, and Linux) have bugs that cause them to use unprivileged ports in certain situations, which causes Amd to stop dead in its tracks. This parameter allows Amd to operate normally even on such systems, at the expense of a slight decrease in the security of its operations. If you see messages like "ignoring request from foo:1234, port not reserved" in your Amd log, try enabling this parameter and give it another go.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.28 nfs_proto Parameter

(type=string, default to trying version tcp then udp). By default, Amd tries tcp and then udp. This option forces the overall NFS protocol used to TCP or UDP. It overrides what is in the Amd maps, and is useful when Amd is compiled with TCP support in NFSv2/NFSv3 that may not be stable. With this option you can turn off the complete usage of TCP for NFS dynamically (without having to recompile Amd), and use UDP only, until such time as TCP support is desired again.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.29 nfs_retransmit_counter Parameter

(type=numeric, default=11). Same as the retransmit part of the -t timeout.retransmit option to Amd. Specifies the number of NFS retransmissions that the kernel will use to communicate with Amd using either UDP or TCP mounts. See section -t timeout.retransmit.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.30 nfs_retransmit_counter_udp Parameter

(type=numeric, default=11). Same as the nfs_retransmit_counter parameter, but applied globally only to UDP mounts. See section nfs_retransmit_counter Parameter.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.31 nfs_retransmit_counter_tcp Parameter

(type=numeric, default=11). Same as the nfs_retransmit_counter parameter, but applied globally only to TCP mounts. See section nfs_retransmit_counter Parameter.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.32 nfs_retransmit_counter_toplvl Parameter

(type=numeric, default=11). Same as the nfs_retransmit_counter parameter, applied only for Amd's top-level UDP mounts. On some systems it is useful to set this differently than the OS default, so as to better tune Amd's responsiveness under heavy scheduler loads. See section nfs_retransmit_counter Parameter.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.33 nfs_retry_interval Parameter

(type=numeric, default=8). Same as the timeout part of the -t timeout.retransmit option to Amd. Specifies the NFS timeout interval, in tenths of seconds, between NFS/RPC retries (for UDP or TCP). This is the value that the kernel will use to communicate with Amd. See section -t timeout.retransmit.

Amd 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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.34 nfs_retry_interval_udp Parameter

(type=numeric, default=8). Same as the nfs_retry_interval parameter, but applied globally only to UDP mounts. See section nfs_retry_interval Parameter.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.35 nfs_retry_interval_tcp Parameter

(type=numeric, default=8). Same as the nfs_retry_interval parameter, but applied globally only to TCP mounts. See section nfs_retry_interval Parameter.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.36 nfs_retry_interval_toplvl Parameter

(type=numeric, default=8). Same as the nfs_retry_interval parameter, applied only for Amd's top-level UDP mounts. On some systems it is useful to set this differently than the OS default, so as to better tune Amd's responsiveness under heavy scheduler loads. See section nfs_retry_interval Parameter.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.37 nfs_vers Parameter

(type=numeric, default to trying version 3 then 2). By default, Amd tries version 3 and then version 2. This option forces the overall NFS protocol used to version 3 or 2. It overrides what is in the Amd maps, and is useful when 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), and use NFSv2 only, until such time as NFSv3 support is desired again.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.38 nis_domain Parameter

(type=string, default to local NIS domain name). Same as the -y option to Amd. 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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.39 normalize_hostnames Parameter

(type=boolean, default=`no'). Same as the -n option to Amd. 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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.40 normalize_slashes Parameter

(type=boolean, default=`yes'). If `yes' then amd will condense all multiple / (slash) characters into one and remove all trailing slashes. If `no', then amd 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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.41 os Parameter

(type=string, default to compiled in value). Same as the -O option to Amd. 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 built-in name is `sunos5', you can override it to `sos5', and use older maps which were written with the latter in mind.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.42 osver Parameter

(type=string, default to compiled in value). Same as the -o option to Amd. Allows you to override 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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.43 pid_file Parameter

(type=string, default=`/dev/stdout'). Specify a file to store the process ID of the running daemon into. If not specified, Amd will print its process id onto the standard output. Useful for killing Amd after it had run. Note that the PID of a running Amd can also be retrieved via Amq (see section Amq -p option).

This file is used only if the `print_pid' option is on (see section print_pid Parameter).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.44 plock Parameter

(type=boolean, default=`yes'). Same as the -S option to Amd. 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 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).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.45 portmap_program Parameter

(type=numeric, default=300019). Specify an alternate Port-mapper RPC program number, other than the official number. This is useful when running multiple Amd processes. For example, you can run another Amd 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. Amq 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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.46 preferred_amq_port Parameter

(type=numeric, default=0). Specify an alternate Port-mapper RPC port number for Amd's Amq service. This is used for both UDP and TCP. Setting this value to 0 (or not defining it) will cause Amd to select an arbitrary port number. Setting the Amq RPC service port to a specific number is useful in firewalled or NAT'ed environments, where you need to know which port Amd will listen on.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.47 print_pid Parameter

(type=boolean, default=`no'). Same as the -p option to Amd. If `yes', Amd will print its process ID upon starting.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.48 print_version Parameter

(type=boolean, default=`no'). Same as the -v option to Amd, 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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.49 restart_mounts Parameter

(type=boolean, default=`no'). Same as the -r option to Amd. 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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.50 show_statfs_entries Parameter

(type=boolean), default=`no'). If `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).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.51 truncate_log Parameter

(type=boolean), default=`no'). If `yes', then Amd will truncate the log file (if it's a regular file) on startup. This could be useful when conducting extensive testing on Amd maps (or Amd itself) and you don't want to see log data from a previous run in the same file.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.52 unmount_on_exit Parameter

(type=boolean, default=`no'). If `yes', then Amd will attempt to unmount all file systems which it knows about. Normally it 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 is used (see section restart_mounts Parameter).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.53 use_tcpwrappers Parameter

(type=boolean), default=`yes'). If `yes', then amd will use the tcpwrappers (tcpd/librwap) library (if available) to control access to Amd via the /etc/hosts.allow and /etc/hosts.deny files. Amd will verify that the host running Amq is authorized to connect. The amd service name must used in the /etc/hosts.allow and /etc/hosts.deny files. For example, to allow only localhost to connect to Amd, add this line to /etc/hosts.allow:

 
amd: localhost

and this line to /etc/hosts.deny:

 
amd: ALL

Consult the man pages for hosts_access(5) for more information on using the tcpwrappers access-control library.

Note that in particular, you should not configure your hosts.allow file to spawn a command for Amd: that will cause Amd to not be able to waitpid on the child process ID of any background un/mount that Amd issued, resulting in a confused Amd that does not know what happened to those background un/mount requests.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.5.54 vendor Parameter

(type=string, default to compiled in value). The name of the vendor of the operating system. Overrides the compiled-in vendor name. Useful when the compiled-in name is not desired. For example, most Intel based systems set the vendor name to `unknown', but you can set it to `redhat'.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.6 Regular Map Parameters

The following parameters are applicable only to regular map sections.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.6.1 map_name Parameter

(type=string, must be specified). Name of the map where the keys are located.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.6.2 tag Parameter

(type=string, default no tag). Each map entry in the configuration file can be tagged. If no tag is specified, that map section will always be processed by Amd. If it is specified, then Amd will process the map if the -T option was given to Amd, and the value given to that command-line option matches that in the map section.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.7 amd.conf Examples

The following is the actual amd.conf file I used at the Computer Science Department of Columbia University.

 
# GLOBAL OPTIONS SECTION
[ global ]
normalize_hostnames =    no
print_pid =              no
#pid_file =              /var/run/amd.pid
restart_mounts =         yes
#unmount_on_exit =       yes
auto_dir =               /n
log_file =               /var/log/amd
log_options =            all
#debug_options =         defaults
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
fully_qualified_hosts =  no

# 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

[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Erez Zadok on November, 27 2006 using texi2html 1.76.