无法挂载nfs,查看状态是exited,其实是iptables没有打开

无法挂载nfs,查看状态是exited,其实是iptables没有打开

查看服务运行的相关端口情况,使用rpcinfo -p

nfs 运行在2049端口。

iptables -A INPUT -p tcp -m tcp --dport 2049 -j ACCEPT
iptables -A INPUT -p udp -m udp --dport 2049 -j ACCEPT

打开防火墙后,就可以正常挂载了。

iptables 持久化:
https://www.linuxmi.com/debian-ubuntu-iptables.html

尽管是这样的信息,是没问题的:

leon@leon:~$ sudo systemctl status nfs-kernel-server
● nfs-server.service - NFS server and services
Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled)
Drop-In: /run/systemd/generator/nfs-server.service.d
└─order-with-mounts.conf
Active: active (exited) since Thu 2022-03-31 17:00:15 CST; 12min ago
Process: 804417 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
Process: 804418 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
Main PID: 804418 (code=exited, status=0/SUCCESS)

Mar 31 17:00:14 leon.local systemd[1]: Starting NFS server and services…
Mar 31 17:00:15 leon.local systemd[1]: Finished NFS server and services.

journalctl -n 100

Mar 31 16:54:12 leon.local systemd[1]: Starting NFSv4 ID-name mapping service…
Mar 31 16:54:12 leon.local systemd[1]: Starting NFS Mount Daemon…
Mar 31 16:54:12 leon.local systemd[1]: Condition check resulted in RPC security service for NFS client and server being skipped.
Mar 31 16:54:12 leon.local systemd[1]: Condition check resulted in RPC security service for NFS server being skipped.
Mar 31 16:54:12 leon.local systemd[1]: Started NFSv4 ID-name mapping service.
Mar 31 16:54:12 leon.local rpc.mountd[801532]: Version 1.3.3 starting
Mar 31 16:54:12 leon.local systemd[1]: Started NFS Mount Daemon.
Mar 31 16:54:12 leon.local systemd[1]: Starting NFS server and services…
Mar 31 16:54:13 leon.local kernel: NFSD: Using UMH upcall client tracking operations.
Mar 31 16:54:13 leon.local kernel: NFSD: starting 90-second grace period (net f00000b0)
Mar 31 16:54:13 leon.local systemd[1]: Finished NFS server and services.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值