[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-nfs
Subject:    Re: rpcbind redux
From:       Patrick Goetz <pgoetz () math ! utexas ! edu>
Date:       2020-10-05 23:20:23
Message-ID: 18dfec9e-f382-251e-2a8b-1e8a6c2b049b () math ! utexas ! edu
[Download RAW message or body]

Yep, just came here to post this myself and saw your message.  The 
problem is RPCNFSDOPTS is missing from the 
/etc/default/nfs-kernel-server file.

The service file for the nfs server, 
/usr/lib/systemd/system/nfs-config.service

includes this:

   Wants=nfs-config.service
   After=nfs-config.service

All nfs-config does is run this script:

   ExecStart=/usr/lib/systemd/scripts/nfs-utils_env.sh

and the script reads the /etc/default/nfs* files and then

   echo RPCNFSDARGS=\"$RPCNFSDOPTS ${RPCNFSDCOUNT:-8}\"

which then goes on the command line in the nfs-server service file:

   ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS

So the solution is to add this line to /etc/default/nfs-kernel-server:

   RPCNFSDOPTS="-N 2 -N 3"

Still unaccounted for is this variable in /etc/default/nfs-kernel-server:

   # Runtime priority of server (see nice(1))
   RPCNFSDPRIORITY=0

Which I can't find used anywhere in the service files.  But in any case, 
adding the RPCNFSDOPTS variable resolved the issue:

root@helios:~# cat /proc/fs/nfsd/versions
-2 -3 +4 +4.1 +4.2

Thanks!

On 10/5/20 5:55 PM, McIntyre, Vincent (CASS, Marsfield) wrote:
> On Mon, Oct 05, 2020 at 09:54:52AM -0400, J. Bruce Fields wrote:
>> On Fri, Oct 02, 2020 at 10:12:24AM -0500, Patrick Goetz wrote:
>>> I think what you're saying is that I need to add $RPCMOUNTDARGS to
>>> the service file command line for rpc.nfsd?
>>
>> Somehow you just need to make sure rpc.nfsd is also getting "-N 2 -N 3"
>> added to its commandline.  I'm not sure of the right way to do that with
>> Debian's configuration.
>>
> 
> I think the canonical way to do this is to edit
> /etc/default/nfs-kernel-server
> 
> and set
> RPCNFSDOPTS="-N 2 -N3"
> 
> or similar.
> 
> There were some issues in the past with the nfs init scripts
> not picking up settings in that file correctly, but I believe
> they have been corrected.
> 
> Kind regards
> 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic