Innerhalb
Nach weiteren Dokumenten suchen
Support-Ressourcen
| Dieses Buch im PDF-Format herunterladen
NFS Troubleshooting
5
- This chapter describes problems that may occur on computers using NFS services. It contains a summary of NFS sequence of events and how to strategies for tracking NFS problems. A reference section is also included. If you want to skip the background information that explains NFS internals and proceed directly to step-by-step instructions, use the following table to find the page where instructions for specific tasks begin.
-
- Before trying to clear NFS problems, you should have some understanding of the issues involved. The information in this chapter contains enough technical details to give experienced network administrators a thorough picture of what is happening with their computers. If you do not yet have this level of expertise, you should be able to at least recognize the names and functions of the various daemons, system calls, and files. Before you read this chapter, familiarize yourself with the following manual pages: mount(1M), share(1M), mountd(1M), and nfsd(1M).
General Information on NFS Troubleshooting
- When tracking down an NFS problem, keep in mind that there are three main points of possible failure: the server, the client, and the network itself. The strategy outlined in this section tries to isolate each individual component to find the one that is not working. The mountd daemon must be present in the server for a remote mount to succeed. Remote mounts also need an nfsd daemon to execute on NFS servers.
-
Note - The mountd and nfsd start automatically at boot time only if there are NFS share entries in the /etc/dfs/dfstab file. Therefore, mountd and nfsd must be started manually when setting up sharing for the first time.
- When the network or server has problems, programs that access hard-mounted remote files will fail differently than those that access soft-mounted remote files. Hard-mounted remote file systems cause the client's kernel to retry the requests until the server responds again. Soft-mounted remote file systems cause the client's system calls to return an error after trying for a while. Because these errors may result in unexpected application errors, soft mounting is not recommended. mount is like any other program: if the server for a remote file system fails to respond, the kernel retries the mount until it succeeds.
- The intr option is set by default for all mounts. If a program hangs with a "server not responding" message, it can be killed with a keyboard interrupt Control-C.
- When a file system is hard mounted, a program that tries to access it hangs if the server fails to respond. In this case, the NFS system displays the following message on the console.
-
NFS server <hostname> not responding, still trying
|
- When the server finally responds, the following message appears on the console.
-
- A program accessing a soft-mounted file system whose server is not responding may not check the return conditions. In any case, the kernel prints the following message:
-
. . . <hostname> server not responding:RPC:Timed out
|
-
Note - Do not soft-mount read file systems with read-write data or file systems from which executables will be run because of possible errors. Writeable data could be corrupted if the application ignores soft errors Mounted executables could be misinterpreted..
NFS Troubleshooting Instructions
Determining Where NFS Service Has Failed
-
-
Type the following to check whether the mountd daemon is running.
-
-
-
Type the following to check whether the nfsd daemon is running.
-
-
-
To enable daemons without rebooting, become root and type the following:
-
-
to enable mountd type the following; or
-
-
type the following to enable nfsd.
Clearing Server Problems
-
-
Make sure that the server's kernel responds. From the client, type the following:
-
-
-
Check that the server's nfsd processes are responding. From the client, type the following:
-
/usr/sbin/rpcinfo -u <servername> nfs
|
- If the server is running, it prints a list of program, version, protocol, and port numbers.
-
-
Check that the server's mountd is responding.
-
/usr/sbin/rpcinfo -u <servername> mountd
|
- If the server is running normally, but your computer cannot communicate with it, check the network connections between your computer and the server.
Clearing Remote Mounting Problems
Example 1
-
mount: ... server not responding: RPC_PMAP_FAILURE -
RPC_TIMED_OUT
|
- The server sharing the file system you are trying to mount is down, at the wrong run level, or its rpcbind is dead or hung.
-
-
Sign on to the server and check its run level with the who command.
-
-
-
If the server is at run level 2, try going to another run level and back, or try rebooting the server to restart rpcbind.
-
Try to log in to the server from the client computer, using the rlogin command.
-
If you can't log in, but the server is up, try to log in to another remote computer to check your network connection. If that connection is working, check the server's network connection.
Example 2
-
mount registered with rpcbind, but the NFS mount daemon mountd is not registered.
-
mount: ... server not responding: RPC_PROG_NOT_REGISTERED
|
-
* Determine whether or not the mount daemon is running:
-
rpcinfo -u <server> mountd
|
Example 3
-
mount: ... No such file or directory
|
- Either the remote directory or the local directory does not exist.
-
* Check the spelling of the directory names. Use ls on both directories.
Example 4
-
mount: ...: Permission denied
|
- Your computer name may not be in the list of clients allowed access to the file system you want to mount.
-
-
To display the server's share list, type the following.
-
- or
-
-
-
If the file system you want is not in the list, log in to the server and run the share command without options.
Fixing Hung Programs
- If programs hang while doing file-related work, your NFS server may be dead. You may see the following message on your console.:
-
NFS server <hostname> not responding, still trying
|
- This message indicates that NFS server hostname is down, or that there is a problem with the server or with the network.
-
-
Check the server(s) from which you mounted the file system.
If one or more are down, do not be concerned. When the server comes back up, programs resume automatically. No files are destroyed. If all servers are running, ask someone else using these same servers if they are having trouble. If more than one client computer is having problems getting service, there is a problem with the server.
- If no other client computers are having trouble with the server, check your network connection and the connection of the server.
-
-
Log in to the server and run ps to see if nfsd is running and accumulating CPU time.
(Run ps -ef a few times, letting some time pass between each call.)
-
If nfsd is not running, you may be able to kill and then restart nfsd. If this does not work, reboot the server.
If nfsd is not running, it may be that the server has been taken to a run level that does not support file sharing. Use who -r to obtain the server's current run level.
- For more information about NFS status, use the snoop command. See the man pages.
|
|