Whole document tree
7. Run-time Administration
7.1 Starting AmdAmd is best started from `/etc/rc.local' on BSD systems, or from the appropriate start-level script in `/etc/init.d' on System V systems.
The shell script, `ctl-amd' is used to start, stop, or restart Amd. It is a relatively generic script. All options you want to set should not be made in this script, but rather updated in the `amd.conf' file. See section 6. Amd Configuration File. If you do not wish to use an Amd configuration file, you may start Amd manually. For example, getting the map entries via NIS:
7.2 Stopping AmdAmd stops in response to two signals.
Actions taken for other signals are undefined. The easiest and safest way to stop Amd, without having to find its process ID by hand, is to use the `ctl-amd' script, as with:
7.3 Restarting AmdBefore Amd can be started, it is vital to ensure that no other Amd processes are managing any of the mount points, and that the previous process(es) have terminated cleanly. When a terminating signal is set to Amd, the automounter does not terminate right then. Rather, it starts by unmounting all of its managed mount mounts in the background, and then terminates. It usually takes a few seconds for this process to happen, but it can take an arbitrarily longer time. If two or more Amd processes attempt to manage the same mount point, it usually will result in a system lockup. The easiest and safest way to restart Amd, without having to find its process ID by hand, sending it the `SIGTERM' signal, waiting for Amd to die cleanly, and verifying so, is to use the `ctl-amd' script, as with:
The script will locate the process ID of Amd, kill it, and wait for it to die cleanly before starting a new instance of the automounter. `ctl-amd' will wait for a total of 30 seconds for Amd to die, and will check once every 5 seconds if it had.
7.4 Controlling AmdIt is sometimes desirable or necessary to exercise external control over some of Amd's internal state. To support this requirement, Amd implements an RPC interface which is used by the Amq program. A variety of information is available. Amq generally applies an operation, specified by a single letter option, to a list of mount points. The default operation is to obtain statistics about each mount point. This is similar to the output shown above but includes information about the number and type of accesses to each mount point.
7.4.1 Amq default informationWith no arguments, Amq obtains a brief list of all existing mounts created by Amd. This is different from the list displayed by df(1) since the latter only includes system mount points. The output from this option includes the following information:
For example:
If an argument is given then statistics for that volume name will be output. For example:
7.4.2 Amq
|
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
-h
option
By default the local host is used. In an HP-UX cluster the root server
is used since that is the only place in the cluster where Amd will
be running. To query Amd on another host the -h
option should
be used.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
-H
option Print a brief help and usage string.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
-l
option Tell Amd to use log_file as the log file name. For security reasons, this must be the same log file which Amd used when started. This option is therefore only useful to refresh Amd's open file handle on the log file, so that it can be rotated and compressed via daily cron jobs.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
-m
option
The -m
option displays similar information about mounted
filesystems, rather than automount points. The output includes the
following information:
For example:
"root" truth:(pid602) root 1 localhost is up hesiod.home /home toplvl 1 localhost is up hesiod.vol /vol toplvl 1 localhost is up hesiod.homes /homes toplvl 1 localhost is up amy:/home/amy /a/amy/home/amy nfs 5 amy is up swan:/home/swan /a/swan/home/swan nfs 0 swan is up (Permission denied) ex:/home/ex /a/ex/home/ex nfs 0 ex is down |
When the reference count is zero the filesystem is not mounted but the mount point and server information is still being maintained by Amd.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
-p
option Return the process ID of the remote or locally running Amd. Useful when you need to send a signal to the local Amd process, and would rather not have to search through the process table. This option is used in the `ctl-amd' script.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
-P
option Contact an alternate running Amd that had registered itself on a different RPC program_number and apply all other operations to that instance of the automounter. This is useful when you run multiple copies of Amd, and need to manage each one separately. If not specified, Amq will use the default program number for Amd, 300019. For security reasons, the only alternate program numbers Amd can use range from 300019 to 300029, inclusive.
For example, to kill an alternate running Amd:
kill `amq -p -P 300020` |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
-s
option
The -s
option displays global statistics. If any other options are specified
or any filesystems named then this option is ignored. For example:
requests stale mount mount unmount deferred fhandles ok failed failed 1054 1 487 290 7017 |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
-T
option
The -T
option causes the Amq to contact Amd using the TCP
transport only (connection oriented). Normally, Amq will use TCP
first, and if that failed, will try UDP.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
-U
option
The -U
option causes the Amq to contact Amd using the UDP
transport only (connectionless). Normally, Amq will use TCP first,
and if that failed, will try UDP.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
-u
option
The -u
option causes the time-to-live interval of the named mount
points to be expired, thus causing an unmount attempt. This is the only
safe way to unmount an automounted filesystem. It is not possible to
unmount a filesystem which has been mounted with the `nounmount'
flag.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
-v
option
The -v
option displays the version of Amd in a similar way to
Amd's -v
option.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
-w
option
The -w
option translates a full pathname as returned by
getpwd(3) into a short Amd pathname that goes through its mount
points. This option requires that Amd is running.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Two other operations are implemented. These modify the state of Amd
as a whole, rather than any particular filesystem. The -x
and
-D
options have exactly the same effect as Amd's corresponding
command line options.
When Amd receives a -x
flag it limits the log options being
modified to those which were not enabled at startup. This prevents a
user turning off any logging option which was specified at
startup, though any which have been turned on since then can still be
turned off. The -D
option has a similar behavior.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |