Common NFS Service Troubleshooting and Solutions

NFS, the full name of Network File System, is called Network File  System in Chinese. It is an integral part of the distributed file system of Linux and UNIX systems, which can realize the sharing of remote file systems on different networks. NFS was developed by Sun and has now become one of the standards for file services (RFC1904, RFC1813). Its biggest function is to allow computers with different operating systems to share data through the network, so NFS can be regarded as a file server. The disadvantage of NFS is that its read and write performance is worse than that of local hard disks.

1. Common troubleshooting of NFS service:

The NFS service has failed, and the reasons are mainly checked from the following aspects:

(1) Check whether the load of the NFS client and server is too high, and whether the network between the server and the client is normal;

(2) Check the correctness of the /etc/exports file;

(3) Restart NFS and portmap services if necessary;

(4) Run the following commands to restart portmap and NFS:

# /etc/init.d/portmap restart
# /etc/init.d/nfs restart
# /etc/init.d/rpcbind restart (在RHEL/CentOS 6.x里面)
# chkconfig portmap on
# chkconfig nfs on
# chkconfig rpcbind on (在RHEL/CentOS 6.x里面)

Note: In RHEL/CentOS 6.x, the portmap service has been renamed the rpcbind service; by the way, the rpcbind service is also a key basic service of the graphical interface. If this service is not started, the graphical desktop cannot be started.

(5) Check whether the syntax of the mount command or /etc/fstab on the Client is correct;

(6) Check whether the kernel supports NFS and RPC services. Generally, a normally installed Linux system will support NFS and RPC services by default, unless you recompile the kernel yourself and compile it without selecting the nfs support option.

2. Solutions to common NFS faults:

1、The rpcbind failure error
故障现象:
nfs mount: server1:: RPC: Rpcbind failure
RPC: Timed Out
nfs mount: retrying: /mntpoint
原因:
第一,可能因为客户机的hosts文件中存在错误的ip地址、主机名或节点名组合;
第二,服务器因为过载而暂时停止服务。

2、The server not responding error
现象:
NFS server server2 not responding, still trying
原因:
第一,网络不通,用ping命令检测一下。
第二,服务器关机。

3、The NFS client fails a reboot error
现象:
启动客户机后停住了,不断显示如下提示信息:
Setting default interface for multicast: add net 224.0.0.0: gateway:
client_node_name.
原因:
在etc/vfstab的mount选项中使用了fg而又无法成功mount服务器上的资源,改成bg或将该行注释掉,直到服务器可用为止。

4、The service not responding error
现象:
nfs mount: dbserver: NFS: Service not responding
nfs mount: retrying: /mntpoint
原因:
第一,当前级别不是级别3,用who -r查看,用init 3切换。
第二,NFS Server守护进程不存在,用ps -ef | grep nfs检查,用/etc/init.d/nfs start启动。

5、The program not registered error
现象:
nfs mount: dbserver: RPC: Program not registered
nfs mount: retrying: /mntpoint
原因:
第一,当前级别不是级别3。
第二,mountd守护进程没有启动,用/etc/init.d/nfs脚本启动NFS守护进程。
第三,看/etc/dfs/dfstab中的条目是否正常。

6、The stale file handle error
现象:
stale NFS file handle
原因:
服务器上的共享资源移动位置了,在客户端使用umount和mount重新挂接就可以了。

7、The unknown host error
现象:
nfs mount: sserver1:: RPC: Unknown host
原因:
hosts文件中的内容不正确。

8、The mount point error
现象:
mount: mount-point /DS9 does not exist.
原因:
该挂接点在客户机上不存在,注意检查命令行或/etc/vfstab文件中相关条目的拼写。

9、The no such file error
现象:
No such file or directory.
原因:
该挂接点在服务器上不存在,注意检查命令行或/etc/vfstab文件中相关条目的拼写。

10、No route to host
错误现象:
# mount 10.10.11.211:/opt/data/xmldb /c2c-web1/data/xmldb -t nfs -o rw
mount: mount to NFS server ‘10.10.11.211’ failed: System Error: No route to host.

原因:
防火墙被打开,关闭防火墙。
这个原因很多人都忽视了,如果开启了防火墙(包括iptables和硬件防火墙),NFS默认使用111端口,我们先要检测是否打开了这个端口,还要检查TCP_Wrappers的设定。

11、Not owner
现象:
# mount -F nfs -o rw 10.10.2.3:/mnt/c2c/data/resinfo2 /data/data/resinfo2
nfs mount: mount: /data/data/resinfo2: Not owner

原因:
这是Solaris 10版本挂载较低版本nfs时报的错误。

解决:
需要用-o vers=3参数

示例:
# mount -F nfs -o vers=3 10.10.2.3:/mnt/c2c/data/resinfo2 /data/data/resinfo2

12、RPC: Program not registered & retrying
现象:
nfs mount: 10.10.2.3: : RPC: Program not registered
nfs mount: retrying: /data/data/resinfo2

原因:
没有启动NFS共享端服务。

解决:需要重新启动share端的NFS服务,
Linux:
mount: RPC: Program not registered
# /etc/init.d/nfs restart

Solaris:
mount: RPC: Program not registered
# /etc/rc.d/init.d/nfs restart

13、can’t contact portmapper: RPC: Remote system error – Connection refused
现象:
# exportfs -a
can’t contact portmapper: RPC: Remote system error – Connection refused

原因:
出现这个错误信息是由于server端的portmap没有启动。

解决:
# /etc/init.d/portmap start

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326235346&siteId=291194637
Recommended