【unmatched host】nfs挂载 提示“: refused mount request from xx for /nfsdata (/nfsdata): unmatched host ”

1、在把NFS服务器当做客户端来进行挂载测试的途中出现下面错误:

[root@master ~]# mount -t nfs 10.10.36.112:/nfsdata /mnt
mount.nfs: access denied by server while mounting 10.10.36.112:/nfsdata

此时发现上述错误:

挂载失败原因分析:

解决方案:

第一步:查看最近挂载的日志  分析发现:

cat /var/log/messages | grep mount

Apr 8 09:51:54 master-01 rpc.mountd[26157]: Version 1.3.0 starting
Apr 8 09:53:45 master-01 rpc.mountd[26157]: refused mount request from 10.10.27.90 for /nfsdata (/nfsdata): unmatched host
Apr 8 09:55:47 master-01 rpc.mountd[26157]: refused mount request from 10.10.27.90 for /nfsdata (/nfsdata): unmatched host
Apr 8 09:57:49 master-01 rpc.mountd[26157]: refused mount request from 10.10.27.90 for /nfsdata (/nfsdata): unmatched host
Apr 8 09:59:51 master-01 rpc.mountd[26157]: refused mount request from 10.10.27.90 for /nfsdata (/nfsdata): unmatched host
Apr 8 10:01:53 master-01 rpc.mountd[26157]: refused mount request from 10.10.27.90 for /nfsdata (/nfsdata): unmatched host
Apr 8 10:03:56 master-01 rpc.mountd[26157]: refused mount request from 10.10.27.90 for /nfsdata (/nfsdata): unmatched host
Apr 8 10:05:58 master-01 rpc.mountd[26157]: refused mount request from 10.10.27.90 for /nfsdata (/nfsdata): unmatched host
Apr 8 10:08:00 master-01 rpc.mountd[26157]: refused mount request from 10.10.27.90 for /nfsdata (/nfsdata): unmatched host
Apr 8 10:10:02 master-01 rpc.mountd[26157]: refused mount request from 10.10.27.90 for /nfsdata (/nfsdata): unmatched host
Apr 8 10:12:04 master-01 rpc.mountd[26157]: refused mount request from 10.10.27.90 for /nfsdata (/nfsdata): unmatched host
Apr 8 10:14:06 master-01 rpc.mountd[26157]: refused mount request from 10.10.27.90 for /nfsdata (/nfsdata): unmatched host
Apr 8 10:16:08 master-01 rpc.mountd[26157]: refused mount request from 10.10.27.90 for /nfsdata (/nfsdata): unmatched host
Apr 8 10:18:11 master-01 rpc.mountd[26157]: refused mount request from 10.10.27.90 for /nfsdata (/nfsdata): unmatched host
Apr 8 10:20:13 master-01 rpc.mountd[26157]: refused mount request from 10.10.27.90 for /nfsdata (/nfsdata): unmatched host
Apr 8 10:22:15 master-01 rpc.mountd[26157]: refused mount request from 10.10.27.90 for /nfsdata (/nfsdata): unmatched host
Apr 8 10:24:12 master-01 rpc.mountd[26157]: Caught signal 15, un-registering and exiting.
Apr 8 10:24:12 master-01 rpc.mountd[29833]: Version 1.3.0 starting
Apr 8 10:24:17 master-01 rpc.mountd[29833]: refused mount request from 10.10.27.90 for /nfsdata (/nfsdata): unmatched host
Apr 8 10:26:19 master-01 rpc.mountd[29833]: refused mount request from 10.10.27.90 for /nfsdata (/nfsdata): unmatched host
Apr 8 10:28:21 master-01 rpc.mountd[29833]: refused mount request from 10.10.27.90 for /nfsdata (/nfsdata): unmatched host
Apr 8 10:28:51 master-01 rpc.mountd[29833]: refused mount request from 10.10.36.112 for /nfsdata (/nfsdata): unmatched host
Apr 8 10:29:28 master-01 rpc.mountd[29833]: refused mount request from 10.10.27.87 for /nfsdata (/nfsdata): unmatched host
Apr 8 10:30:23 master-01 rpc.mountd[29833]: refused mount request from 10.10.27.90 for /nfsdata (/nfsdata): unmatched host

上述发现大多数都是unmatched host :

原因:主机不可达  那么问题肯定出在、 /etc/exports  配置  将ip直接改为* 或者对应的IP即可

改完后 一定记【上述操作属于危险操作,生产环境还是指定IP为好】

得重新reload一下nfs服务

此时我们再客户端机器执行挂载命令:

mount -t nfs 10.10.36.112:/nfsdata /mnt    【IP指的是nfs服务器的地址】

然后df -h 查看挂载情况,发现挂载成功

当然nfs挂载不成功,还有很多情况 

最基本的是通过docker日志去分析

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值