名称(NAME)
/etc/auto.master - automounter的主映射文件
描述(DESCRIPTION)
当机器启动自动挂载器时, autofs(8) 脚本就会查寻 auto.master 这个主映射文件。文件中的每行分别指明,一个挂载点以及与对应的需要被挂载的文件系统。通过key来控制对其它映射文件的读取。 通常用以下方式进入一个已被自动挂载了的文件系统 /mountpoint/key/path/file, mountpoint 列在了 auto.master 主映射文件中。 key 与主映射文件中列出的其它映射文件中的key值相同。(参看 autofs(5))。 path和file与被挂载的文件系统中的具体文件名有关。
格式(FORMAT)
这个文件分为三个区域,以空格或制表符分隔。以“#”开头的行代表注释。第一块区域定义了mount point 。第二块定义了与mount point相关的映射文件,这一区域的内容以这种形式 maptype:mapname 出现, maptype 是系统支持的映射类型中的一种 (file, program, yp, nisplus, hesiod, userdir, ldap), mapname 是映射文件的文件名。第三块区域是可选的,它包含了其它你想使用的其它选项。这些选项可以叠加,这一点跟 SunOS中自动挂载器(automounter)的执行方式不同。
有关第三块区域中具体的可用选项,以及非主映射文件的格式可以看一下 autofs(5).
范例(EXAMPLE)
-
/home /etc/auto.home /misc /etc/auto.misc /mnt yp:mnt.map
主映射文件生成了三个挂载点 /home, /misc, 以及 /mnt。 所有对 /home 的访问请求将被发送至 /etc/auto.home 映射文件做进一步的处理。所有对 /misc 的访问请求将被发送至 /etc/auto.misc 映射文件做进一步的处理,而所有对 /mnt 的访问请求将会查寻NIS上的 mnt.map 映射文件。
参看(SEE ALSO)
automount(8), autofs(5), autofs(8).
#p#
NAME
/etc/auto.master - Master Map for automounter
DESCRIPTION
The auto.master map is consulted when the autofs(8) script is invoked to set up the necessary mount points for the automounter. Each line in this file describes a mount point and points to another file describing the file systems to be mounted under this mountpoint. The access to those maps is governed by a key. For indirect automount maps access to an automounted file system is customarily done using the path scheme: /mountpoint/key/path/file, where the mountpoint will be listed in the auto.master configuration file. The key is matched in the map file pointed to by the master map (See autofs(5)). The path and the file are referring to the file on the file system mounted. For direct automount maps access is via the full path to the filesystem as given in the associated map. The mountpoint for the direct map is always specified as /- in the auto.master map.
FORMAT
The file has three fields separated by an arbitrary number of blanks or tabs. Lines beginning with # are comments. The first field is the mount point. Second field is the map file to be consulted for this mount-point. This field is of the form maptype:mapname, where maptype is one of the supported map types (file, program, yp, nisplus, hesiod, userdir, ldap), and mapname is the name of the map. The third field is optional and can contain options to+ be applied to all entries in the map. Options are cumulative, which is a difference from the behavior of the SunOS automounter.
The format of the map file and the options are described in autofs(5).
EXAMPLE
-
/home /etc/auto.home /misc /etc/auto.misc /mnt yp:mnt.map
This will generate three mountpoints /home, /misc, and /mnt. All accesses to /home will lead to the consultation of the map in /etc/auto.home, all accesses to /misc will consult the map in /etc/auto.misc, and all accesses to /mnt will consult the NIS map mnt.map.
SEE ALSO
automount(8), autofs(5), autofs(8).