autofs - automounter maps format

Description (DESCRIPTION)

Maps automounter map file is a series of non-primary or NIS maps (NIS maps), which are the main automounter map file (master map) the specific call (See the auto.master (. 5)). automounter maps described specifically listed in the main mount point map file (the auto.master) of how they are mounted. This document covers only similar to the sun system non-primary map file formats under; if the other format is specified (for example: hesiod ), then this document does not apply. These non-primary map file can be modified and automounter will immediately recognize when they file the next time dealing with these maps. But the master map file auto.master can not do this.

Format (FORMAT)

This is just a format of the text file, perhaps there are other formats. All blank lines and "#" character begins the line will be ignored. In a basic format of each mapping file row looks as follows: Key [-options] LOCATION

 

key

Is part of the directory name, the file system path and between points located in the mount is mounted. Usually you can "key" seen as a subdirectory under the mount point is located.

options

options are optional. It also can auto.master explicitly given in. In that case, two options can add up (This is different from the SunOS). It is a set of options and mount the same command (8) in the list of options, separated by commas. However, there is a special option -fstype = , which is used to specify the type of a file system (if you want to mount the NFS file system is not the case). This particular option can only be handled by automounter, mount can not be used. (Note: automounter commonly used to automatically mount NFS volumes, but can also be used to mount the user's own hard disk boot directly to a personal feel to write in fstab convenient than in all a matter of opinion, it optional.)

location

specify the location to mount the file system is where he comes from. In most cases this will be an NFS volume, usually host: pathname to indicate that the remote file system and the path will be mounted. If the file system to be mounted on a "/" at the beginning (such as a local file to the file system / dev or an smb file sharing), you would need to add one in the front ":" (eg : / dev / sda1 ) .

example

 

-EN kernel, software, in ftp.kernel.org:/pub/linux
boot      -fstype=ext2        :/dev/hda1
windoze   -fstype=smbfs       ://windoze/c
removable -fstype=ext2        :/dev/hdd
cd        -fstype=iso9660,ro  :/dev/hdc
floppy    -fstype=auto        :/dev/fd0

The first line, we have one from ftp.kernel.org kernel directory to mount a remote NFS volumes. This is a read-only installation. The second line mounted the ext2 partition on a local disk ide. The third line to mount a samba shared directory on a Windows system. The rest should be self-evident a.

Characteristics (FEATURES)

Mapping alternatives (Map Key Substitution)

In the location where the "&" character can be used in place of key values, "&" will be automatically expanded as with the key to the same value (this character may be used with only the necessary and following wildcards)

Wildcards (Wildcard Key)

In the key in the "*" character matches any key. Here is a useful example:

 

*         &:/home/&

This enables you to / mountpoint / hostname / local-path into the main directory of all local hosts in this way.

Variable substitution (Variable Substitution)

The following special variables if these appear in the key or location and in front of a "$", can be replaced with the appropriate content, just like in a shell script. Can be a pair of "{}" (curly braces) to separate the "name field" (fieldName)

 

ARCH           Architecture (uname -m)
CPU            Processor Type
HOST           Hostname (uname -n)
OSNAME         Operating System (uname -s)
OSREL          Release of OS (uname -r)
OSVERS         Version of OS (uname -v)

With the automount (. 8) the Value = -D variable can define more replacement items.

Executable Maps (Executable Maps)

A map can be marked as executable. Passing the master map file (auto.master) init scripts will launch the executable mapping as a program map to the automounter. Mapping program will be like a shell script that is executed with, "key" as a parameter. If you can not find the key, the script will output only one line of script files or simply nothing at all. To imagine doing the above words, automount (8) daemon must be started in a program form, rather than in file form. In automount's initialization script contains this setting. An executable map can return an error code to indicate an error, or nothing is displayed. All contents are sent to standard error log recorded by the system.

Unsupported Features (UNSUPPORTED)

automounter does not support direct mount (Note: automount utility must have found a key for the job, if omitted, then it can not be installed successfully) or mount tree (with automatic mount point to mount a designated more than one file system ), and do not support processing SunOS reusable type file system (replicated filesystem). This is only Mount (8) is supported. 

Guess you like

Origin www.cnblogs.com/fanweisheng/p/11076456.html