我正在尝试mount
NFS 卷,但没有成功。我正在将 Linux 7.3 作为虚拟机运行。我在 中没有看到任何错误消息/var/log/messages
。这些是我到目前为止所采取的步骤:
[root@backup ~]# showmount -e 192.168.1.212
clnt_create: RPC: Program not registered
systemd NFS 状态
[root@backup ~]# systemctl status nfs
â nfs-server.service - NFS server and services
Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; vendor preset: disabled)
Active: active (exited) since Fri 2018-08-10 13:38:11 MDT; 26min ago
Process: 961 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
Process: 939 ExecStartPre=/bin/sh -c /bin/kill -HUP `cat /run/gssproxy.pid` (code=exited, status=0/SUCCESS)
Process: 937 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
Main PID: 961 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/nfs-server.service
Aug 10 13:38:11 backup systemd[1]: Starting NFS server and services...
Aug 10 13:38:11 backup systemd[1]: Started NFS server and services.
网络文件系统锁
[root@backup ~]# systemctl status nfslock
â rpc-statd.service - NFS status monitor for NFSv2/3 locking.
Loaded: loaded (/usr/lib/systemd/system/rpc-statd.service; static; vendor preset: disabled)
Active: active (running) since Fri 2018-08-10 13:38:11 MDT; 27min ago
Process: 926 ExecStart=/usr/sbin/rpc.statd $STATDARGS (code=exited, status=0/SUCCESS)
Main PID: 933 (rpc.statd)
CGroup: /system.slice/rpc-statd.service
ââ933 /usr/sbin/rpc.statd
Aug 10 13:38:11 backup systemd[1]: Starting NFS status monitor for NFSv2/3 locking....
Aug 10 13:38:11 backup rpc.statd[933]: Version 1.3.0 starting
Aug 10 13:38:11 backup rpc.statd[933]: Flags: TI-RPC
Aug 10 13:38:11 backup systemd[1]: Started NFS status monitor for NFSv2/3 locking..
systemd rpcbind 状态
[root@backup ~]# systemctl status rpcbind
â rpcbind.service - RPC bind service
Loaded: loaded (/usr/lib/systemd/system/rpcbind.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2018-08-10 13:38:10 MDT; 28min ago
Process: 685 ExecStart=/sbin/rpcbind -w $RPCBIND_ARGS (code=exited, status=0/SUCCESS)
Main PID: 688 (rpcbind)
CGroup: /system.slice/rpcbind.service
ââ688 /sbin/rpcbind -w
Aug 10 13:38:10 backup systemd[1]: Starting RPC bind service...
Aug 10 13:38:10 backup systemd[1]: Started RPC bind service.
rpc信息
[root@backup ~]# rpcinfo -p 192.168.1.212 | cut -c30- | sort -u
portmapper
service
ypbind
我不明白为什么rpcinfo
缺少 NFS?我可以尝试使用其他命令来解决此问题吗?
答案1
消息“程序未注册”表明服务器上有问题,至少我假设 192.168.1.212 是您的服务器,因为不需要添加地址到 showmount 来获取有关本地主机的信息。
所以你应该确保服务器上正在运行NFS服务器。从...开始
rpcinfo 192.168.1.212
如果可能的话,验证进程是否正在服务器上运行。
答案2
确保 nfs-mountd 服务正在运行:
systemctl status nfs-mountd
根据需要重新启动 nfs-server 服务