我是靠谱客的博主 现实电源,最近开发中收集的这篇文章主要介绍NFS常见错误,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

文章目录

[隐藏]

  • 错误一:Cannot register service: RPC
  • 错误二:Address already in use
  • 错误三:mount: …:/nfsdata failed, reason given by server: Permission denied
  • 错误四:客户端挂载超时
  • 错误五:Error: RPC MTAB does not exist.

错误一:Cannot register service: RPC

[root@IT_Only 20180815_std]# showmount -e nas09
mount clntudp_create: RPC: Port mapper failure - RPC: Unable to receive

发现无法找到共享,决定在nas存储上重启nfs服务,报错如下

Starting NFS quotas: Cannot register service: RPC: Unable to receive; errno = Connection refused rpc.rquotad: unable to register (RQUOTAPROG, RQUOTAVERS, udp).

service nfs restart

Shutting down NFS mountd: [ OK ]

Shutting down NFS daemon: [ OK ]

Shutting down NFS quotas: [ OK ]

Shutting down NFS services: [ OK ]

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]

#解决方法:

service portmap start

#先启动portmap才行

错误二:Address already in use

tail -f /var/log/message

Apr :: bogon nfsd[]: nfssvc: Setting version failed: errno (Device or resource busy)

Apr :: bogon nfsd[]: nfssvc: unable to bind UPD socket: errno (Address already in use)

Apr :: bogon nfsd[]: nfssvc: Setting version failed: errno (Device or resource busy)

Apr :: bogon nfsd[]: nfssvc: unable to bind UPD socket: errno (Address already in use)

Apr :: bogon nfsd[]: nfssvc: Setting version failed: errno (Device or resource busy)

#解决方法:

ps aux | grep nfs

#然后用kill干掉这些进程

错误三:mount: …:/nfsdata failed, reason given by server: Permission denied

#解决方法:

a.把该客户端的ip加入服务端的/etc/exports

b.服务端的和客户端规则要统一,要么都使用主机名(注意每台机器的hosts文件),要么都使用IP

错误四:客户端挂载超时

tail -f /var/log/message

Apr :: localhost kernel: portmap: server localhost not responding, timed out

Apr :: localhost kernel: RPC: failed to contact portmap (errno -).

Apr :: localhost kernel: RPC: failed to contact portmap (errno -).

Apr :: localhost kernel: lockd_up: makesock failed, error=-

Apr :: localhost kernel: RPC: failed to contact portmap (errno -).

#解决方法:

service portmap restart

service nfs restart

错误五:Error: RPC MTAB does not exist.

service nfs start

Starting NFS services: [ OK ]

Starting NFS quotas: [ OK ]

Starting NFS daemon: [ OK ]

Starting NFS mountd: [ OK ]

Starting RPC idmapd: Error: RPC MTAB does not exist.

#解决方法:

#手动执行

mount -t rpc_pipefs sunrpc /var/lib/nfs/rpc_pipefs/

#需要时加入开机启动时,加入下面两行到/etc/fstab

rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs defaults

nfsd /proc/fs/nfsd nfsd defaults

最后

以上就是现实电源为你收集整理的NFS常见错误的全部内容,希望文章能够帮你解决NFS常见错误所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(55)

评论列表共有 0 条评论

立即
投稿
返回
顶部