Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   auto.master    ( 5 )

мастер карта для автомонтирования, консультируемая autofs (Master Map for automounter consulted by autofs)

Формат (Format)

Master map entries have three fields separated by an arbitrary number of spaces or tabs. Lines beginning with # are comments. The first field is the mount point described above and the second field is the name of the map to be consulted for the mount point followed by the third field which contains options to be applied to all entries in the map.

The format of a master map entry is:

mount-point [map-type[,format]:]map [options]

mount-point Base location for the autofs filesystem to be mounted. For indirect maps this directory will be created (as with mkdir -p) and is removed when the autofs filesystem is umounted.

map-type Type of map used for this mount point. The following are valid map types:

file The map is a regular text file.

program The map is an executable program, which is passed a key on the command line and returns an entry (everything besides the key) on stdout if successful. Optinally, the keyword exec may be used as a synonym for program to avoid confusion with amd formated maps mount type program.

yp The map is a NIS (YP) database.

nisplus The map is a NIS+ database.

hesiod The map is a hesiod database whose filsys entries are used for maps.

ldap or ldaps The map is stored in an LDAP directory. If ldaps is used the appropriate certificate must be configured in the LDAP client.

multi This map type allows the specification of multiple maps separated by "--". These maps are searched in order to resolve key lookups.

dir This map type can be used at + master map including notation. The contents of files under given directory are included to the master map. The name of file to be included must be ended with ".autofs". A file will be ignored if its name is not ended with the suffix. In addition a dot file, a file which name is started with "." is also ignored.

format Format of the map data; currently the formats recognized are sun, which is a subset of the Sun automounter map format, hesiod, for hesiod filesys entries and amd for amd formated map entries. If the format is left unspecified, it defaults to sun for all map types except hesiod unless it is a top level amd mount that has a configuration entry for the mount point path, in which case the format used is amd.

map Name of the map to use. This is an absolute UNIX pathname for maps of types file, dir, or program, and the name of a database in the case for maps of type yp, nisplus, or hesiod or the dn of an LDAP entry for maps of type ldap.

options Any remaining command line arguments without leading dashes (-) are taken as options (-o) to mount. Arguments with leading dashes are considered options for the maps and are passed to automount (8).

The sun format supports the following options:

-Dvariable=value Replace variable with value in map substitutions.

-strict Treat errors when mounting file systems as fatal. This is important when multiple file systems should be mounted (`multimounts'). If this option is given, no file system is mounted at all if at least one file system can't be mounted.

[no]browse This is an autofs specific option that is a pseudo mount option and so is given without a leading dash. Use of the browse option pre-creates mount point directories for indirect mount maps so the map keys can be seen in a directory listing without being mounted. Use of this option can cause performance problem if the indirect map is large so it should be used with caution. The internal program default is to enable browse mode for indirect mounts but the default installed configuration overrides this by setting BROWSE_MODE to "no" because of the potential performance problem. This option does the same as the deprecated --ghost option, the browse option is preferred because it is used by other autofs implementations.

nobind This is an autofs specific option that is a pseudo mount option and so is given without a leading dash. It may be used either in the master map entry (so it effects all the map entries) or with individual map entries to prevent bind mounting of local NFS filesystems. For direct mount maps the option is only effective if specified on the first direct map entry and is applied to all direct mount maps in the master map. It is ignored if given on subsequent direct map entries. It may be used on individual map entries of both types. Preventing bind mounts of NFS file systems can no longer be done by using the "port=" option, the nobind option must be used instead.

symlink This option makes bind mounting use a symlink instead of an actual bind mount. It is an autofs specific option that is a pseudo mount option and so is given without a leading dash. It may be used with indirect map entries only, either in the master map (so it effects all map entries) or with individual map entries. The option is ignored for direct mounts and non-root offest mount entries.

strictexpire Use a strict expire policy for this automount. Using this option means that last use of autofs directory entries will not be updated during path walks so that mounts in an automount won't be kept mounted by applications scanning the mount tree. Note that this doesn't completely resolve the problem of expired automounts being immediately re- mounted due to application accesses triggered by the expire itself.

slave, private or shared This option allows mount propagation of bind mounts to be set to slave, private or shared. This option defaults to slave if no option is given. When using multi-mounts that have bind mounts the bind mount will have the same properties as its parent which is commonly propagation shared. And if the mount target is also propagation shared this can lead to a deadlock when attempting to access the offset mounts. When this happens an unwanted offset mount is propagated back to the target file system resulting in a deadlock since the automount target is itself an (unwanted) automount trigger. This option is an autofs pseudo mount option that can be used in the master map only.

-r, --random-multimount-selection Enables the use of random selection when choosing a host from a list of replicated servers. This option is applied to this mount only, overriding the global setting that may be specified on the command line.

-w, --use-weight-only Use only specified weights for server selection where more than one server is specified in the map entry. If no server weights are given then each available server will be tried in the order listed, within proximity.

-t, --timeout <seconds> Set the expire timeout for map entries. This option can be used to override the global default given either on the command line or in the configuration.

-n, --negative-timeout <seconds> Set the timeout for caching failed key lookups. This option can be used to override the global default given either on the command line or in the configuration.

--mode <octal_mode> Set the directory mode for the base location of the autofs mount point. If this option is given, autofs will chmod that directory with this mode.