IT Analyst; Lic. Computer Science, Bel. in Theology, Esp. Biblical Theology, Esp. in New Testament Theology, Esp. in Systematic Theology and Esp. Computer Network.
Eu estava ocupado configurando um docker-volume-netshareplug-in para usar o NFS Volumes for Docker, que depende do nfs-utils/nfs-commonpacote e, ao tentar iniciar o serviço, descobri que o nfs-commonserviço é masked:
12
$ sudo systemctl start docker-volume-netshare.service
Failed to start docker-volume-netshare.service: Unit nfs-common.service is masked.
Olhando para o nfs-commonserviço:
1234567
sudo systemctl is-enabled nfs-common
masked
$ sudo systemctl enable nfs-common
Synchronizing state of nfs-common.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable nfs-common
Failed to enable unit: Unit file /lib/systemd/system/nfs-common.service is masked.
Parece que o arquivo da unidade possui um link simbólico para / dev / null:
12
$ file /lib/systemd/system/nfs-common.service
/lib/systemd/system/nfs-common.service: symbolic link to /dev/null
Consegui desmascarar o serviço removendo o arquivo:
1
$ sudo rm /lib/systemd/system/nfs-common.service
Em seguida, recarregue o daemon:
1
$ sudo systemctl daemon-reload
Como podemos ver, o nfs-commonserviço não está sendo executado:
12345
$ sudo systemctl status nfs-common
● nfs-common.service - LSB: NFS support files common to client and server
Loaded: loaded (/etc/init.d/nfs-common; generated; vendor preset: enabled) Active: inactive (dead) Docs: man:systemd-sysv-generator(8)
Vamos em frente e iniciar o serviço:
12345678910
$ sudo systemctl start nfs-common
$ sudo systemctl status nfs-common
● nfs-common.service - LSB: NFS support files common to client and server
Loaded: loaded (/etc/init.d/nfs-common; generated; vendor preset: enabled) Active: active (running) since Sat 2017-12-09 08:59:47 SAST; 2s ago
Docs: man:systemd-sysv-generator(8) Process: 7382ExecStart=/etc/init.d/nfs-common start (code=exited, status=0/SUCCESS) CPU: 162ms
CGroup: /system.slice/nfs-common.service
└─7403 /usr/sbin/rpc.idmapd
Agora podemos ver que o serviço é desmascarado e iniciado, lembre-se de ativar o serviço na inicialização:
123456
$ sudo systemctl enable nfs-common
nfs-common.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable nfs-common
$ sudo systemctl is-enabled nfs-common
enabled
Social