【arm问题一】nfs始终报错Remote system error - No route to host

查看nfs的运行状态

[root@localhost helloworld]# service nfs status
rpc.svcgssd is stopped
rpc.mountd (pid 2612) is running...
nfsd (pid 2628 2627 2626 2625 2624 2623 2622 2621) is running...
rpc.rquotad (pid 2607) is running...
记得开启服务 start restart stop status

将要共享的目录写到exports文件中 假设共享的目录为/home/jimiy/text

 vim /etc/exports

在exports文件中添加

/home/jimiy/text *(rw,sync,no_root_squash)

重启nfs 或者使用exportfs命令使设置生效

重启nfs:
service nfs restart
用exportfs
exportfs -rv
#exportfs用法
-a :全部mount或者unmount /etc/exports中的内容
-r :重新mount /etc/exports中分享出来的目录
-u :umount 目录
-v :将详细的信息输出到屏幕上

这样nfs的服务器端就设置好了。

在客户端挂载该目录:

在本地创建挂载的目录
root@freescale ~$ mount -t nfs -o nolock 192.168.1.209:/home/jimiy/text /mnt/new
1/
root@freescale ~$ cd /mnt/new1/

此时,如果服务器端的防火墙有开着的话,将会提示错误
mount: RPC: Remote system error - No route to host

只需关闭防火墙即可。
service iptables stop

猜你喜欢

转载自blog.csdn.net/xiaorui51/article/details/50913007