所用linux系统为ubuntu13.10
问题1:在挂载NFS文件系统时 mount 192.168.18.3:/home/gzz/root_nfs /mnt
总出现mount.nfs: access denied by server while mounting 192.168.18.3:/home/gzz/root_nfs
防火墙也不关了,还是不行
解决:把/etc/exports文件中的网段限制去了,只剩一个*(rw,sync,no_root_squash)
/home/gzz/root_nfs *(rw,sync,no_root_squash),就行了
问题2
执行/etc/init.d/nfs-kernel-server restart时,出现了
exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.18.*:/home/gzz/root_nfs".
Assuming default behaviour ('no_subtree_check').
NOTE: this default has changed since nfs-utils version 1.0.x
解决:
把配置文件中的权限选项改成了*(rw,sync,no_subtree_check)
再重启NFS时
* Stopping NFS kernel daemon [ OK ]
* Unexporting directories for NFS kernel daemon... [ OK ]
* Exporting directories for NFS kernel daemon... [ OK ]
* Starting NFS kernel daemon [ OK ]
就正常了
问题补充,但是no_subtree_check替换no_root_squash后,在开发板挂载NFS时挂载不成功,
解决,,又把no_root_squash加进去了,挂载成功了,即改为*(rw,sync,no_root_squash,no_subtree_check)