3, 客户端执行命令showmount -e nfs-server时,报错误:mount clntudp_create: RPC: Program not registered。 nfs、rpcbind服务没有启动,使用chkconfig把nfs、rpcbind加到系统服务中并用service来启动 或者在/etc/hosts.allow中添加允许客户端访问的规则 ALL:192.168.0.135
4, 客户端执行命令showmount -e nfs-server时,报错误:rpc mount export: RPC: Unable to receive; errno = No route to host 配置文件:/etc/sysconfig/nfs 找到nfs服务相关端口设置的地方,并移除注释后,在iptables防火墙设置中指定允许相应端口的Udp,tcp流通过。 #MOUNTD_PORT=892 #STATD_PORT=662 #LOCKD_TCPPORT=32803 #LOCKD_UDPPORT=32769 iptables -A INPUT -p TCP --dport 662 -m state --state NEW -j ACCEPT iptables -A INPUT -p UDP --dport 661 -m state --state NEW -j ACCEPT
5, showmount -e nfs-server成功,正式挂载时报错:mount: mount to NFS server '192.168.1.5' failed: System Error: No route to host.这是由于nfs服务的默认端口2049被防火墙阻塞了,和上面类似修改iptables允许2049端口通过
6, showmount -e nfs-server成功,正式挂载时报错:mount: mount to NFS server '192.168.1.5' failed: timed out (retrying). 编辑/etc/sysconfig/iptables时,相关端口的tcp端口允许通过,而udp不允许。其他可能的原因参考:mount command fails with NFS server failed error. Disable name lookup requests from NFS server to a DNS server. or NFS version used by the NFS client is other than version 3.