无法将远程 NFS 共享挂载到 NFS 客户端

无法将远程 NFS 共享挂载到 NFS 客户端

在 NFS 服务器(CentOS)上:

[root@localhost ~]# cat /etc/exports

/IT_Projects 192.168.56.0/25(ro,root_squash)

eth1      Link encap:Ethernet  HWaddr 08:00:27:C4:A8:B6  
          inet addr:192.168.56.101  Bcast:192.168.56.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fec4:a8b6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1790 errors:0 dropped:0 overruns:0 frame:0
          TX packets:230 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:252381 (246.4 KiB)  TX bytes:27381 (26.7 KiB)

在 NFS 客户端 (CentOS) 上:

 eth1      Link encap:Ethernet  HWaddr 08:00:27:C4:A8:B6  
              inet addr:192.168.56.102  Bcast:192.168.56.255  Mask:255.255.255.0
              inet6 addr: fe80::a00:27ff:fec4:a8b6/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1609 errors:0 dropped:0 overruns:0 frame:0
              TX packets:145 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:231539 (226.1 KiB)  TX bytes:11555 (11.2 KiB)


[root@localhost ~]# mount -t nfs4 192.168.56.101:/IT_Projects /mnt/proj

导致连接超时。

[root@localhost ~]# dmesg | tail
sf_read_super_aux err=-71
sf_read_super_aux err=-71
sf_read_super_aux err=-71
fuse init (API version 7.16)
FS-Cache: Loaded
FS-Cache: Netfs 'nfs' registered for caching
EXT3-fs (sdc2): error: no journal found. mounting ext3 over ext2?
Installing knfsd (copyright (C) 1996 [email protected]).
NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
NFSD: starting 90-second grace period

[root@localhost ~]# ping 192.168.56.102
PING 192.168.56.102 (192.168.56.102) 56(84) bytes of data.
64 bytes from 192.168.56.102: icmp_seq=1 ttl=64 time=0.422 ms

可以从服务器 ping 客户端。

我已经关闭了 SELinux,并在 NFS 客户端和服务器上启动了 rpcbind、nfs、守护进程。我还在服务器上的 /etc/nfsmount.conf 中更改了 Defvers=3 ,但没有效果。我可以探索哪些其他途径来解决该问题?

    [root@localhost ~]# rpcinfo -p 192.168.56.101
rpcinfo: can't contact portmapper: RPC: Remote system error - No route to host

[root@localhost IT_Projects]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED 
ACCEPT     icmp --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh 
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited 

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited 

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination 

相关内容