View previous topic :: View next topic |
Author |
Message |
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2186
|
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.
<edit>
Forgot to mention that net-fs/nfs-utils needs USE="-nfsv3" to get remove the dependency on net-dns/bind. _________________ Greybeard |
|
Back to top |
|
|
s|mon Apprentice
Joined: 04 Jul 2004 Posts: 219 Location: Bayern [de]
|
Posted: Mon Nov 04, 2024 2:43 pm Post subject: |
|
|
Thanks for sharing this, forgot about this aspect when switching to v4 and using nfsdcld. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|