9    Network File System

The Network File System (NFS) is a facility for sharing files in a heterogeneous environment. This chapter describes:

For introductory information on NFS, see nfs_intro(7). For troubleshooting information, see Section 14.11 for clients and Section 14.10 for servers.

9.1    NFS Environment

In the NFS environment, systems can have the following roles:

Your system can be set up as an NFS server, a WebNFS server, an NFS client, or all three.

9.1.1    Distributing the hosts Database

If your network is running NIS or Berkeley Internet Name Domain (BIND) to distribute host information, you do not need to list each server that is referenced in a client's /etc/fstab file in the client's local /etc/hosts file. However, the server's host information must be in the NIS or BIND database.

Similarly, if your network is running NIS or BIND to distribute host information and the client information is listed in the hosts database, you do not have to list each client that is referenced in a server's /etc/exports file in the server's local /etc/hosts file.

9.1.2    Automount and NFS

The automount daemon offers an alternative to mounting remote file systems with the /etc/fstab file, allowing you to mount them on an as-needed basis.

When a user on a system using the automount daemon invokes a command that must access a remotely mounted file or directory, the automount daemon mounts that file system or directory and keeps it mounted for as long as the user needs it. When a specified amount of time elapses (the default is 5 minutes) without the file system or directory being accessed, the automount daemon unmounts it.

You specify the file systems to be mounted in automount maps. These maps may be customized to suit your environment and administered in the following ways:

See Appendix B for information on writing automount maps.

9.1.2.1    NIS and automount Maps

NIS allows you to create and distribute customized maps and, typically, is used to distribute automount maps. Therefore, if NIS is used on your network to distribute automount maps, your system must be an NIS client. When NIS is used to distribute automount maps, the administrator of the NIS master server creates and administers the maps for the NIS domain.

If many clients in an environment remotely mount a file system by specifying it in their /etc/fstab file, that file system is a good candidate for inclusion in a map distributed by NIS. Carefully constructed automount maps can allow client systems to eliminate a large part of their /etc/fstab files. If the location of a file system that is included in a distributed automount map changes, or its server changes, the administrator of automount maps changes the map on the NIS master server. The change is then propagated throughout the domain without users on the client systems having to edit their /etc/fstab files.

See Section 8.3.1 for information on configuring a master NIS server to serve automount maps.

9.1.2.2    Local automount Maps

Local automount maps might be useful to you under the following circumstances:

Administering the automount daemon locally is the same as administering it when NIS distributes the maps, except that you, as administrator of your system, create and manage automount maps.

A local auto.master map serves the same function as one distributed in an NIS domain. If a local auto.master is specified, the automount daemon consults it for the location of other maps, their local mount points, and the mount options. You can use an auto.master map that is distributed by NIS, a local auto.master map, both, or neither, if the automount daemon is invoked correctly.

9.1.2.3    WebNFS

WebNFS is an NFS protocol that allows clients to access files over the Internet in the same way that local files are accessed. WebNFS uses a public file handle that allows it to work across a firewall. This public file handle also reduces the amount of time required to initialize a connection. The public file handle is associated with a single directory (public) on the WebNFS server. See exports(4), exportfs(2), and nfs_intro(4) for further information.

9.2    Planning NFS

Figure 9-1 shows the NFS Setup Worksheet, which you can use to record the information required to configure NFS. If you are viewing this manual online, you can use the print feature to print a copy of this worksheet. The following sections explain the information you need to record on the worksheet.

Figure 9-1:  NFS Setup Worksheet

9.2.1    Server

Number of nfsd TCP server threads

Enter the number of nfsd TCP server threads to run. These threads service requests from NFS clients. The default number of 8 is adequate for an average work load. You can configure a combined total of 0 to 128 TCP and UDP server threads. See nfsd(8) for information on starting the nfsd daemon from the command line.

Number of nfsd UDP server threads

Enter the number of nfsd UDP server threads to run. The default number of 8 is adequate for an average work load. You can configure a combined total of 0 to 128 TCP and UDP server threads. See nfsd(8) for information on starting the nfsd daemon from the command line.

Property lists

If you want to run the property list daemon, check Yes; otherwise, check No. The property list daemon allows the server to handle requests to get, set, or delete the property lists associated with NFS-served file system objects. See proplistd(8) and proplist(4).

NFS locking

If you want to run the NFS lock manager (rpc.lockd) and status monitor (rpc.statd), check Yes. Running these daemons allows users to use fcntl(2) and lockf(3) to lock file regions on NFS files (in addition to local files). If you do not run these daemons, users can use advisory locking primitives only on local files.

PC-NFS daemon

If you want to run the PC-NFS daemon (rpc.pcnfsd), check Yes; otherwise, check No. The PC-NFS daemon allows the server to handle NFS requests from PCs.

Allow nonroot mounts

If you allow nonroot mounts, users on client systems who do not have root privileges can still mount the file systems or directories exported from this system. If you do not allow nonroot mounts, only the superusers on the client systems can mount file systems from this host. The default setting does not allow nonroot mounts.

Address Verification

If you want the server to verify the Internet address of any host that requests an exported directory, check Yes; otherwise, check No. If you choose Yes and you also want to verify that the host is in the server's domain or subdomain, check Domain Checking, Subdomain Checking, or both.

Path name

The path name of the file systems or directories that you intend to export.

Permissions

The permissions to assign for each exported file system or directory. You can specify whether a file system or directory is exported with read-write (rw) or read-only (ro) permission, and you can map client superuser access to a root user ID (UID) number other than the default of -2. If you have a WebNFS server with the -public option set, the mount access list is ignored by the server so that all hosts using the WebNFS protocol have access to this directory. For more information on assigning permissions to exported file systems or directories and on specifically mapping the root UID for clients, see exports(4).

Network group/Node name

The network groups or individual host names to which you will export these file systems or directories. If you want to limit the hosts that can import a file system or directory, you must explicitly specify the individual hosts or network groups in the /etc/exports file. If you do not specify individual hosts or network groups, all hosts can import that file system or directory. For information on defining network groups, see netgroup(4).

9.2.2    Client

Number of I/O threads

The number of I/O threads to run. The default number of 7 is recommended for optimum load generation on servers. You can configure from 0 to 64 nfsiod threads.

In addition, you can start nfsiod threads from the command line. See nfsiod(8) for information on starting nfsiod threads from the command line.

NFS locking

If you want to run the NFS lock manager (rpc.lockd) and status monitor (rpc.statd), check Yes. Running these daemons allows users to use fcntl(2) and lockf(3) to lock file regions on NFS files (in addition to local files). If you do not run these daemons, users can use advisory locking primitives only on local files.

Automount

If the client is to run the automount daemon and use automount maps, check Yes. If the network is running the NIS, the automount maps are better administered and served from the NIS master server. The format of the maps is the same whether they are local or served by the NIS master server. For information on creating automount maps, see Appendix B.

If you do not want the client to run the automount daemon, check No.

Remote server name

The host names of the servers from which you are importing file systems or directories.

Directory path

The complete pathnames of the file systems or directories that you want to import.

Local mount point

The mount point on the local system where you want the imported file systems or directories to reside.

Read-only mount

The permissions for the imported file systems or directories

Note

If you mount your user area from a server, make sure that your UID on the client is the same as your UID on the server. NFS uses your client UID to check against file access permissions on the server. If your UID is different on the client and server, you cannot modify your own NFS mounted files (assuming that you have the permissions on the mounted files set so that only you can modify them). Since the server does the access checking, the only UID allowed to modify the files is the one that the server knows.

9.3    Configuring NFS

Use the SysMan Menu application of the Common Desktop Environment (CDE) Application Manager to configure NFS on clients and servers. To invoke the SysMan Menu application, follow the instructions in Section 1.1.1.

9.3.1    Configuring an NFS Server

To configure an NFS server, complete the following steps. If you want your system to import file systems, see Section 9.3.2 for information on configuring an NFS client.

  1. From the SysMan Menu, select Networking-->Additional Network Services-->Network File System (NFS)-->Configure system as an NFS server to display the Configure NFS Server dialog box.

    Alternatively, enter the following command on a command line:

    # /usr/bin/sysman nfs_server
    

  2. Enter the number of server TCP threads to be run in the appropriate field.

  3. Enter the number of server UDP threads to be run in the appropriate field.

  4. Select the Enable Property List Daemon check box if you want to run the property list daemon (proplistd).

  5. Deselect the Enable Locking check box if you do not want to run the NFS lock manager (rpc.lockd) and status monitor (rpc.statd) daemons. Locking is enabled by default.

  6. Select the Enable PC-NFS Daemon check button if you want to run the rpc.pcnfsd daemon.

    If you run the PC-NFS daemon, you must export to the client the directories you want to mount on the PC client. To enable the client to utilize network printing, you must export the /usr/spool/pcnfs directory to the PC client. For information on exporting directories, see Section 9.5.2.

  7. Select the Allow Nonroot Mounts check box if you want to allow users other than root to mount file systems.

  8. Deselect the Internet Address Verification check box if you do not want the mountd daemon to verify the IP address of each host requesting a mount or unmount. Internet Address Verification is enabled by default.

  9. Select the Internet Address Verification & Domain Checking check box to have the mountd daemon verify that the host requesting a mount or unmount is in the server's domain.

  10. Select the Internet Address Verification & Subdomain Checking check box to have the mountd daemon verify that the host requesting a mount or unmount is in the server's subdomain.

  11. Specify the directories you want to export by following steps 2 through 7 in Section 9.5.2.

  12. Select OK to validate your changes. The utility prompts you to start the NFS daemons.

  13. Select Yes to save your configuration, start the daemons, and apply the changes immediately; or select No to save your configuration, close the Configure NFS Server dialog box, and apply the changes the next time you reboot your system.

    If you choose Yes, you are informed that the NFS daemons have been started. Select OK to dismiss the message and to close the Configure NFS Server dialog box.

You can also modify or deconfigure your server configuration after the initial setup. See the online help and Section 9.4 for more information.

9.3.2    Configuring an NFS Client

To configure an NFS client, do the following:

  1. From the SysMan Menu, select Networking-->Additional Network Services-->Network File System (NFS)-->Configure system as an NFS client. The Configure NFS Client dialog box is displayed.

    Alternatively, enter the following command on a command line:

    # /usr/bin/sysman nfs_client
    

  2. Enter the number of client I/O threads to be run in the appropriate field.

  3. Select the Enable Locking check box to specify locking configuration if the status of the lockd daemon is Stopped. If the status of the daemon is Running, locking is already set.

  4. Select the Enable Automount Daemon check box to configure the automount daemon. See Section 9.1.2 for information on automount and Appendix B for information on automount maps.

  5. Enter appropriate arguments to the automount daemon in the Automount Arguments field. See Section 9.6.2.1 for more information.

  6. Specify the directories you want to import, those not already imported by automount, by following steps 2 through 10 in Section 9.6.1.

  7. Select OK to validate the changes. (Due to the myriad of automount arguments available to the user, the validation of these arguments is deferred until the automount daemon starts and verifies them.)

    You are asked if you would like to start or restart the NFS daemons.

  8. Select Yes to save the configuration, start the daemons, and apply your changes immediately; or select No to save the configuration, close the Configure NFS Client dialog box, and apply the changes the next time you reboot your system.

    If you choose Yes, you are informed that the NFS daemons have been started. Select OK to dismiss the message and to close the Configure NFS Client dialog box.

You can also modify or deconfigure your client configuration after the initial setup. See the online help and Section 9.4 for more information.

9.4    Deconfiguring NFS

You can use the SysMan Menu to deconfigure NFS servers and clients. When you deconfigure an NFS server or an NFS client, the corresponding NFS daemons stop and all of the corresponding NFS configuration information is deleted from the system. This action cannot be undone. To restore your NFS server or client, you must configure it again using the SysMan Menu.

When you deconfigure an NFS server, the client services are not removed. Likewise, when you deconfigure an NFS client, the server configuration is not removed. If you would like to deconfigure both the client and server configurations on a system, you must perform each action independently.

To deconfigure an NFS server, select Deconfigure system as an NFS Server from the SysMan Menu, or enter the following command on the command line:

# /usr/sbin/sysman nfs_deconfig_server

To deconfigure an NFS client, select Deconfigure system as an NFS Client from the SysMan Menu, or enter the following command on the command line:

# /usr/sbin/sysman nfs_deconfig_client

For both client and server, the Deconfigure NFS dialog box is displayed. Select Yes to deconfigure the service. You are informed that the service has been deconfigured. Select OK to dismiss the message and to close the dialog box.

9.5    Managing an NFS Server

This section describes how to perform the following NFS server tasks:

You might have to reconfigure NFS on your system, whether to make a client system a server system or to increase the number of NFS threads. See Section 9.3 for this information.

9.5.1    Export Guidelines

The /etc/exports file defines an export list for each file system and directory that a client can mount. When creating entries in the /etc/exports file, remember the following:

9.5.2    Exporting a File System or Directory

Exporting a file system or directory makes it available for client systems on the network to mount remotely. If you want your system to be an NFS server and to export file systems and directories, be aware that your system will be less secure. However, depending on how you export your files, you can minimize the security risks.

To export a file system by using the SysMan Menu, do the following:

  1. From the SysMan Menu, select Networking-->Additional Network Services-->Network File System (NFS)-->Configure system as an NFS server to display the Configure NFS Server dialog box.

    Alternatively, enter the following command on a command line:

    # /usr/bin/sysman nfs_server
    

  2. Select the Shared Local Directories button to display the Share Local Directory dialog box.

  3. Select Add to add a shared directory. The Add/Modify dialog box is displayed.

  4. Enter the full path name of the directory to be exported in the Share this Directory field.

  5. Select whether the directory has read/write or read-only access and whether all hosts or only selected hosts can have access. By default, the directory is exported with read/write permissions to all hosts.

    If you choose Selected in either the Read/Write or Read-Only dialog box, enter the name of each host that can have access to this directory in the appropriate field. Select Add for each host.

  6. Select OK to validate the entry and to close the Add/Modify dialog box. Repeat steps 3 through 6 for additional directories.

  7. Select OK to save the list of directories you chose to export in the /etc/exports file. You are informed that the changes have been made. Select OK to dismiss the message and to close the Share Local Directory dialog box.

  8. Select OK to close the NFS Server dialog box.

You can also modify and delete exported directories with the Share Local Directory dialog box. See Section 9.5.3 and the online help for more information.

Optionally, you can use a text editor to add, modify, and delete exported directories directly in the /etc/exports file. See the exports(4) reference page for more information about editing this file.

9.5.3    Halting Export of a Directory or File System

Halting export of a directory or file system prevents client systems from accessing the particular directory or file system; you can still export other directories or file systems. If you do not want to export any file systems, you might want to deconfigure your NFS server as documented in Section 9.4.

To halt the export of a file system by using the SysMan Menu, do the following:

  1. From the SysMan Menu, select Networking-->Additional Network Services-->Network File System (NFS)-->Configure system as an NFS server to display the Configure NFS Server dialog box.

    Alternatively, enter the following command on a command line:

    # /usr/bin/sysman nfs_server
    

  2. Select the Shared Local Directories button to display the Share Local Directory dialog box.

  3. Select the entry that you no longer want to export from the list of shared directories.

  4. Select Delete to remove the highlighted entry from the list. Repeat steps 3 and 4 to halt the export of additional entries.

  5. Select OK to save the remaining list of exports in the /etc/exports file. You are informed that the changes have been made. Select OK to dismiss the message and to close the Share Local Directory dialog box.

  6. Select OK to close the NFS Server dialog box.

You can also add and modify exports with the Share Local Directory dialog box. See Section 9.5.2 and the online help for more information.

Optionally, you can use a text editor to add, modify, and delete exports directly in the /etc/exports file. See the exports(4) reference page for more information about editing this file.

9.5.4    Enabling Client Superuser Access to Files

By default under NFS, a superuser (root) on a client system does not have superuser privileges on the server and cannot do the following:

For security reasons, you typically should not allow a remote superuser access to your system as superuser unless both the remote host and superuser are trusted. However, in a friendly network environment, you can explicitly allow superuser access over the network.

To allow a superuser on a client access to your server system, edit the /etc/exports file on your server and add the -root=0 option to the entry you want to make available. The -root=0 option maps the remote superuser's identification to UID 0. All future mount requests will be honored with root mapping. By default, this option allows superuser access from any client system on the network. To restrict the superuser access to specific systems, use the -root=host_list option, where host_list is a list of host names. See exports(4) for more information.

By default, NFS servers regard superusers and those users without UNIX authentication (personal computer systems) as anonymous users. This class of users can only access files that are accessible to the world. To prevent anonymous users from accessing file systems or directories, use the -anon=-1 option. If you still want to allow client superusers access to the file systems or directories, specify the -root option in addition to the -anon option. The -root option overrides the -anon option for client superusers only.

A superuser on a client system can assume the identity of any other user on the client system by substituting the UID number. The client superuser could then have the access rights of another user on the server. Therefore, to protect sensitive exported data on the server, make root the owner of the data files and do not export the directory or file system with root mapping. This is useful if you need to export other files in the file system.

The following example shows entries in an /etc/exports file:

/usr/games -root=0 host8    [1]
/usr/templates -root=host8    [2]

  1. Exports the /usr/games file system. It can be mounted remotely (read-write) only by the client system host8. However, the client superuser has superuser access to the file system. The superuser's UID is 0 (zero). [Return to example]

  2. Exports the /usr/templates file system. It can be mounted remotely (read-write) by any client in the network. However, only the superuser on host8 has superuser access to the file system. [Return to example]

9.5.5    Sending Mail to Superuser (root) Across NFS

If the /usr/spool/mail directory is remotely mounted from the server, you might not be able to send mail to superuser (root) on the server. The reason is most systems do not export the /usr/spool/mail directory with the root=0 option. To enable clients to send mail to root, set the root and admin aliases to the login name or names of the system administrators for that system. Then, users can address all mail intended for the administrators of that system as follows:

admin@system

To enable clients to send mail to root, follow these steps:

  1. Edit the /var/adm/sendmail.cf file and add the alias name admin to the following line:

    CN MAILER-DAEMON postmaster
    

    The line should then look as follows:

    CN MAILER-DAEMON postmaster admin
    

    This adds the name admin to the class N.

    Alternatively, you can run the Mail Configuration application and add admin as a local user. See Chapter 12 for more information.

  2. Edit the /var/adm/sendmail/aliases file, add the login names of the system administrators, and redefine (alias) the name root to be admin.

  3. Restart the sendmail daemon by using the following command:

    # /sbin/init.d/sendmail restart
    

If you are enabling clients to send mail to root, remember the following:

The following example shows the steps involved in enabling clients to send mail to root.

# vi /var/adm/sendmail/sendmail.cf  [1]
   
.
.
.
# vi /var/adm/sendmail/aliases [2]
.
.
.
# /sbin/init.d/sendmail restart [3]

  1. Opens the /var/adm/sendmail/sendmail.cf file to add the admin alias. [Return to example]

  2. Opens the /var/adm/sendmail/aliases file to add the login names and root alias. [Return to example]

  3. Restarts the sendmail daemon. [Return to example]

The following example shows entries in the /var/adm/sendmail/aliases file for the system administrators John, Mary, and Joe:

admin:john,mary,joe
root:admin

9.5.6    Enabling Port Monitoring

Only privileged users can attach to Internet domain source ports known as privileged ports. By default, NFS does not check to see if a client is bound to a privileged port. You might want to activate NFS server port monitoring to be sure that file access requests were generated by the client kernel rather than forged by an application program.

Although this operating system enforces the privileged port convention, some operating systems do not. If hosts running a different operating system are on your network, activating port checking might not improve security, but could prevent those systems from functioning properly as NFS client systems.

To start NFS server port monitoring, enter the following command:

# /usr/sbin/nfsportmon on

To stop source port monitoring, enter the following command:

# /usr/sbin/nfsportmon off

9.5.7    Monitoring the NFS Load

Monitoring the NFS load allows you to see the number of NFS requests, both client and server, being executed on the local machine. You should periodically monitor NFS requests to determine whether you need additional NFS server threads.

To monitor NFS requests, use the nfsstat command with the following syntax:

nfsstat -n

See nfsstat(8) for more information on monitoring NFS load.

The following example shows the client and server activity on a local machine:

# /usr/bin/nfsstat -n
 nfs:
calls      badcalls
69228      0
 
Server nfs V2:
null       getattr    setattr    root       lookup     readlink   read
1  0%      24 0%      0  0%      0  0%      60  0%     0  0%      5  0%
wrcache    write      create     remove     rename     link       symlink
0  0%      58030 83%  20  0%     0  0%      0  0%      0  0%      0  0%
mkdir      rmdir      readdir    statfs
0  0%      0  0%      0  0%      2  0%
 
Server nfs V3:
null       getattr    setattr    lookup     access     readlink   read
0  0%      667  0%    1009  1%   2598  3%   101  0%    200  0%    1408  2%
write      create     mkdir      symlink    mknod      remove     rmdir
1280  1%   376  0%    71  0%     200  0%    0  0%      676  0%    70  0%
rename     link       readdir    readdir+   fsstat     fsinfo     pathconf
100  0%    100  0%    468  0%    0  0%      1750  2%   2  0%      0  0%
commit
10  0%
 
Client nfs:
calls      badcalls   nclget     nclsleep
224664     0          224664     0
 
Client nfs V2:
null       getattr    setattr    root       lookup     readlink   read
0  0%      51328 22%  1069  0%   0  0%      41643 18%  455  0%    28793  12%
wrcache    write      create     remove     rename     link       symlink
0  0%      64665 28%  589  0%    1052  0%   352  0%    250  0%    250  0%
mkdir      rmdir      readdir    statfs
171  0%    170  0%    2689  1%   1814  0%
 
Client nfs V3:
null       getattr    setattr    lookup     access     readlink   read
0  0%      2038  0%   2180  0%   8534  3%   430  0%    450  0%    3136  1%
write      create     mkdir      symlink    mknod      remove     rmdir
3158  1%   1048  0%   243  0%    450  0%    1  0%      1848  0%   242  0%
rename     link       readdir    readdir+   fsstat     fsinfo     pathconf
452  0%    350  0%    1240  0%   0  0%      3506  1%   3  0%      0  0%
commit
75  0%

9.6    Managing an NFS Client

Your system can be an NFS client if the following conditions exist:

This section describes how to perform the following NFS client tasks:

9.6.1    Mounting a Remote File System or Directory

You can mount a remote file system or any subdirectory within a remote file system onto a local mount point. While mounted, it is treated as a file system by the local system.

To mount a remote file system or directory by using the SysMan Menu, do the following:

  1. From the SysMan Menu, select Networking-->Additional Network Services-->Network File System (NFS)-->Configure system as an NFS client to display the Configure NFS Client dialog box.

    Alternatively, enter the following command on a command line:

    # /usr/bin/sysman nfs_client
    

  2. Select the Mount Network Directories button to display the Mount Network Directory dialog box.

    A list of NFS-mounted directories that are saved in the /etc/fstab file is displayed. Remote file systems that you mounted by using the mount command are not included in this list.

  3. Select Add to add a remote directory. The Add/Modify dialog box is displayed.

  4. Enter the host name of the NFS server from which the remote directory is exported in the Remote Host Name field.

  5. Enter the full path name of the directory to be imported in the Remote Directory Path field.

  6. Enter the full path name of the local directory on which the imported directory should be mounted in the Local Mount Point field.

  7. Select whether the directory has read-only or read/write access with the appropriate radio button.

  8. Select the Mount on Reboot checkbox if you want the directory to be mounted each time you reboot.

  9. Select OK to validate the entry and to close the Add/Modify dialog box. Repeat steps 3 through 9 for additional directories.

  10. Select OK to save the list of directories you chose to import. The names of those directories that are to be mounted on reboot are saved in the /etc/fstab file.

    You are informed that the changes have been made. Select OK to dismiss the message and to close the Mount Network Directory dialog box.

  11. Select OK to close the NFS Client dialog box.

You can also modify and delete your imported directories with the Mount Network Directory dialog box. See Section 9.6.3 and the online help for more information.

Each directory imported via the Mount Network Directory dialog box is mounted using the bg and hard options of the mount command. If the first attempt to mount the directory fails, the client tries mounting it in the background (bg option), and it continues attempting to mount the directory until the server responds (hard option). No other mount options can be selected via the dialog box.

Optionally, you can use the mount or umount commands to mount or unmount remote file systems from the command line. Or, you can use a text editor to directly add, modify, or delete entries in the /etc/fstab file. You would use these alternatives if you need to specify mount options that are not supported by the Mount Network Directory dialog box. See mount(8), umount(8), and fstab(4) for more information.

9.6.2    Using automount to Mount a Remote File System

The automount daemon allows you to automatically mount a remote file system or directory at the time of access. If you are using automount, determine whether you are using local automount maps or NIS-distributed automount maps. See Section 9.1.2 for a description of local and NIS-distributed automount maps.

To use local automount maps, do the following:

  1. Log in as root.

  2. Create a local auto.master map in the /etc directory. See Appendix B for information on creating automount maps.

    Note

    If you are modifying an existing auto.master map, you must stop and restart the automount daemon in order to read the revised map.

  3. Create the local maps for your system.

  4. Start the automount daemon by using the NFS Client dialog box of the SysMan Menu. See Section 9.3.2 for information on starting the automount daemon.

    When the automount daemon starts, it uses the local auto.master file to determine the location of other maps, their local mount points, and the mount options.

To use NIS-distributed automount maps, do the following:

  1. Set up your system as an NIS client. See Section 8.3.3 for information on setting up an NIS client.

  2. Start the automount daemon by using the NFS Client dialog box of the SysMan Menu. See Section 9.3.2 for information on starting the automount daemon.

    All automount maps are served from the NIS master server in the domain. When the automount daemon starts, it uses the master auto.master file to determine the location of other maps, their local mount points, and the mount options.

If you alter your local or NIS-distributed automount maps at any time, you must restart the automount daemon on clients as follows to apply the changes:

  1. From the SysMan Menu, select Networking-->Additional Network Services-->Network File System (NFS)-->Configure system as an NFS client to display the Configure NFS Client dialog box.

    Alternatively, enter the following command on a command line:

    # /usr/bin/sysman nfs_client
    

  2. Deselect the Enable Automount check box.

  3. Select OK to disable automount and Yes to restart the NFS daemons. A message indicates the the daemons are restarted; select OK to dismiss the message and close the NFS Client dialog box.

  4. Open the NFS Client dialog box again.

  5. Select the Configure for Automount check box.

  6. Select OK to enable automount and Yes to restart the NFS daemons. A message indicates the the daemons are restarted.

  7. Select OK to dismiss the message and to close the NFS Client Setup dialog box.

See automount(8) for information on the automount command and its arguments.

9.6.2.1    Specifying automount Arguments

You can specify arguments for the automount daemon from the command line, in a local auto.master map, in an NIS-distributed auto.master map, or some combination of the three. However, it is important to know that the automount daemon reads and carries out its instructions in the following order:

  1. Command line information, such as additional mount points or replacements to entries in a master map, are read first. Command line information takes precedence over instructions in any maps -- local or NIS-distributed.

  2. Instructions in a local auto.master map (specified with the -f option) are read next. The information in the local master map overrides information in an NIS-distributed master map.

  3. Information in the NIS-distributed master map is read last.

When you invoke the automount daemon without any options, it looks for a distributed NIS map called auto.master. If it finds one, it checks the master map for information about the location of other maps, their local mount points, and the mount options. If it does not find one, and if no local auto.master is specified, the automount daemon exits.

You can pass command arguments to the automount daemon from the NFS Client dialog box of the SysMan Menu as documented in Section 9.3.2. You can also pass arguments from the command line in one of the following ways:

See automount(8) for more information on the automount command and its arguments.

9.6.3    Unmounting a Remote File System or Directory

Unmounting a remote file system or directory removes access to a particular file system or directory that is being imported from an NFS server; you can still import other directories or file systems. If you do not want to import any file systems, you might want to deconfigure your NFS client as documented in Section 9.4.

To unmount a remote file system or directory by using the SysMan Menu, do the following:

  1. From the SysMan Menu, select Networking-->Additional Network Services-->Network File System (NFS)-->Configure system as an NFS client to display the Configure NFS Client dialog box.

    Alternatively, enter the following command on a command line:

    # /usr/bin/sysman nfs_client
    

  2. Select the Mount Network Directories button to display the Mount Network Directory dialog box.

    A list of NFS-mounted directories that are saved in the /etc/fstab file is displayed. Remote file systems that you mounted by using the mount command are not included in this list. Use the umount command to unmount these file systems. See umount(8).

  3. Select the entry that you want to unmount from the list.

  4. Select Delete to remove the highlighted entry from the list. Repeat steps 3 and 4 to remove additional entries

  5. Select OK to save the current list of imported directories in the /etc/fstab file.

    You are informed that the changes have been made. Select OK to dismiss the message and to close the Mount Network Directory dialog box.

  6. Select OK to close the NFS Client dialog box.

You can also add and modify your imported directories with the Mount Network Directory dialog box. See Section 9.6.1 and the online help for more information.

Optionally, you can use the mount or umount commands to mount or unmount remote file systems from the command line. Or, you can use a text editor to directly add, modify, or delete entries in the /etc/fstab file. See mount(8), umount(8), and fstab(4) for more information.