Summary: | net-fs/nfs-utils: CONFIG_NFSD_LEGACY_CLIENT_TRACKING is deprecated and nfsdcld has no OpenRC support | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Christopher Byrne <salah.coronya> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | daniel, dmoulding, florian-evers, forza, holger, johannes.hirte, mkj, mmk, orzel, pmw.gover, rbezut, s7mon, salah.coronya |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
nfsdcld.initd
nfsdcld.initd |
Description
Christopher Byrne
2024-07-07 23:43:58 UTC
On linux 6.10.3, i got the following messages. [ 30.739668] NFSD: Unable to initialize client recovery tracking! (-110) [ 30.739678] NFSD: Is nfsdcld running? If not, enable CONFIG_NFSD_LEGACY_CLIENT_TRACKING. [ 30.739682] NFSD: starting 90-second grace period (net f0000000) And indeed, i couldn't find any information about nfsdcld/gentoo, online or on /etc/conf.d or similar. The badic nfsdcld init script provided at https://forums.gentoo.org/viewtopic-t-1169837.html works well. It has to be started befire nfsd for it to work properly. It can be seen in dmesg when the nfsdcld is used: [ 3749.461058] NFSD: Using nfsdcld client tracking operations. [ 3749.461065] NFSD: no clients to reclaim, skipping NFSv4 grace period (net f0000000) If nfscld is not started it looks like this: [ 61.930600] NFSD: Unable to initialize client recovery tracking! (-110) [ 61.930605] NFSD: Is nfsdcld running? If not, enable CONFIG_NFSD_LEGACY_CLIENT_TRACKING. [ 61.930607] NFSD: starting 90-second grace period (net f0000000) I guess we should update the nfs init.d script to depend on nfsdcld. Do we need to check that we have a >=6.8 kernel or that CONFIG_NFSD_LEGACY_CLIENT_TRACKING is unset? What happens if we run nfsdcld on older kernels? nfsdcld can be used unconditionally. Eventually, it will be required, but its still preferred even when its optional. Support was added in 3.8 and the new upcall mechanism was added in 5.2. Since the oldest kernel supported in Gentoo is 5.10, there should be no issue, Even with a running nfsdcld I get this warning. Just starting the daemon doesn't seem to be enough (In reply to Johannes Hirte from comment #4) > Even with a running nfsdcld I get this warning. Just starting the daemon > doesn't seem to be enough Did you make sure it was started before nfsd.ko module was loaded? I wanted to test this, so: - added the minimal rc script from the forum post as /etc/init.d/nfsdcld - added nfsdcld to /etc/conf.d/nfs:NFS_NEEDED_SERVICES and on reboot of my NFS server (with connected clients) now get: [ +0.504600] NFSD: Using nfsdcld client tracking operations. [ +0.000006] NFSD: starting 90-second grace period (net f0000000) [ +1.383451] NFSD: all clients done reclaiming, ending NFSv4 grace period (net f0000000) Looks good to me. I came across this thread while trying to eliminate net-dns/bind as it doesn't appear to be necessary for my NFSV4-only system. The minimal /etc/init/d/nfsdcld didn't work for me until I added a few lines, resulting in: ------------- #!/sbin/openrc-run # Copyright 2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 name="nfsdcld" description="NFSv4 Client Tracking Daemon" command="/usr/sbin/nfsdcld" pidfile="/run/nfsdcld.pid" error_logger="logger" output_logger="logger" # Comment out usually, but useful for debugging command_background="true" ------------- Not sure if the pidfile is needed, and/or whether it need to run as root. FWIW, getting rid of net-dns/bind required changes to /etc/conf.d/nfs. I've started a forum topic about it: https://forums.gentoo.org/viewtopic-t-1171535.html Hm.. I have the following init.d/nfs-cld, which works well for me. ----- name="nfsdcld" description="NFSv4 Client Tracking Daemon" command=/usr/sbin/nfsdcld depend() { before nfs ----- I also have in conf.d/nfs the following: ----- NFS_NEEDED_SERVICES="rpc.idmapd" rc_need="nfs-cld" ----- I guess i could have used NFS_NEEDED_SERVICES instead of rc_need, as init.d/nfs translates it anyways: "need rpc.statd ${myneed} ${NFS_NEEDED_SERVICES}" We may want to consider implementing the additional options supported[*] by nfsdcld: --pipefsdir, --storagedir and --debug. * https://www.man7.org/linux//man-pages/man8/nfsdcld.8.html Created attachment 918018 [details]
nfsdcld.initd
nfsdcld requires nfsd.ko and rpc.pipefs to start.
Also add nfsdcld to conf.d/nfs:
NFS_NEEDED_SERVICES="nfsdcld rpc.idmapd"
Created attachment 918022 [details]
nfsdcld.initd
Replaced the custom mkdir_nfsdirs() with checkpath.
Why not just make it part of the current /etc/init.d/nfs script and start/stop it the same way it starts mountd, etc.? nfsdcld=/usr/sbin/nfsdcld ... start_it nfsdcld ${nfsdcld} ${OPTS_RPC_NFSDCLD} ... ebegin "Stopping NFS nfsdcld" start-stop-daemon --stop --exec ${nfsdcld} eend $? ret=$((ret + $?)) ... |