You are not logged in.

#1 2024-08-13 19:59:14

SunBlade
Member
From: at home
Registered: 2023-02-18
Posts: 23

[SOLVED] you need to reboot after nfs server install

Edit: failure can not be reproduced.
---

after a few hours of troubleshooting i finally found this thread: https://bbs.archlinux.org/viewtopic.php?id=152071

after you install the NFS Server you NEED to reboot. The server will refuse to work until you do.

i hope someone puts this message in the nfs-util package to save some headaches.

so, whenever systemd fails to start the nfs server and gives you some dependency errors, you probably forgot to restart.

Aug 13 21:10:23 systemd[1]: Dependency failed for NFSv4 ID-name mapping service.
Aug 13 21:10:23 systemd[1]: nfs-idmapd.service: Job nfs-idmapd.service/start failed with result 'dependency'.
Aug 13 21:10:23 systemd[1]: Dependency failed for NFSv4 Client Tracking Daemon.
Aug 13 21:10:23 systemd[1]: nfsdcld.service: Job nfsdcld.service/start failed with result 'dependency'.
Aug 13 21:10:23 systemd[1]: Dependency failed for NFSv4 Mount Daemon.
Aug 13 21:10:23 systemd[1]: Dependency failed for NFSv4 server and services.
Aug 13 21:10:23 systemd[1]: nfsv4-server.service: Job nfsv4-server.service/start failed with result 'dependency'.
Aug 13 21:10:23 systemd[1]: nfsv4-exportd.service: Job nfsv4-exportd.service/start failed with result 'dependency'.
Aug 13 21:10:23 systemd[1]: Dependency failed for NFS server and services.
Aug 13 21:10:23 systemd[1]: Dependency failed for NFS Mount Daemon.
Aug 13 21:10:23 systemd[1]: nfs-mountd.service: Job nfs-mountd.service/start failed with result 'dependency'.
Aug 13 21:10:23 systemd[1]: nfs-server.service: Job nfs-server.service/start failed with result 'dependency'.

Last edited by SunBlade (Yesterday 20:39:12)


Live your life, you got only one.

Offline

#2 2024-08-13 20:15:59

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 22,887

Re: [SOLVED] you need to reboot after nfs server install

Unlikely, more likely that your install actually coincided with a kernel update on that same boot, leading to the kernel being unable to load modules for the nfs driver.

This is a common occurence, which can be mitigated with https://archlinux.org/packages/?q=kernel-modules-hook in oder to keep old modules around when a newer kernel gets installed.

Last edited by V1del (2024-08-13 20:16:32)

Offline

#3 2024-08-13 20:59:44

SunBlade
Member
From: at home
Registered: 2023-02-18
Posts: 23

Re: [SOLVED] you need to reboot after nfs server install

although i am very diligent in rebooting after kernel updates, i can not promise i missed a kernel update while installing all those packages over the past few days.
but i vaguely remember the last time i installed an ubuntu server i had the same problem.

i am no expert on this, i can only guess:
i suspect, since nfs has been integrated into the kernel, there is some flag, driver or whatnot that enables/disables nfs capabilities of the kernel at boot time.

hmmm... maybe i should treat nfs like a kernel driver in the future.


Live your life, you got only one.

Offline

#4 2024-08-13 23:05:42

seth
Member
Registered: 2012-09-03
Posts: 57,369

Re: [SOLVED] you need to reboot after nfs server install

nfs has been part of the kernel since 1993 and nothing "enables/disables nfs capabilities of the kernel at boot time" that would go away w/ a simple reboot.
V1del's suggestion is the by far most likely cause, if in the future you want to know for sure what's breaking some service,

systemctl status nfs-idmapd.service

and similar

Offline

#5 Yesterday 20:51:49

SunBlade
Member
From: at home
Registered: 2023-02-18
Posts: 23

Re: [SOLVED] you need to reboot after nfs server install

seth wrote:
systemctl status nfs-idmapd.service

systemctl status and journalctl -au reported dependency errors for all nfs units. most of them did not elaborate any further about the dependency error. even the few ones which actually pointed towards the failing required unit, pointed at those dead end units.

i have tried to recreate this dependency failure with countless VMs, but try as i may nfs always worked like a charm.
even when i tried to intentionally break it by installing nfs after upgrading the kernel without rebooting, it just works. according to V1del, unless you use that pacman hook, this should not be possible?

since this is the second time i got that infuriatingly non-descriptive dependency error and both times from nfs, i believe this is no coincidence. but alas, i have not the foggiest clue on how to recreate that error.


Live your life, you got only one.

Offline

#6 Yesterday 21:00:01

seth
Member
Registered: 2012-09-03
Posts: 57,369

Re: [SOLVED] you need to reboot after nfs server install

even when i tried to intentionally break it by installing nfs after upgrading the kernel without rebooting, it just works.

What exactly do you mean by "installing nfs"?
There're a bunch of userspace tools (notably for the server) that all have nothing to do w/ the kernel module and will work regardless of it.
What will not work is updating the kernel and then loading its nfs modules unless you've preserved the old modules for the running kernel.
So if you want to break anything, make sure the nfs modules aren't loaded (lsmod), update the kernel, make sure "modinfo nfs" get's you an error because the module could not be found and then try to utilize nfs.

Offline

#7 Yesterday 22:57:43

SunBlade
Member
From: at home
Registered: 2023-02-18
Posts: 23

Re: [SOLVED] you need to reboot after nfs server install

seth wrote:

What exactly do you mean by "installing nfs"?

installing the nfs-utils package with pacman and enabling+starting the nfsv4-server.service with systemctl.


seth wrote:

There're a bunch of userspace tools (notably for the server) that all have nothing to do w/ the kernel module and will work regardless of it.

does that mean the kernel module is not part of the nfs-utils package? if it is not: does the kernel module get loaded by default?


seth wrote:

So if you want to break anything, make sure the nfs modules aren't loaded ...

i did not even think about testing the nfs kernel module directly. my tests revolved around the nfs-utils package, nfsv4-server.service and different /etc/exports configs. i tried on a replay of my original pacman.log and on different arch-installer presets (minimal, gui and server).


Live your life, you got only one.

Offline

#8 Today 00:33:06

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 22,887

Re: [SOLVED] you need to reboot after nfs server install

SunBlade wrote:

does that mean the kernel module is not part of the nfs-utils package? if it is not: does the kernel module get loaded by default?

The kernel module is part of the kernel, i.e. the linux package. The module gets loaded on demand, once you start some form of server application that needs the features of the module it will get loaded (check lsmod/dmesg). If it can't get loaded because you haven't loaded it yet and it's not present anymore (because of a kernel update) whatever operation you're trying there will fail.

Try going through seth's steps and ensuring the nfs module (or likely more correctly the nfsd module) is not loaded and can't be loaded  (because of a kernel update -- or for testing purposes you could also blacklist it with a

install nfs /usr/bin/true

override or so https://wiki.archlinux.org/title/Kernel … acklisting

Offline

Board footer

Powered by FluxBB