s
问题1:
[root@sftspstapp10 ~]# mount -t nfs 10.244.164.42:/opt/data1 /data1
mount.nfs: access denied by server while mounting 10.244.164.42:/opt/data1
查看问题1:/var/log/messages
Aug 14 19:31:57 sftspstapp08 kernel: svc: 10.244.167.148, port=755: unknown version (4 for prog 100003, nfsd)
Aug 14 19:31:57 sftspstapp08 rpc.mountd[27516]: refused mount request from 10.244.167.148 for /opt/data1 (/opt/data1): unmatched host
解决方案1:
原因为:NFS Server 只添加10.244.164网段允许NFS 挂载,并没有添加其他网段可以挂载,所以NFS Server端需要添加允许其他特定网段可挂载NFS即可。
修改前
[root@sftspstapp08 opt]# more /etc/exports
/opt/data1 10.244.164.0/24(rw,sync)
修改后
[root@sftspstapp08 opt]# more /etc/exports
/opt/data1 10.244.164.0/24(rw,sync)
/opt/data1 10.244.167.0/24(rw,sync)
修改后,重启NFS Server
[root@sftspstapp08 opt]#sevice nfs restart
解决参考1:
https://www.cnblogs.com/quanweiru/p/8456146.html
root@hipchat:~# mount -t nfs 192.168.10.220:/hipchat/share /home/share/nfs
mount.nfs: access denied by server while mounting 192.168.10.220:/hipchat/share
# 原因: 在服务器Oracle Linux 6.8的系统下使用的是NFSv4,在/var/log/messages中能看到nfs启动时的日志输出:
Feb 19 11:23:07 localhost rpc.mountd[19234]: Version 1.2.3 starting
Feb 19 11:23:07 localhost kernel: [34923.990353] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Feb 19 11:23:07 localhost kernel: [34923.990369] NFSD: starting 90-second grace period (net ffffffff81b8b040)
# 使用NFSv4时,在nfs服务端做如下操作:
[root@localhost ~]# vim /etc/sysconfig/nfs
# Optional arguments passed to rpc.nfsd. See rpc.nfsd(8)
# Turn off v2 and v3 protocol support
RPCNFSDARGS="-N 2 -N 3"
# Turn off v4 protocol support
RPCNFSDARGS="-N 4"
[root@localhost ~]# service nfs restart
chu
end