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
问题解决