今天一台挂载nfs磁盘的服务器出现异常,数据不能写入,执行 df -h 卡住不动。
登录nfs server查看发现nfs为启动。
[root@server10-13 web]# exportfs [root@server10-13 web]# ps -ef|grep nfs root 5340 5151 0 14:30 pts/1 00:00:00 grep nfs
执行启动nfs,报错信息如下:
[root@server10-13 web]# service nfs start
Starting NFS services: [ OK ]
Starting NFS quotas: Cannot register service: RPC: Unable to receive; errno = Connection refused
rpc.rquotad: unable to register (RQUOTAPROG, RQUOTAVERS, udp).
[FAILED]
Starting NFS mountd: rpc.mountd: svc_tli_create: could not open connection for udp6
rpc.mountd: svc_tli_create: could not open connection for tcp6
rpc.mountd: svc_tli_create: could not open connection for udp6
rpc.mountd: svc_tli_create: could not open connection for tcp6
rpc.mountd: svc_tli_create: could not open connection for udp6
rpc.mountd: svc_tli_create: could not open connection for tcp6
[FAILED]
Starting NFS daemon: rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)
rpc.nfsd: address family inet6 not supported by protocol TCP
rpc.nfsd: unable to set any sockets for nfsd
[FAILED]
通过错误信息判断可能是由于rpc导致的 ,具体解决方式
[root@server10-13 web]# /etc/init.d/rpcbind restart
Stopping rpcbind: [FAILED]
Starting rpcbind: [ OK ]
[root@server10-13 web]# service nfslock start
Starting NFS statd: [ OK ]
[root@server10-13 web]# service nfs start
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS mountd: rpc.mountd: svc_tli_create: could not open connection for udp6
rpc.mountd: svc_tli_create: could not open connection for tcp6
rpc.mountd: svc_tli_create: could not open connection for udp6
rpc.mountd: svc_tli_create: could not open connection for tcp6
rpc.mountd: svc_tli_create: could not open connection for udp6
rpc.mountd: svc_tli_create: could not open connection for tcp6
[ OK ]
Starting NFS daemon: rpc.nfsd: address family inet6 not supported by protocol TCP
[ OK ]
Starting RPC idmapd: [ OK ]
再次查看nfs信息
[root@server10-13 web]# exportfs /home/web/crawler 192.168.10.0/24
Client 等待2分钟后,磁盘恢复正常。