NFS server fault and problem diagnosis (1)

Source: Internet
Author: User

Determine NFS Problems
Like other network services, problems may occur when using the Network File System NFS server. Troubleshooting of these problems involves understanding how to track NFS problems, identifying NFS-related error messages, and selecting appropriate solutions. When you track an NFS server problem, isolate the three main fault points to determine which one does not work: the server, client, or network itself.

Identify problems with hard installation and soft installation files

When there is a problem with the network or server, the program accessing the hard-installed remote file is different from the program accessing the soft-installed remote file.

If a server fails to respond to a hardware installation request, NFS displays the message:

Failed to respond to NFS server host name, still trying

Because the client has the opportunity to repeatedly try the installation request until the installation is successful, hard installation of the remote file system causes the program to be suspended until the server responds. Use the-bg flag of the mount command to execute the hard installation. If the server does not respond, the client will retry the installation in the background.

If the server does not respond to a soft installation request, NFS displays the message:

Connection timeout

An error is returned after the remote file system is installed. Unfortunately, in file system operations, many programs do not check the returned results, so you will not see this error message when accessing the soft Installation File. However, the NFS error message is displayed on the console.

Obtains the current status of the NFS daemon.

You can immediately obtain the current status of the NFS daemon. To obtain the current status of the NFS Daemon, run the following command:

Lssrc-s Daemon

Among them, Daemon is any Daemon controlled by SRC. For example, to obtain the current status of the rpc. lockd daemon, run:

Lssrc-s rpc. lockd

To get the current status of all NFS daemon immediately, run:

Lssrc-

Identification of NFS fault Checklist

If an NFS fault exists on a client, perform the following operations:

1. Verify that the network connection is correct.
2. Check whether the inetd, portmap, and biod daemon is running on the client based on the instructions in the current state of the NFS daemon.
3. Verify that the file system being installed has a valid Installation Point.
4. Run the following command at the client shell prompt to verify whether the server is started and running:

/Usr/bin/rpcinfo-p server_name
If the server is started, a list of programs, versions, protocols, and port numbers is displayed, similar to the following:

Program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100005 1 udp 1025 mountd
100001 1 udp 1030 rstatd
100001 2 udp 1030 rstatd
100001 3 udp 1030 rstatd
100002 1 udp 1036 rusersd
100002 2 udp 1036 rusersd
100008 1 udp 1040 walld
100012 1 udp 1043 sprayd
100005 1 tcp 694 mountd
100003 2 udp 2049 nfs
100024 1 udp 713 status
100024 1 tcp 715 status
100021 1 tcp 716 nlockmgr
100021 1 udp 718 nlockmgr
100021 3 tcp 721 nlockmgr
100021 3 udp 723 nlockmgr
100020 1 udp 726 llockmgr
100020 1 tcp 728 llockmgr
100021 2 tcp 731 nlockmgr

If no similar response is returned, log on to the server on the server console and check the inetd daemon status according to the instructions in the current status of the NFS daemon.

5. Verify that the mountd, portmap, and nfsd daemon is running on the NFS server. Enter the following command at the client shell prompt:
6./usr/bin/rpcinfo-u server_name mount
7./usr/bin/rpcinfo-u server_name portmap
/Usr/bin/rpcinfo-u server_name nfs
If the daemon runs on the server, the following response is returned:

Program 100005 version 1 ready and waiting
Program 100000 version 2 ready and waiting
Program 100003 version 2 ready and waiting

Program numbers correspond to commands, as shown in program. If no similar response is returned, log on to the server on the server console and check the daemon status according to the instructions in the current status of the NFS daemon.

8. Verify that the/etc/exports file on the server lists the name of the file system to be installed on the client and whether the file system has been exported. Run the following command:
Showmount-e server_name
This command lists all file systems currently exported by server_name.

Asynchronous write error
When an application writes data to a file in the NFS Installation File System, the write operation is scheduled by the biod daemon to be asynchronous. If an error occurs on the NFS server while the data is actually written to the disk, the NFS client is returned, and the biod daemon stores the error in the NFS data structure. Then, when the next time the application calls the fsync or close function, the stored error is returned to the application. As a result of such errors, write errors are not notified to the application before the program closes the file. A typical example of this event is that when the file system on the server is full, the write attempt by the client fails.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.