Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Using NFS V4 alone, without net-dns/bind
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2185

PostPosted: Thu Oct 31, 2024 6:30 pm    Post subject: Using NFS V4 alone, without net-dns/bind Reply with quote

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
View user's profile Send private message
s|mon
Apprentice
Apprentice


Joined: 04 Jul 2004
Posts: 219
Location: Bayern [de]

PostPosted: Mon Nov 04, 2024 2:43 pm    Post subject: Reply with quote

Thanks for sharing this, forgot about this aspect when switching to v4 and using nfsdcld.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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