挂载虚拟机的时候报错如下:
~ # mount 10.10.8.166:/home/ytj/hi3516/nfs /userdata/xinying/
mount: mounting 10.10.8.166:/home/ytj/hi3516/nfs on /userdata/xinying/ failed: No route to host
~ # mount -t nfs -nolock 10.10.8.166:/home/ytj/hi3516/nfs /userdata/xinying/
mount: mounting 10.10.8.166:/home/ytj/hi3516/nfs on /userdata/xinying/ failed: No route to host
~ # ping 10.10.8.166
PING 10.10.8.166 (10.10.8.166): 56 data bytes
64 bytes from 10.10.8.166: seq=0 ttl=64 time=0.637 ms
64 bytes from 10.10.8.166: seq=1 ttl=64 time=0.735 ms
查了一下,都说看看防火墙的状态,关闭防火墙(虚拟机和服务器的IP都可以ping通)
查看防火墙状态 ufw status
root@ubuntu:/home/ytj# ufw status
Status: inactive
还是不行
试了半天,用另一个命令查看防火墙状态
systemctl status firewalld.service
systemctl status firewalld
root@ubuntu:/home/ytj# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2021-07-27 20:24:57 PDT; 2h 40min ago
Main PID: 881 (firewalld)
CGroup: /system.slice/firewalld.service
└─881 /usr/bin/python3 -Es /usr/sbin/firewalld --nofork --nopid
root@ubuntu:/home/ytj# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2021-07-27 20:24:57 PDT; 2h 46min ago
Main PID: 881 (firewalld)
CGroup: /system.slice/firewalld.service
└─881 /usr/bin/python3 -Es /usr/sbin/firewalld --nofork --nopid
这防火墙应该是开着呢,运行
systemctl stop firewalld
关闭防火墙
root@ubuntu:/home/ytj# systemctl stop firewalld
root@ubuntu:/home/ytj# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Tue 2021-07-27 23:12:14 PDT; 2s ago
Process: 881 ExecStart=/usr/sbin/firewalld --nofork --nopid (code=exited, status=0/SUCCESS)
Main PID: 881 (code=exited, status=0/SUCCESS)
唉,这咋不同命令结果还不一样的,懂的小伙伴留个言解释一下
然后再挂载就是报超时, 暂未解决