![]() |
![]() |
| |||||||||||||||||
Chapter 14Network File System Administration (Tasks)This chapter provides information on how to perform such NFS administration tasks as setting up NFS services, adding new file systems to share, and mounting file systems. The chapter also covers the use of the Secure NFS system, and the use of WebNFS functionality. The last part of the chapter includes troubleshooting procedures and a list of some of the NFS error messages and their meanings. Your responsibilities as an NFS administrator depend on your site's requirements and the role of your computer on the network. You might be responsible for all the computers on your local network, in which instance you might be responsible for determining these configuration items:
Maintaining a server after it has been set up involves the following tasks:
Remember, a computer can be both a server and a client--sharing local file systems with remote computers and mounting remote file systems. Automatic File-System SharingServers provide access to their file systems by sharing the file systems over the NFS environment. You specify which file systems are to be shared with the share command or the /etc/dfs/dfstab file. Entries in the /etc/dfs/dfstab file are shared automatically whenever you start NFS server operation. You should set up automatic sharing if you need to share the same set of file systems on a regular basis. For example, if your computer is a server that supports home directories, you need to make the home directories available at all times. Most file-system sharing should be done automatically. The only time that manual sharing should occur is during testing or troubleshooting. The dfstab file lists all the file systems that your server shares with its clients. This file also controls which clients can mount a file system. You can modify dfstab to add or delete a file system or change the way sharing is done. Just edit the file with any text editor that is supported (such as vi). The next time that the computer enters run level 3, the system reads the updated dfstab to determine which file systems should be shared automatically. Each line in the dfstab file consists of a share command--the same command that you type at the command-line prompt to share the file system. The share command is located in /usr/sbin. Table 14-1 File-System Sharing Task Map
|
share [-F nfs] [-o specific-options] [-d description] pathname |
See the dfstab(4) man page for a description of /etc/dfs/dfstab and the share_nfs(1M) man page for a complete list of options.
Check if the NFS service is running on the server.
If this is the first share command or set of share commands that you have initiated, the NFS service might not be running. Check that one of the NFS daemons is running by using the following command.
# pgrep nfsd 318 |
318 is the process ID for nfsd in this example. If an ID is not displayed, then the service is not running. The second daemon to check for is mountd.
(Optional) Start the NFS service.
If the previous step does not report a process ID for nfsd, start the NFS service by using the following command.
# /etc/init.d/nfs.server start |
This command ensures that NFS service is now running on the servers and restarts automatically when the server is at run level 3 during boot.
(Optional) Share the file system.
After the entry is in /etc/dfs/dfstab, the file system can be shared by either rebooting the system or by using the shareall command. If the NFS service was started earlier, this command does not need to be run because the init script runs the command.
# shareall |
Verify that the information is correct.
Run the share command to check that the correct options are listed:
# share - /export/share/man ro "" - /usr/src rw=eng "" - /export/ftp ro,public "" |
Previous Contents Index Next ![]() |