1. 程式人生 > >mount.nfs: access denied by server while mounting <SERVER IP>:<SERVER PATH>

mount.nfs: access denied by server while mounting <SERVER IP>:<SERVER PATH>

roo -s 原因 host lin res mes blog stat

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

mount.nfs: access denied by server while mounting <SERVER IP>:<SERVER PATH>