automount
Command
This command installs autofs mount points and associates the information in the automaster files with each mount point. The syntax of the command is as follows:
automount [-t duration] [-v]
-t
duration sets the time, in seconds, that a file system is to remain mounted, and -v
selects the verbose mode. Running this command in the verbose mode allows for easier troubleshooting.
If not specifically set, the value for duration is set to 5 minutes. In most circumstances, this value is good. However, on systems that have many automounted file systems, you might need to increase the duration value. In particular, if a server has many users active, checking the automounted file systems every 5 minutes can be inefficient. Checking the autofs file systems every 1800 seconds, which is 30 minutes, could be more optimal. By not unmounting the file systems every 5 minutes, /etc/mnttab
can become large. To reduce the output when df
checks each entry in /etc/mnttab
, you can filter the output from df
by using the -F
option (see the
df
(8) man page) or by using egrep
.
You should consider that adjusting the duration also changes how quickly changes to the automounter maps are reflected. Changes cannot be seen until the file system is unmounted. Refer to Modifying Autofs Maps for instructions on how to modify automounter maps.
You can make the same specifications with the sharectl
command that you would make on the command line. However, unlike the command-line options, the SMF repository preserves your specifications, through service restarts and system reboots, as well as system upgrades. You can set the following parameters for the automount
command.
-
timeout
-
Sets the duration for a file system to remain idle before the file system is unmounted. This keyword is the equivalent of the
-t
argument for theautomount
command. The default value is 600. -
automount_verbose
-
Provides notification of autofs mounts, unmounts, and other nonessential events. This keyword is the equivalent of the
-v
argument forautomount
. The default value isFALSE
.