Autofs program example




















The mount-point entry in auto. For example, the following line instructs autofs to create a mount-point at the place specified in auto. Map Files As indicated above, each autofs mount has its own map file. These files are usually named using the convention auto.

Map files take the following format: key [-options] location 4. This howto assumes that you are already familiar with NFS exports, and that you already have a properly-functioning NFS share on your network.

You have a functioning NFS mount via autofs! If you want to learn some more advanced information, keep reading. But remember that you need to access a directory before it is auto-mounted. Once it has been accessed, your share will be listed only until it times out.

This is good to keep in mind, as it could save you time diagnosing an autofs problem that isn't really there. If you have a lot of NFS or Samba shares, you may want to uncomment these lines. In an environment with NFS file servers, such a configuration can be useful. However, if you need to authenticate before accessing the Samba share, automount will not function. Whenever supplied, these are the mount options for the map entries that do not specify their own options. The first column in a map file indicates the autofs mount point sales and payroll from the server called personnel.

The second column indicates the options for the autofs mount while the third column indicates the source of the mount. The automounter create the directories if they do not exist. If the directories exist before the automounter was started, the automounter will not remove them when it exits. If a timeout is specified, the directory is automatically unmounted if the directory is not accessed for the timeout period.

Overriding or Augmenting Site Configuration Files. It can be useful to override site defaults for a specific mount point on a client system. For example, consider the following conditions:. Given these conditions, let's assume that the client system needs to override the NIS map auto. Alternatively, to augment the site-wide auto.

At the end, include the NIS auto. With these NIS auto. This last example works as expected because autofs does not include the contents of a file map of the same name as the one it is reading. As such, autofs moves on to the next map source in the nsswitch configuration. On Red Hat Enterprise Linux, the openldap package should be installed automatically as a dependency of the automounter.

The most recently established schema for storing automount maps in LDAP is described by rfcbis. For example:. Everything that follows until the end of the line is ignored. The maximum number of characters of an entry is If the same mount point is used in two entries, the first entry is used by the automount command.

The second entry is ignored. These defaults can be overridden by entries in the NIS auto. This is a built-in map that uses only the hosts database. For example, if the computer gumbo is in the hosts database and it exports any of its file systems, the command:.

Autofs can mount only the exported file systems of host gumbo , that is, those on a server available to network users as opposed to those on a local disk. If you want to move an exported file system from one server to another, the path might no longer work. Autofs checks the server's export list only at mount time. After a server's file systems are mounted, autofs does not check with the server again until the server's file systems are automatically unmounted.

Therefore, newly exported file systems are not "seen" until the file systems on the client are unmounted and then remounted. This mount point provides the autofs directory structure for the resources that are shared through the FNS name space see the Solaris Naming Setup and Configuration Guide for more information about FNS.

A direct map is an automount point. With a direct map, there is a direct association between a mount point on the client and a directory on the server.



0コメント

  • 1000 / 1000