nfs 挂载 access denied

Posted Linux 编程技术

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了nfs 挂载 access denied相关的知识,希望对你有一定的参考价值。

问题 在客户端挂载nfs时, 出现

mount.nfs: access denied by server while mounting 192.168.122.199:/mnt/export_dir

解决思路

立即查看服务端日志,journalctl -xe

-- The start-up result is RESULT.
May 14 14:07:32 servera kernel: nfsd: recvfrom returned errno 104
May 14 14:13:47 servera rpc.mountd[2105]: refused mount request from 192.168.122.1 for /mnt/export_dir (/mnt/export_dir): unmatched host

出现unmatc host, 因为客户端和服务端不在一个网段

[root@servera ~]# exportfs -va
exporting 192.168.122.199:/mnt/export_dir

因为是虚拟机, 所以修改掩码为16

[root@servera ~]# exportfs -va
exporting 192.168.122.199/16:/mnt/export_dir

问题解决

以上是关于nfs 挂载 access denied的主要内容,如果未能解决你的问题,请参考以下文章

AIX 下NFS挂载出错解决 : 1831-011 access denied

nfs客户端挂载出错 mount.nfs access denied by server while mounting

NFS挂载时出现"access denied by server while mounting"的解决方法

NFS挂载“access denied by server while mounting“的解决方法

[nfs无法挂载问题] mount.nfs: access denied by server while mounting localhost:/data/dev/mysql

NFS挂载时出现"access denied by server while mounting"的解