Automounter 1 3

Posted on  by

You need to configure autofs manually by editing its configuration files with a text editor, such as vim. There are two basic steps to configure autofs—the master map file, and specific map files.

AutoMounter is here to make your life easier, intelligently managing your NAS servers and shares, ensuring your shares and files are always accessible and ready to use. Multiple Servers. Configure as many servers and shares as you like. AutoMounter will keep track of them all. You can even configure multiple of the same server if you. Disk /dev/sdc: 2000.3 GB, 752 bytes 255 heads, 63 sectors/track, 243201 cylinders Units = cylinders of 16065. 512 = 8225280 bytes Disk identifier: 0x001425a0 Device Boot Start End Blocks Id System /dev/sdc1 1 2512001 b W95 FAT32.

The default master configuration file for autofs is /etc/auto.master. You can change its location by changing the value of the DEFAULT_MASTER_MAP_NAME option in /etc/sysconfig/autofs. Here is the content of the default one for SUSE Linux Enterprise Server:

The autofs manual page (man 5 autofs) offers a lot of valuable information on the format of the automounter maps.

Although commented out (#) by default, this is an example of a simple automounter mapping syntax.

In case you need to split the master map into several files, uncomment the line, and put the mappings (suffixed with .autofs) in the /etc/auto.master.d/ directory.

+auto.master ensures that those using NIS (see Section 3.1, “Configuring NIS Servers” for more information on NIS) will still find their master map.

Entries in auto.master have three fields with the following syntax:

mount point

The base location where to mount the autofs file system, such as /home.

map name

The name of a map source to use for mounting. For the syntax of the maps files, see Section 30.2.2, “Map Files”.

options

These options (if specified) will apply as defaults to all entries in the given map.

Tip: For More Information
Automounter

For more detailed information on the specific values of the optional map-type, format, and options, see the auto.master manual page (man 5 auto.master).

The following entry in auto.master tells autofs to look in /etc/auto.smb, and create mount points in the /smb directory.

Direct mounts create a mount point at the path specified inside the relevant map file. Instead of specifying the mount point in auto.master, replace the mount point field with /-. For example, the following line tells autofs to create a mount point at the place specified in auto.smb:

Tip: Maps without Full Path

If the map file is not specified with its full local or network path, it is located using the Name Service Switch (NSS) configuration:

Important: Other Types of Maps

Although files are the most common types of maps for auto-mounting with autofs, there are other types as well. A map specification can be the output of a command, or a result of a query in LDAP or database. For more detailed information on map types, see the manual page man 5 auto.master.

Map files specify the (local or network) source location, and the mount point where to mount the source locally. The general format of maps is similar to the master map. The difference is that the options appear between the mount point and the location instead of at the end of the entry:

Make sure that map files are not marked as executable. You can remove the executable bits by executing chmod -x MAP_FILE.

mount point

Specifies where to mount the source location. This can be either a single directory name (so-called indirect mount) to be added to the base mount point specified in auto.master, or the full path of the mount point (direct mount, see Section 30.2.1.1, “Direct Mounts”).

options

Specifies optional comma-separated list of mount options for the relevant entries. If auto.master contains options for this map file as well, theses are appended.

Automounter 1 3 0

location

Automounter 1 3/4

Specifies from where the file system is to be mounted. It is usually an NFS or SMB volume in the usual notation host_name:path_name. If the file system to be mounted begins with a '/' (such as local /dev entries or smbfs shares), a colon symbol ':' needs to be prefixed, such as :/dev/sda1.