挂载nfs时提示:mount.nfs: access denied by server while mounting 170.250.9.251:/volume2/share/workspace
解决方法:
1.查看服务端日志
/etc# cat /var/log/messages | grep mount
refused mount request from 192.168.9.98 for /volume2/share/workspace (/volume2/share/workspace): unmatched host
发现后面是unmatched host,应该是ip地址不匹配的问题
2.查看/etc/exports
cat /etc/exports
/volume2/share 192.168.9.251(rw,async,no_wdelay,crossmnt,insecure,root_squash,insecure_locks,sec=sys,anonuid=1024,anongid=100)
3.修改/etc/exports文件
把文件中的内容192.168.9.251改成192.168.9.0/24,保存退出(这里的IP地址以你自己的为主)
4.在服务端重启nfs服务
5.客户端重新连接没有问题
mount -t nfs 192.168.9.251:/volume2/share/workspace /share