View previous topic :: View next topic |
Author |
Message |
Nitro_146 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/9734462634226266663423.jpg)
Joined: 02 Mar 2005 Posts: 221 Location: Digne les bains, France
|
Posted: Mon Dec 30, 2013 4:34 pm Post subject: [solved] NFS Server not working after systemd migration |
|
|
Hi All,
I have a few directories exported via NFS to my wife's ubuntu box.
The shares ceased to work after I migrated to systemd (as well as syslog, but this is another story)
on the client side :
Code: | # showmount -e 192.168.1.2
clnt_create: RPC: Program not registered
|
Code: |
# mount -t nfs 192.168.1.2:/home/pierre/a_sauver/Photos_a_graver /tmp/test -v -o nfsvers=4,vers=4
mount.nfs: timeout set for Mon Dec 30 16:44:00 2013
mount.nfs: trying text-based options 'nfsvers=4,vers=4,addr=192.168.1.2,clientaddr=192.168.1.3'
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting 192.168.1.2:/home/pierre/a_sauver/Photos_a_graver
|
On the server side
Code: | #exportfs -rav
exporting 192.168.1.0/24:/home/pierre/partage_marine
exporting 192.168.1.0/24:/mnt/stockage/videos
exporting 192.168.1.0/24:/mnt/stockage/sauvegarde_photos/APN
exporting 192.168.1.0/24:/mnt/stockage/films_a_voir
exporting 192.168.1.0/24:/home/pierre/a_sauver/Photos_a_graver | Note that I also tried with /255.255.255.0 instead of /24
Code: | #systemctl --failed
UNIT LOAD ACTIVE SUB DESCRIPTION
rpc-mountd.service loaded failed failed NFS Mount Daemon
syslog-ng.service loaded failed failed System Logger Daemon
syslog.socket loaded failed failed Syslog Socket
|
Code: |
# systemctl -l status rpc-mountd
rpc-mountd.service - NFS Mount Daemon
Loaded: loaded (/usr/lib64/systemd/system/rpc-mountd.service; linked)
Active: failed (Result: exit-code) since lun. 2013-12-30 16:39:53 CET; 47min ago
Process: 24400 ExecStart=/usr/sbin/rpc.mountd $OPTS_RPC_MOUNTD (code=exited, status=1/FAILURE)
déc. 30 16:39:53 core-i5 rpc.mountd[24400]: Usage: rpc.mountd [-F|--foreground] [-h|--help] [-v|--version] [-d kind|--debug kind]
déc. 30 16:39:53 core-i5 systemd[1]: rpc-mountd.service: control process exited, code=exited status=1
déc. 30 16:39:53 core-i5 systemd[1]: Failed to start NFS Mount Daemon.
déc. 30 16:39:53 core-i5 systemd[1]: Unit rpc-mountd.service entered failed state.
|
Code: |
# showmount -e 192.168.1.2
clnt_create: RPC: Program not registered
|
Code: |
# rpcinfo -p 192.168.1.2
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100021 1 udp 53222 nlockmgr
100021 3 udp 53222 nlockmgr
100021 4 udp 53222 nlockmgr
100021 1 tcp 59595 nlockmgr
100021 3 tcp 59595 nlockmgr
100021 4 tcp 59595 nlockmgr
100024 1 udp 42683 status
100024 1 tcp 35679 status
|
I googled a bit and foud the ArchWiki nfs page (https://wiki.archlinux.org/index.php/NFS#Client)
but I am stuck because I cannot start rpc-idmapd.service and rpc-mountd.service
Anyone can help me ?
Thank you. _________________ Linux, cause booting is for adding new hardware
Last edited by Nitro_146 on Wed Jan 22, 2014 9:38 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Kompi Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/7308090353fede59e05795.gif)
Joined: 05 Oct 2002 Posts: 252 Location: Germany
|
Posted: Tue Dec 31, 2013 3:01 pm Post subject: |
|
|
You need quite a lot of services and some pseudo file systems mounted for nfs to work properly. When I switched to systemd there weren't any service files so I wrote my own. Took me a while, since it was a bit of a hassle to find out the right order and what I actually need. This is my setup for nfsv4:
proc-fs-nfsd.mount:
Code: | [Unit]
Description=/proc/fs/nfsd
Before=nfs.target
Before=rpc.nfsd.service
[Mount]
What=nfsd
Where=/proc/fs/nfsd
Type=nfsd
Options=nodev,noexec,nosuid
[Install]
WantedBy=nfs.target |
var-lib-nfs-rpc_pipefs.mount:
Code: | [Unit]
Description=rpc_pipefs
Before=nfs.target
Before=remote-fs-pre.target
[Mount]
What=rpc_pipefs
Where=/var/lib/nfs/rpc_pipefs
Type=rpc_pipefs
[Install]
WantedBy=nfs.target |
rpcbind.service:
Code: | [Unit]
Description=NFS port mapping server
Before=nfs.target
Before=remote-fs-pre.target
[Service]
EnvironmentFile=/etc/conf.d/rpcbind
ExecStart=/sbin/rpcbind $RPCBIND_OPTS
Type=forking
[Install]
WantedBy=nfs.target |
rpc.idmapd.service:
Code: | [Unit]
Description=NFSv4 ID - Name Mapper
Wants=rpcbind.service
Wants=var-lib-nfs-rpc_pipefs.mount
Wants=proc-fs-nfsd.mount
After=proc-fs-nfsd.mount
Before=nfs.target
Before=remote-fs-pre.target
[Service]
EnvironmentFile=/etc/conf.d/nfs
ExecStart=/usr/sbin/rpc.idmapd -f $OPTS_RPC_IDMAPD
[Install]
WantedBy=nfs.target |
rpc.mountd.service:
Code: | [Unit]
Description=RPC mountd
Wants=rpcbind.service
After=rpcbind.service
After=rpc.svcgssd.service
After=rpc.idmapd.service
Before=nfs.target
[Service]
EnvironmentFile=/etc/conf.d/nfs
ExecStart=/usr/sbin/rpc.mountd --foreground $OPTS_RPC_MOUNTD
[Install]
WantedBy=nfs.target |
rpc.statd.service:
Code: | [Unit]
Description=NFS status daemon
Wants=rpcbind.service
After=rpc.svcgssd.service
After=rpc.idmapd.service
After=rpc.mountd.service
Before=rpc.nfsd.service
Before=nfs.target
[Service]
EnvironmentFile=/etc/conf.d/nfs
ExecStart=/sbin/rpc.statd --no-notify -F $OPTS_RPC_STATD
|
sm-notify.service:
Code: | [Unit]
Description=NFS sm-notify
Wants=rpc.statd.service
Before=nfs.target
Before=remote-fs-pre.target
[Service]
EnvironmentFile=/etc/conf.d/nfs
ExecStart=/usr/sbin/sm-notify -d $OPTS_SMNOTIFY
Type=oneshot
[Install]
WantedBy=nfs.target |
rpc.gssd.service:
Code: | [Unit]
Description=NFS rpcsec_gss daemon
Wants=rpcbind.service
Wants=var-lib-nfs-rpc_pipefs.mount
After=var-lib-nfs-rpc_pipefs.mount
Before=nfs.target
Before=remote-fs-pre.target
# shutdown while sleeping, to re-authenticate with kerberos after resume
Conflicts=sleep.target
[Service]
EnvironmentFile=/etc/conf.d/nfs
ExecStart=/usr/sbin/rpc.gssd -f $OPTS_RPC_GSSD
Restart=on-failure
[Install]
WantedBy=nfs.target |
rpc.svcgssd.service:
Code: | [Unit]
Description=NFS rpcsec_gss server daemon
Wants=rpcbind.service
Wants=proc-fs-nfsd.mount
After=proc-fs-nfsd.mount
Before=nfs.target
[Service]
EnvironmentFile=/etc/conf.d/nfs
ExecStart=/usr/sbin/rpc.svcgssd -f ${OPTS_RPC_SCVGSSD}
Restart=on-failure
[Install]
WantedBy=nfs.target |
rpc.nfsd.service: Code: |
[Unit]
Description=NFS server
Wants=rpcbind.service
Wants=rpc.statd.service
Wants=rpc.mountd.service
After=rpcbind.service
After=rpc.statd.service
After=rpc.svcgssd.service
After=rpc.idmapd.service
Before=nfs.target
[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/conf.d/nfs
ExecStart=/usr/sbin/rpc.nfsd ${OPTS_RPC_NFSD}
ExecStop=/usr/sbin/rpc.nfsd 0
[Install]
WantedBy=nfs.target |
exportfs.service:
Code: | [Unit]
Description=NFS server exports
Wants=rpcbind.service
Wants=rpc.statd.service
After=rpc.mountd.service
After=rpc.statd.service
Before=nfs.target
[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/conf.d/nfs
ExecStart=/usr/sbin/exportfs -r
ExecStop=/usr/sbin/exportfs -ua
ExecReload=/usr/sbin/exportfs -r
[Install]
WantedBy=nfs.target |
nfs.target:
Code: | [Unit]
Description=NFS services
[Install]
WantedBy=multi-user.target |
The rpc.[svc]gssd services are only needed if you use nfsv4 with kerberos authentication. Enable rpc.gssd on the client and rpc.svcgssd on the server.
The rpc.mountd and rpc.statd, as well als sm-notify services are only necessary if you are using nfsv3 shared. Enable the first two on the server if you export nfsv3 shares, and sm-notify on the client.
To make it a little easier, these are the services you need to enable on the server:
Code: |
systemctl enable var-lib-nfs-rpc_pipefs.mount
systemctl enable proc-fs-nfsd.mount
systemctl enable rpcbind.service
systemctl enable rpc.idmapd.service
systemctl enable rpc.nfsd.service
systemctl enable exportfs.service
# for NFSv3 only:
systemctl enable rpc.mountd.service
systemctl enable rpc.statd.service
# for NFSv4 kerberos auth only:
systemctl enable rpc.svcgssd.service
# finally, enable nfs.target to start services at boot:
systemctl enable nfs.target
|
on the client:
Code: |
systemctl enable rpcbind.service
systemctl enable var-lib-nfs-rpc_pipefs.mount
systemctl enable rpc.idmapd.service
# for nfsv3 only:
systemctl enable sm-notify.service
# for nfsv4 kerberos auth only:
systemctl enable rpc.gssd.service
# finally, enable nfs.target to start services at boot:
systemctl enable nfs.target
|
Of course you need to add a "After=remote-fs-pre.target" in the [unit] section to any .mount unit on the client that should mount an nfs share.
Hope those files can help you. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Nitro_146 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/9734462634226266663423.jpg)
Joined: 02 Mar 2005 Posts: 221 Location: Digne les bains, France
|
Posted: Tue Dec 31, 2013 9:17 pm Post subject: |
|
|
Thank you for such a long and precise answer !
Right now, I am not on my gentoo box, but I will try this in a few days.
I will write down some feedback then. _________________ Linux, cause booting is for adding new hardware |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ese002 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/Futurama/cartoon_futurama_flexo.gif)
Joined: 20 Sep 2006 Posts: 155
|
Posted: Fri Jan 03, 2014 5:08 am Post subject: |
|
|
Thanks, Kompi!
I'm not the original poster but I had the exact same problem. I used your service files, not to directly execute but as a guide to find out what was missing. At this point, there are service files. They just don't seem to be entirely complete or documented. I determined that all I needed was the stock rpc-mountd.service
# systemctl enable rpc-mountd.service
# systemctl start rpc-mountd.service
And I'm golden! It is possible that another supplied service is necessary that I have enabled in my fumbling but no new service were needed. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
666threesixes666 Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/48510216954a8919d65183.jpg)
Joined: 31 May 2011 Posts: 1248 Location: 42.68n 85.41w
|
Posted: Fri Jan 03, 2014 5:14 am Post subject: |
|
|
bleh please file bugs to the tracker so the packages come as "just works" for systemd |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Nitro_146 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/9734462634226266663423.jpg)
Joined: 02 Mar 2005 Posts: 221 Location: Digne les bains, France
|
Posted: Fri Jan 03, 2014 9:09 am Post subject: |
|
|
Hello,
I am the original poster.
It is still not working for me, nfsd.service fails to start at boot
Code: | # systemctl --failed
UNIT LOAD ACTIVE SUB DESCRIPTION
nfsd.service loaded failed failed NFS server
syslog-ng.service loaded failed failed System Logger Daemon
syslog.socket loaded failed failed Syslog Socket |
I can start it manually, but it still does not work
Code: | # systemctl start nfsd
# showmount -e 192.168.1.2
clnt_create: RPC: Program not registered |
I cannot start rpc-mountd.service as suggested by ese002
Code: | # systemctl status rpc-mountd.service
rpc-mountd.service - NFS Mount Daemon
Loaded: loaded (/usr/lib64/systemd/system/rpc-mountd.service; disabled)
Active: failed (Result: exit-code) since ven. 2014-01-03 10:03:57 CET; 3min 36s ago
Process: 8729 ExecStart=/usr/sbin/rpc.mountd $OPTS_RPC_MOUNTD (code=exited, status=1/FAILURE)
janv. 03 10:03:57 core-i5 systemd[1]: Starting NFS Mount Daemon...
janv. 03 10:03:57 core-i5 systemd[1]: rpc-mountd.service: control process exited, cod...s=1
janv. 03 10:03:57 core-i5 systemd[1]: Failed to start NFS Mount Daemon.
janv. 03 10:03:57 core-i5 systemd[1]: Unit rpc-mountd.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full. |
@666threesixes666 : Should I file a bug for systemd package or nfs package ? _________________ Linux, cause booting is for adding new hardware |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ese002 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/Futurama/cartoon_futurama_flexo.gif)
Joined: 20 Sep 2006 Posts: 155
|
Posted: Sun Jan 05, 2014 5:48 am Post subject: |
|
|
What does journalctl report?
journalctl is the "native" logging method for systemd. If syslog isnt' running, it is your best bet to figuring out what is going on.
Is it possible that, in adding support for systemd in your kernel, that you inadvertently removed support for nfs? That would prevent nfsd from running.
If you still have the openrc files you could run /etc/init.d/nfs to determine if nfs is truly broken of it is just a systemd problem. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Nitro_146 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/9734462634226266663423.jpg)
Joined: 02 Mar 2005 Posts: 221 Location: Digne les bains, France
|
Posted: Sun Jan 05, 2014 8:18 am Post subject: |
|
|
Here are the logs related to nfs
Code: |
# journalctl | grep nfs
janv. 05 08:46:06 core-i5 kernel: Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
janv. 05 08:46:06 core-i5 systemd[1]: Mounting /proc/fs/nfsd...
janv. 05 08:46:06 core-i5 systemd[1]: Mounted /proc/fs/nfsd.
janv. 05 08:46:07 core-i5 rpc.nfsd[3216]: rpc.nfsd: Setting version failed: errno 22 (Invalid argument)
janv. 05 08:46:07 core-i5 rpc.nfsd[3215]: rpc.nfsd: Setting version failed: errno 22 (Invalid argument)
janv. 05 08:46:07 core-i5 rpc.nfsd[3216]: rpc.nfsd: unable to bind inet TCP socket: errno 98 (Address already in use)
janv. 05 08:46:07 core-i5 rpc.nfsd[3215]: rpc.nfsd: unable to bind inet6 TCP socket: errno 98 (Address already in use)
janv. 05 08:46:07 core-i5 kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
|
NFS is still activated in the kernel
Code: | │ < > NFS client support │
│ <*> NFS server support │
│ -*- NFS server support for NFS version 3 │
│ [ ] NFS server support for the NFSv3 ACL protocol extension │
│ [*] NFS server support for NFS version 4 │
│ [ ] NFS server manual fault injection │
│ [ ] RPC: Enable dprintk debugging │
│ < > Ceph distributed file system │
│ < > CIFS support (advanced network filesystem, SMBFS successor) │
│ < > NCP file system support (to mount NetWare volumes) │
│ < > Coda file system support (advanced network fs) │
│ < > Andrew File System support (AFS) │
│ |
I will try to launch nfs from openrc, later since I have a warning when I try to do it now, and I don't want to break my system at this moment... _________________ Linux, cause booting is for adding new hardware |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ese002 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/Futurama/cartoon_futurama_flexo.gif)
Joined: 20 Sep 2006 Posts: 155
|
Posted: Sun Jan 05, 2014 3:26 pm Post subject: |
|
|
Nitro_146 wrote: | Here are the logs related to nfs
Code: |
# journalctl | grep nfs
janv. 05 08:46:06 core-i5 kernel: Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
janv. 05 08:46:06 core-i5 systemd[1]: Mounting /proc/fs/nfsd...
janv. 05 08:46:06 core-i5 systemd[1]: Mounted /proc/fs/nfsd.
janv. 05 08:46:07 core-i5 rpc.nfsd[3216]: rpc.nfsd: Setting version failed: errno 22 (Invalid argument)
janv. 05 08:46:07 core-i5 rpc.nfsd[3215]: rpc.nfsd: Setting version failed: errno 22 (Invalid argument)
janv. 05 08:46:07 core-i5 rpc.nfsd[3216]: rpc.nfsd: unable to bind inet TCP socket: errno 98 (Address already in use)
janv. 05 08:46:07 core-i5 rpc.nfsd[3215]: rpc.nfsd: unable to bind inet6 TCP socket: errno 98 (Address already in use)
janv. 05 08:46:07 core-i5 kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
|
|
That suggests that nfsd is already running. The new launch is failing because it can't bind to the port. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Nitro_146 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/9734462634226266663423.jpg)
Joined: 02 Mar 2005 Posts: 221 Location: Digne les bains, France
|
Posted: Sun Jan 05, 2014 3:57 pm Post subject: |
|
|
But, if it is running, why my wife's box cannot mount the shared directories ?
Should I investigate on it ? _________________ Linux, cause booting is for adding new hardware |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ese002 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/Futurama/cartoon_futurama_flexo.gif)
Joined: 20 Sep 2006 Posts: 155
|
Posted: Sun Jan 05, 2014 5:35 pm Post subject: |
|
|
Nitro_146 wrote: | But, if it is running, why my wife's box cannot mount the shared directories ?
Should I investigate on it ? |
Running doesn't necessarily mean working. That was the situation I had. nfsd was running but without rpc-mountd, I could not mount the directories. At minimum, you need to make sure that nfs is shut down before starting again.
systemctrl stop nfsd.service
This should shut down nfsd assuming it was started by systemd. I'm not sure what it will do if nfsd was started manually or by openrc. The latter is a possibility. I found that with the recommended boot arg of Init=/usr/lib/systemd/systemd I got a broken openrc boot instead of a systemd boot. I had to change Init to real_init to get a clean systemd boot. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Nitro_146 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/9734462634226266663423.jpg)
Joined: 02 Mar 2005 Posts: 221 Location: Digne les bains, France
|
Posted: Sun Jan 05, 2014 7:45 pm Post subject: |
|
|
I stopped it and restarted it via systemctl. Remote connexion is still not possible.
I also have had to append real_init to my grub.conf to make it boot with systemd _________________ Linux, cause booting is for adding new hardware |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
666threesixes666 Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/48510216954a8919d65183.jpg)
Joined: 31 May 2011 Posts: 1248 Location: 42.68n 85.41w
|
Posted: Sun Jan 05, 2014 8:02 pm Post subject: |
|
|
im not sure if its systemd that the bug is filed against, im pretty sure it would be against nfs. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ese002 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/Futurama/cartoon_futurama_flexo.gif)
Joined: 20 Sep 2006 Posts: 155
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Nitro_146 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/9734462634226266663423.jpg)
Joined: 02 Mar 2005 Posts: 221 Location: Digne les bains, France
|
Posted: Sun Jan 19, 2014 10:24 am Post subject: |
|
|
Sorry to answer so late, but I have had some urgent stuff to do last couple weeks.
So if this is not a bug, how can I have my nfs shares to work ?
If needed I can restart it form the start if I am sure that will fix the problem. Do you know an up-to-date how-to (including systemd) ? _________________ Linux, cause booting is for adding new hardware |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ese002 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/Futurama/cartoon_futurama_flexo.gif)
Joined: 20 Sep 2006 Posts: 155
|
Posted: Mon Jan 20, 2014 10:03 pm Post subject: |
|
|
Nitro, the bug/nonbug in question is the lack of dependency for rpc-mountd. While you may have this problem too, it clearly isn't the only issue.
Previously, it appeared that you had another instance of nfsd running that was interfering with launching via systemd. You stopped and restart nfsd using sytstemd but that may not be sufficient. If nfsd was not started by systemd, then systemctl stop nfsd may not kill it. Check for it with ps (ps -eaf |grep nfsd). If necessary, you can pkill nfsd. Once you are sure there is no nfsd running, then you start it systemctl. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Nitro_146 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/9734462634226266663423.jpg)
Joined: 02 Mar 2005 Posts: 221 Location: Digne les bains, France
|
Posted: Tue Jan 21, 2014 9:43 pm Post subject: |
|
|
It seems that nfsd is started by systemctl
Code: | # ps -eaf |grep nfsd
root 3232 2 0 08:54 ? 00:00:00 [nfsd4]
root 3233 2 0 08:54 ? 00:00:00 [nfsd4_callbacks]
root 3237 2 0 08:54 ? 00:00:00 [nfsd]
root 3238 2 0 08:54 ? 00:00:00 [nfsd]
root 3239 2 0 08:54 ? 00:00:00 [nfsd]
root 3240 2 0 08:54 ? 00:00:00 [nfsd]
root 3241 2 0 08:54 ? 00:00:00 [nfsd]
root 3242 2 0 08:54 ? 00:00:00 [nfsd]
root 3243 2 0 08:54 ? 00:00:00 [nfsd]
root 3244 2 0 08:54 ? 00:00:00 [nfsd]
# systemctl stop nfsd
# ps -eaf |grep nfsd
root 9709 8755 0 22:38 pts/0 00:00:00 grep --colour=auto nfsd |
_________________ Linux, cause booting is for adding new hardware |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ese002 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/Futurama/cartoon_futurama_flexo.gif)
Joined: 20 Sep 2006 Posts: 155
|
Posted: Tue Jan 21, 2014 9:49 pm Post subject: |
|
|
Now, with nfsd not running, if you start it with systemctl, does it still complain about "Address already in use"? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Nitro_146 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/9734462634226266663423.jpg)
Joined: 02 Mar 2005 Posts: 221 Location: Digne les bains, France
|
Posted: Tue Jan 21, 2014 9:53 pm Post subject: |
|
|
No complaint at all, it starts flawlessly
Code: | # systemctl start nfsd |
_________________ Linux, cause booting is for adding new hardware |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ese002 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/Futurama/cartoon_futurama_flexo.gif)
Joined: 20 Sep 2006 Posts: 155
|
Posted: Tue Jan 21, 2014 10:00 pm Post subject: |
|
|
Is rpc-mountd running? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Nitro_146 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/9734462634226266663423.jpg)
Joined: 02 Mar 2005 Posts: 221 Location: Digne les bains, France
|
Posted: Tue Jan 21, 2014 10:20 pm Post subject: |
|
|
Not, it is not.
Code: | # systemctl -l status rpc-mountd
rpc-mountd.service - NFS Mount Daemon
Loaded: loaded (/usr/lib64/systemd/system/rpc-mountd.service; disabled)
Active: inactive (dead) |
And It does not start
Code: | # systemctl start rpc-mountd
Job for rpc-mountd.service failed. See 'systemctl status rpc-mountd.service' and 'journalctl -xn' for details. |
_________________ Linux, cause booting is for adding new hardware |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ese002 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/Futurama/cartoon_futurama_flexo.gif)
Joined: 20 Sep 2006 Posts: 155
|
Posted: Tue Jan 21, 2014 10:35 pm Post subject: |
|
|
Is rpc-mountd.service enabled?
systemctl enable rpc-mountd.service
systemctl start rpc-mountd.service
If that works, then restart nfsd and see if it works. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Nitro_146 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/9734462634226266663423.jpg)
Joined: 02 Mar 2005 Posts: 221 Location: Digne les bains, France
|
Posted: Tue Jan 21, 2014 10:55 pm Post subject: |
|
|
Unfortunately, it does not work
Code: | # systemctl enable rpc-mountd.service
ln -s '/usr/lib64/systemd/system/rpc-mountd.service' '/etc/systemd/system/multi-user.target.wants/rpc-mountd.service'
# systemctl start rpc-mountd.service
Job for rpc-mountd.service failed. See 'systemctl status rpc-mountd.service' and 'journalctl -xn' for details.
# systemctl -l status rpc-mountd.service
rpc-mountd.service - NFS Mount Daemon
Loaded: loaded (/usr/lib64/systemd/system/rpc-mountd.service; enabled)
Active: failed (Result: exit-code) since mar. 2014-01-21 23:48:33 CET; 11s ago
Process: 31990 ExecStart=/usr/sbin/rpc.mountd $OPTS_RPC_MOUNTD (code=exited, status=1/FAILURE)
janv. 21 23:48:33 core-i5 rpc.mountd[31990]: Usage: rpc.mountd [-F|--foreground] [-h|--help] [-v|--version] [-d kind|--debug kind]
janv. 21 23:48:33 core-i5 rpc.mountd[31990]: [-o num|--descriptors num] [-f exports-file|--exports-file=file]
janv. 21 23:48:33 core-i5 rpc.mountd[31990]: [-p|--port port] [-V version|--nfs-version version]
janv. 21 23:48:33 core-i5 rpc.mountd[31990]: [-N version|--no-nfs-version version] [-n|--no-tcp]
janv. 21 23:48:33 core-i5 rpc.mountd[31990]: [-H ha-callout-prog] [-s|--state-directory-path path]
janv. 21 23:48:33 core-i5 rpc.mountd[31990]: [-g|--manage-gids] [-t num|--num-threads=num] [-u|--no-udp]
janv. 21 23:48:33 core-i5 systemd[1]: rpc-mountd.service: control process exited, code=exited status=1
janv. 21 23:48:33 core-i5 systemd[1]: Failed to start NFS Mount Daemon.
janv. 21 23:48:33 core-i5 systemd[1]: Unit rpc-mountd.service entered failed state. |
_________________ Linux, cause booting is for adding new hardware |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
ese002 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/Futurama/cartoon_futurama_flexo.gif)
Joined: 20 Sep 2006 Posts: 155
|
Posted: Tue Jan 21, 2014 11:12 pm Post subject: |
|
|
Nitro_146 wrote: | Unfortunately, it does not work
Code: | # systemctl enable rpc-mountd.service
ln -s '/usr/lib64/systemd/system/rpc-mountd.service' '/etc/systemd/system/multi-user.target.wants/rpc-mountd.service'
# systemctl start rpc-mountd.service
Job for rpc-mountd.service failed. See 'systemctl status rpc-mountd.service' and 'journalctl -xn' for details.
# systemctl -l status rpc-mountd.service
rpc-mountd.service - NFS Mount Daemon
Loaded: loaded (/usr/lib64/systemd/system/rpc-mountd.service; enabled)
Active: failed (Result: exit-code) since mar. 2014-01-21 23:48:33 CET; 11s ago
Process: 31990 ExecStart=/usr/sbin/rpc.mountd $OPTS_RPC_MOUNTD (code=exited, status=1/FAILURE)
janv. 21 23:48:33 core-i5 rpc.mountd[31990]: Usage: rpc.mountd [-F|--foreground] [-h|--help] [-v|--version] [-d kind|--debug kind]
janv. 21 23:48:33 core-i5 rpc.mountd[31990]: [-o num|--descriptors num] [-f exports-file|--exports-file=file]
janv. 21 23:48:33 core-i5 rpc.mountd[31990]: [-p|--port port] [-V version|--nfs-version version]
janv. 21 23:48:33 core-i5 rpc.mountd[31990]: [-N version|--no-nfs-version version] [-n|--no-tcp]
janv. 21 23:48:33 core-i5 rpc.mountd[31990]: [-H ha-callout-prog] [-s|--state-directory-path path]
janv. 21 23:48:33 core-i5 rpc.mountd[31990]: [-g|--manage-gids] [-t num|--num-threads=num] [-u|--no-udp]
janv. 21 23:48:33 core-i5 systemd[1]: rpc-mountd.service: control process exited, code=exited status=1
janv. 21 23:48:33 core-i5 systemd[1]: Failed to start NFS Mount Daemon.
janv. 21 23:48:33 core-i5 systemd[1]: Unit rpc-mountd.service entered failed state. |
|
Well, at least you know the issue is rpc-mountd. Looks like the service file is messed up. Did you edit your copy? Unfortunately, I'm not at my machine so I can't tell what it is "supposed" to look like. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Nitro_146 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/9734462634226266663423.jpg)
Joined: 02 Mar 2005 Posts: 221 Location: Digne les bains, France
|
Posted: Tue Jan 21, 2014 11:18 pm Post subject: |
|
|
If by «edit your copy» you mean modify some file, I don't remember exactly. I have this issue for 2 month now and I have tried several fixes.
Should I backup my config file, unmerge nfsd (and some other package) and emerge it again ? _________________ Linux, cause booting is for adding new hardware |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|