Starting and Stopping the Automounter

Starting and Stopping the Automounter

Starting and stopping the automounter is normally handled by your system at boot and shutdown time, and you will not have to start and stop the automounter manually if you make changes to any of its map files.

The automount daemon is typically started from /etc/init.d/autofs during the multiuser startup, with a command like the following:

# /etc/init.d/autofs start

This should start the automounter. You can confirm that it started correctly by using the following command:

# /bin/ps -ef | grep automountd

The output should look like the following:

root 21642     1  0 11:27:29 ?        0:00 /usr/lib/autofs/automountd

If you receive no output, the automounter has not started correctly. In that case, you should run the startup script again.

Stopping the NFS client is similar to starting it:

# /etc/init.d/autofs stop

The stop script usually stops the automounter, but you can confirm this using the following command:

# /bin/ps -ef | grep automountd

This is the same command that is used to check to see if the automounter is running, except that once you stop it, this command should not produce any output. If you do see some output and it contains a grep command, you can ignore those lines. Any other output indicates that the automounter has not stopped, in which case you should execute the NFS client stop command again.

If you receive a message similar to the following

/home: busy

then you will need to determine if anyone is logged on to the system and is using files from /home. If you cannot determine this, you can use the following command to get a list of all of the mounted directories in the directory that caused the error message (in this case /home):

$ df -k -F nfs
/home/jdoe

Just replace /home with the name of the directory that produced the error message. In this case, only one directory, /home/jdoe, was automounted. Once you have a list of these directories, try unmounting each one with the umount command. When you receive an error message, you will know which directory contains the files that are in use. You can ask the user to finish with those files, and then proceed to stop the automounter.



Part I: Solaris 9 Operating Environment, Exam I