Goverp Advocate
Joined: 07 Mar 2007 Posts: 2167
|
Posted: Thu Oct 31, 2024 6:30 pm Post subject: Using NFS V4 alone, without net-dns/bind |
|
|
I noticed during today's portage update that net-dns/bind-tools is now replaced by net-dns/bind. Digging into this, it turns out that is only needed by NFS versions before V4, so I tried to remove it (as my kernel has only V4 support).
It turns out /etc/conf.d/nfs needs some tweaks to stop trying to start V2/V3 support - the unchanged lines are elided in the listing below:
Code: | # /etc/conf.d/nfs
...
NFS_NEEDED_SERVICES="rpc.idmapd nfsdcld"
# Cancel need for pre-V4 services
rc_need="!rpc.statd !portmap"
# Options to pass to rpc.nfsd - modified to explicitly state port
OPTS_RPC_NFSD="8 -N3 -V4 -p2049"
...
OPTS_RPC_MOUNTD="-N3 -N2 -V4"
... |
The basic changes are "-N3" and "-N2" to stop early version support (note, nfsd doesn't understand -V2), the explicit port setting "-p2049", and overriding the need for rpc.statd and portmap, as per this forum topic.
An optional change is needing nfsdcld, a new service that replaces CONFIG_NFSD_LEGACY_CLIENT_TRACKING. That needs a new script /etc/init.d/nfsdcld:
Code: | #!/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" |
which is based on one from this forum topic
There's a bug report about this. _________________ Greybeard |
|