Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
nfsdcld & missing nfs4recoverydir
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
s|mon
Apprentice
Apprentice


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

PostPosted: Sun Oct 27, 2024 9:11 am    Post subject: nfsdcld & missing nfs4recoverydir Reply with quote

Using nfs4 i found that i got some errors indicating that client tracking is not configured consistently as i removed the legacy client tracking from kernel configuration.
I understood that the current way would be to run nfsdcld (https://bugs.gentoo.org/935724)

but when i try to start the daemon i get this (indicating proc entry missing - not sure on the inotify impact yet)
I did not find which part of kernel config or tool would be responsible for creating this.

Quote:
nfsdcld -F -d
nfsdcld: sqlite_startup_query_grace: current_epoch=1 recovery_epoch=0
nfsdcld: sqlite_check_db_health: returning 0
nfsdcld: attaching /var/lib/nfs/nfsdcltrack/main.sqlite
nfsdcld: detaching database
nfsdcld: sqlite_copy_cltrack_records: returning 0
nfsdcld: sqlite_prepare_dbh: num_cltrack_records = 0

nfsdcld: Unable to open /proc/fs/nfsd/nfsv4recoverydir: No such file or directory
nfsdcld: sqlite_prepare_dbh: num_legacy_records = 0

nfsdcld: cld_pipe_init: init pipe handlers
nfsdcld: cld_inotify_setup: inotify_add_watch failed: No such file or directory




Quote:
zcat /proc/config.gz | grep NFSD
CONFIG_NFSD=y
# CONFIG_NFSD_V2 is not set
# CONFIG_NFSD_V3_ACL is not set
CONFIG_NFSD_V4=y
# CONFIG_NFSD_BLOCKLAYOUT is not set
# CONFIG_NFSD_SCSILAYOUT is not set
# CONFIG_NFSD_FLEXFILELAYOUT is not set
CONFIG_NFSD_V4_2_INTER_SSC=y
# CONFIG_NFSD_V4_SECURITY_LABEL is not set
# CONFIG_NFSD_LEGACY_CLIENT_TRACKING is not set


Kernel is gentoo-sources-6.11.4 with
Quote:

[I] net-fs/nfs-utils
Installed versions: 2.7.1^t(15:11:20 10/19/24)(kerberos libmount nfsv3 nfsv4 uuid -caps -junction -ldap -sasl -selinux -tcpd)


Anyone has a hint on what i am missing?

Edit: Small progress, after mounting this fstab entry, i could start the nfsdcld. Not sure if this is the proper way to go and i just missed this from instructions or not
Code:
rpc_pipefs   /var/lib/nfs/rpc_pipefs   rpc_pipefs   defaults   0   0
Back to top
View user's profile Send private message
nicop
Tux's lil' helper
Tux's lil' helper


Joined: 10 Apr 2014
Posts: 81

PostPosted: Mon Oct 28, 2024 2:04 pm    Post subject: Re: nfsdcld & missing nfs4recoverydir Reply with quote

s|mon wrote:
Edit: Small progress, after mounting this fstab entry, i could start the nfsdcld. Not sure if this is the proper way to go and i just missed this from instructions or not
rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs defaults 0 0

This is the job of rpc.idmapd service.

I have this :

/etc/conf.d/nfs :
Code:
# Optional services to include in default `/etc/init.d/nfs start`
# For NFSv4 users, you'll want to add "rpc.idmapd" here.
NFS_NEEDED_SERVICES="rpc.idmapd nfsdcld"


/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 daemon"
description="NFSv4 Client Tracking Daemon"
command=/usr/bin/nfsdcld
command_args="${nfsdcld_args}"


My paths are :
/var/lib/nfs/v4recovery/
/var/lib/nfs/nfsdcld/main.sqlite

as expected here : https://gitweb.gentoo.org/repo/gentoo.git/tree/net-fs/nfs-utils/nfs-utils-2.7.1.ebuild#n198
Back to top
View user's profile Send private message
s|mon
Apprentice
Apprentice


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

PostPosted: Mon Oct 28, 2024 6:58 pm    Post subject: Reply with quote

Makes sense but also opens new questions on my side.
I updated nfs-utils on 19th of Oct 2024 according to eix output.
Neither before this nor afterwards i had /etc/conf.d/nfs.conf (with .conf or without) according to my snapper history.
Also when looking on my /etc/config.archive/etc/conf.d folder i see the last entries for nfs from 2011/2010.

I have it now only because of my attempts to setup nfs with mTLS where i added
Code:
OPTS_RPC_NFSD="8 -V 4 -V 4.2"


And also i do not have /etc/init.d/nfsdcld at all (which i assumed was due to the mentioned bug).
It is not part of files of nfs-utils, is this created during build and should be placed?
Will look into last build log of nfs-utils or try to merge and check later if i have a bit more time.

Thanks again for this hint - some things seem odd on that system.
Back to top
View user's profile Send private message
nicop
Tux's lil' helper
Tux's lil' helper


Joined: 10 Apr 2014
Posts: 81

PostPosted: Mon Oct 28, 2024 7:38 pm    Post subject: Reply with quote

You're right, this package is lacking a few things.

nfs.conf was deleted recently, don't know why :
https://gitweb.gentoo.org/repo/gentoo.git/tree/?id=b088105deeb5406690698f092535767f71546570
https://forums.gentoo.org/viewtopic-t-1170985-start-0-postdays-0-postorder-asc-highlight-.html

my nfs.conf for an example, nfsv4only ("need portmap" commented in /etc/init.d/nfs)
Code:

# If you wish to set the port numbers for lockd,
# please see /etc/sysctl.conf

# Optional services to include in default `/etc/init.d/nfs start`
# For NFSv4 users, you'll want to add "rpc.idmapd" here.
NFS_NEEDED_SERVICES="rpc.idmapd nfsdcld"

# Options to pass to rpc.nfsd
#OPTS_RPC_NFSD="4 -N 3 -V 4"
OPTS_RPC_NFSD="-N 3 -N 4.0 -N 4.1 -V 4.2 -U"

# Options to pass to rpc.mountd
# ex. OPTS_RPC_MOUNTD="-p 32767"
OPTS_RPC_MOUNTD="-N 3 -N 4.0 -N 4.1 -V 4.2 -u"

# Options to pass to rpc.statd
# ex. OPTS_RPC_STATD="-p 32765 -o 32766"
#OPTS_RPC_STATD=""

# Options to pass to rpc.idmapd
OPTS_RPC_IDMAPD=""

# Options to pass to rpc.gssd
OPTS_RPC_GSSD=""

# Options to pass to rpc.svcgssd
OPTS_RPC_SVCGSSD=""

# Options to pass to rpc.rquotad (requires sys-fs/quota)
OPTS_RPC_RQUOTAD=""

# Timeout (in seconds) for exportfs
EXPORTFS_TIMEOUT=30

# Options to set in the nfsd filesystem (/proc/fs/nfsd/).
# Format is <option>=<value>.  Multiple options are allowed.
#OPTS_NFSD="nfsv4leasetime=30 max_block_size=4096"

rc_need="!net !portmap !rpc.statd"


yes, /etc/init.d/nfsdcld is not provided either, maybe because nfsv3 is certainly still widely used.

I know nothing about nfs/mTLS.
Back to top
View user's profile Send private message
s|mon
Apprentice
Apprentice


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

PostPosted: Mon Oct 28, 2024 8:06 pm    Post subject: Reply with quote

mTLS i tried based on reading arch wiki and summarized it here https://forums.gentoo.org/viewtopic-t-1171441.html

Will check the links later this week and setup nfs.conf accordingly, on a quick glane on the other thread there seem to be conclusion that i was removed intentionally but it seems odd to not have at least a commented sample with hints on what one might want to activate based on needs.
Thanks again
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