Não é possível iniciar o NFS no Centos 7: Falha ao emitir chamada de método: Nenhum arquivo ou diretório

8

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

Criado o compartilhamento:

mkdir -p /test
chmod 777 /test

exportado bem:

exportfs
/test           clientip/24

No entanto, ao executar systemctl restart nfs-server , ele falha com 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 status systemctl list-units 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 reporta, e eu suponho que seja normal de acordo com os erros acima:

RPC: Remote system errorRPC: Port mapper failure - RPC: Timed out.
    
por user2575509 23.06.2015 / 23:27

1 resposta

4

Eu resolvi este problema com o post do @ user136564.

This solved my issue https://www.centos.org/forums/viewtopic.php?f=47&t=53896

Eu descobri que meu problema era que o rpcbind não iniciava na inicialização, embora eu o tenha ativado no systemd e eu pudesse iniciá-lo manualmente.

Estes comandos são o que eu fiz no lançamento do CentOS Linux 7.2.1511 (Core)

Instalar o nfs-utils

yum install -y nfs-utils

Anexar texto a /etc/fstab

192.168.1.100:/mnt/nfs-server /mnt/nfs-client nfs defaults,nofail,x-systemd.automount 0 0

Alguns artigos disseram que noauto,x-systemd.automount é melhor, mas funcionou sem noauto para mim.

Verifique se a montagem funciona

systemctl start rpcbind
systemctl enable rpcbind
mount -a

Corrigir o problema O CentOS 7 não montará automaticamente o NFS na inicialização

Anexar o texto ao final de /usr/lib/systemd/system/nfs-idmap.service
[Install]
WantedBy=multi-user.target
Anexar o texto ao final de /usr/lib/systemd/system/nfs-lock.service
[Install]
WantedBy=nfs.target

Ativar serviços relacionados

systemctl enable nfs-idmapd.service 
systemctl enable rpc-statd.service 

systemctl enable rpcbind.socket

systemctl status nfs-idmapd.service -l
systemctl status rpc-statd.service –l

Em seguida, reiniciei o sistema operacional, eu entendi.

shutdown -r now
    
por 19.01.2016 / 05:53

Tags