我无法在CentOS7中启动NFS服务器。
下载的软件包:
yum -y install nfs-utils
yum -y install nfs-utils-lib
启用/启动服务
systemctl enable/start rpcbind
systemctl enable/start nfs-server
systemctl enable/start nfs-lock
systemctl enable/start nfs-idmap
这导致 :
systemctl enable nfs-lock
Failed to issue method call: No such file or directory
systemctl enable nfs-idmap
Failed to issue method call: No such file or directory
创建了共享:
mkdir -p /test
chmod 777 /test
出口罚款:
exportfs
/test clientip/24
但是,在执行systemctl
restart时nfs-server
,它失败并journalctl
显示依赖性错误,显示:
[user@server /]# journalctl -xn | grep failed
-- Subject: Unit proc-fs-nfsd.mount has failed
-- Unit proc-fs-nfsd.mount has failed.
-- The result is failed.
Jun 23 17:06:41 server systemd[1]: Dependency failed for NFS server and services.
-- Subject: Unit nfs-server.service has failed
-- Unit nfs-server.service has failed.
Jun 23 17:06:41 server systemd[1]: Dependency failed for NFS Mount Daemon.
-- Subject: Unit nfs-mountd.service has failed
-- Unit nfs-mountd.service has failed.
Jun 23 17:06:41 open
并且systemctl
列表单元状态也显示失败
systemctl list-units | grep nfs
proc-fs-nfsd.mount loaded failed failed NFSD configuration filesystem
var-lib-nfs-rpc_pipefs.mount loaded failed failed RPC Pipe File System
nfs-config.service loaded active exited Preprocess NFS configuration
nfs-idmapd.service loaded failed failed NFSv4 ID-name mapping service
/var/log/messages
:
Jun 23 17:06:41 server systemd: Dependency failed for RPC security service for NFS server.
Jun 23 17:06:41 server systemd: Dependency failed for RPC security service for NFS client and server.
Jun 23 17:06:41 server systemd: Unit var-lib-nfs-rpc_pipefs.mount entered failed state.
Jun 23 17:06:41 server systemd: nfs-idmapd.service: control process exited, code=exited status=1
Jun 23 17:06:41 server systemd: Unit nfs-idmapd.service entered failed state.
Jun 23 17:06:41 server systemd: proc-fs-nfsd.mount mount process exited, code=exited status=32
Jun 23 17:06:41 server systemd: Dependency failed for NFS server and services.
Jun 23 17:06:41 server systemd: Dependency failed for NFS Mount Daemon.
Jun 23 17:06:41 server systemd: Unit proc-fs-nfsd.mount entered failed state.
Jun 23 17:12:53 server mount: mount: unknown filesystem type 'nfsd'
Jun 23 17:12:53 server systemd: proc-fs-nfsd.mount mount process exited, code=exited status=32
Jun 23 17:12:53 server rpc.idmapd[842]: main: open(/var/lib/nfs/rpc_pipefs//nfs): No such file or directory
Jun 23 17:12:53 server systemd: Dependency failed for NFS server and services.
Jun 23 17:12:53 server systemd: Dependency failed for NFSv4 ID-name mapping service.
Jun 23 17:12:53 server systemd: Dependency failed for NFS Mount Daemon.
Jun 23 17:12:53 server systemd: Unit proc-fs-nfsd.mount entered failed state.
客户报告,并且我认为根据上述错误是正常的:
RPC: Remote system errorRPC: Port mapper failure - RPC: Timed out.
1
发现了可能是根本原因。服务器是openvz环境的一部分,并且正在运行“ stab”内核:Linux版本2.6.32-042stab106.4有更多经验的人可以确认它,但是我认为这是问题所在:此内核/环境的NFS功能有限。
—
user2575509
也可能与systemd有关;参见:bugzilla.redhat.com/show_bug.cgi?id=1159308
—
Jeff Schaller
这解决了我的问题centos.org/forums/viewtopic.php?f=47&t=53896希望这对您有所帮助!
—
user136564 2015年