Não consigo iniciar um servidor NFS no CentOS7.
Os pacotes baixados:
yum -y install nfs-utils
yum -y install nfs-utils-lib
Ativar / iniciar serviços
systemctl enable/start rpcbind
systemctl enable/start nfs-server
systemctl enable/start nfs-lock
systemctl enable/start nfs-idmap
O que leva a :
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
Criou o compartilhamento:
mkdir -p /test
chmod 777 /test
bem exportado:
exportfs
/test clientip/24
No entanto, ao executar a systemctl
reinicialização nfs-server
, ela falha com o erro de dependência, journalctl
mostra:
[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
E o systemctl
status das unidades de lista também mostra falha
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.
O cliente relata e presumo que seja normal conforme os erros acima:
RPC: Remote system errorRPC: Port mapper failure - RPC: Timed out.
Respostas:
Resolvi esse problema com a postagem de @ user136564.
Descobri que meu problema era o rpcbind não iniciar na inicialização, mesmo que eu o tenha ativado no systemd e que possa iniciá-lo manualmente.
Esses comandos foram o que eu fiz no CentOS Linux versão 7.2.1511 (Core)
Instale o nfs-utils
Anexar texto a
/etc/fstab
Alguns artigos disseram que
noauto,x-systemd.automount
é melhor, mas funcionou semnoauto
mim.Verifique se a montagem funciona
Corrija o problema O CentOS 7 não montará automaticamente o NFS na inicialização
Anexar texto ao final de /usr/lib/systemd/system/nfs-idmap.service Anexar texto ao final de /usr/lib/systemd/system/nfs-lock.serviceAtivar serviços relacionados
Então reiniciei o sistema operacional, eu entendi.
fonte