环境:CentOS 6.5 64bit
在一台客户端机上执行mount命令挂载nfs,结果报如下错误:
1 2 3 4 5 6 |
mount : wrong fs type , bad option, bad superblock on 192.168.0.10: /bak ,
|
是因为我的客户端机器没有安装nfs-utils,执行如下命令:
1 |
yum -y install nfs-utils
|
之后再挂载,正常。
在客户端和服务端使用命令:showmount -e 10.10.209.148 报错
clnt_create: RPC: Port mapper failure - Unable to receive: errno 113 (No route to host)
解决方法:
被访问的NFS服务器上的防火墙没有添加规则,向iptables里面添加以下查看的所有端口即可(目前解决的方法,当然你也可以关闭防火墙,不过这样是比较不安全的,如果你的nfs作用不大,建议你另选别的应用来替代吧!毕竟开那么多的端口,比较不安全呀!)
#vim /etc/sysconfig/iptables
#service iptables stop //关闭防火墙
通过#rpcinfo -p 10.10.209.148
[[email protected] /]# rpcinfo -p 10.10.209.148
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 52943 status
100024 1 tcp 37706 status
100011 1 udp 875 rquotad
100011 2 udp 875 rquotad
100011 1 tcp 875 rquotad
100011 2 tcp 875 rquotad
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100227 2 tcp 2049 nfs_acl
100227 3 tcp 2049 nfs_acl
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100227 2 udp 2049 nfs_acl
100227 3 udp 2049 nfs_acl
100021 1 udp 37438 nlockmgr
100021 3 udp 37438 nlockmgr
100021 4 udp 37438 nlockmgr
100021 1 tcp 46331 nlockmgr
100021 3 tcp 46331 nlockmgr
100021 4 tcp 46331 nlockmgr
100005 1 udp 57177 mountd
100005 1 tcp 43147 mountd
100005 2 udp 49154 mountd
100005 2 tcp 54810 mountd
100005 3 udp 55707 mountd
100005 3 tcp 58309 mountd