一、问题描述
关于centos6.8操作系统上mount挂载nfs路径服务端资共享路径(详细的配置操作步骤参见其他文章),报mount.nfs: Connection timed out'异常,具体配置如下所示
服务端配置如下
![]() 1 2 | [root@centos6 xwood-editor] # vi /etc/exports /home/share 192.168.1.0 /200 (r) |
客户端操作
![]() 1 | [root@raid2t xwood-editor] # mount 192.168.1.202:/home/share /home/202/ |
二、解决方法
1. 设置服务端/etc/share的权限(755),并关闭服务端防火墙
![]() 1 2 3 4 5 6 | [root@centos6 init.d] # chmod -R 755 /home/share [root@centos6 init.d] # service iptables stop iptables:将链设置为政策 ACCEPT:nat mangle filter [确定] iptables:清除防火墙规则:[确定] iptables:正在卸载模块:[确定] |
2. 纠正服务端配置,并重启nfs、rpcbind服务
![]() 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | [root@centos6 init.d] # vi /etc/exports /home/share *(insecure,rw,async,no_root_squash) ~ '/etc/exports' 3L, 51C written [root@centos6 init.d] # service nfs restart 关闭 NFS 守护进程:[确定] 关闭 NFS mountd:[确定] 关闭 NFS quotas:[确定] Shutting down RPC idmapd: [确定] 启动 NFS 服务: [确定] 关掉 NFS 配额:[确定] 启动 NFS mountd:[确定] 启动 NFS 守护进程:[确定] 正在启动 RPC idmapd:[确定] [root@centos6 init.d] # service rpcbind restart 停止 rpcbind:[确定] 正在启动 rpcbind:[确定] |
3. 客户端重新挂载mount操作
![]() 1 | [root@raid2t 202] # mount -t nfs 192.168.1.202:/home/share/ /home/202/ |
联系客服