Robby Workman | 4 Apr 07:03 2011
Picon

sysctl.conf not applied??

I asked this on IRC a few moments ago, but I suspect there are 
a few more sets of eyes here, soo...

Does anyone else try to set various params via /etc/sysctl.conf, 
and if so, does it work correctly?  I set lockd (nfs) ports via 
sysctl params, and on x86* hosts, that works as expected, but 
not on arm hosts.  Here's my /etc/sysctl.conf contents: 
  fs.nfs.nlm_udpport=4045
  fs.nfs.nlm_tcpport=4045

It's supposed to run from rc.S, and I don't see why it wouldn't 
be, but... on e.g. my NFS server, lockd gets random ports assigned.
If I stop nfsd and run "/sbin/sysctl -e -p /etc/sysctl.conf" (which
is exactly what rc.S does) and then restart rc.nfsd, lockd gets 
assigned to port 4045 as desired.

Another set of eyes looking at that would be appreciated.

-RW
Robby Workman | 4 Apr 07:31 2011
Picon

Re: sysctl.conf not applied??

On Mon, 4 Apr 2011 00:03:10 -0500
Robby Workman <rw <at> rlworkman.net> wrote:

> I asked this on IRC a few moments ago, but I suspect there are 
> a few more sets of eyes here, soo...
> 
> Does anyone else try to set various params via /etc/sysctl.conf, 
> and if so, does it work correctly?  I set lockd (nfs) ports via 
> sysctl params, and on x86* hosts, that works as expected, but 
> not on arm hosts.  Here's my /etc/sysctl.conf contents: 
>   fs.nfs.nlm_udpport=4045
>   fs.nfs.nlm_tcpport=4045
> 
> It's supposed to run from rc.S, and I don't see why it wouldn't 
> be, but... on e.g. my NFS server, lockd gets random ports assigned.
> If I stop nfsd and run "/sbin/sysctl -e -p /etc/sysctl.conf" (which
> is exactly what rc.S does) and then restart rc.nfsd, lockd gets 
> assigned to port 4045 as desired.
> 
> Another set of eyes looking at that would be appreciated.

After more discussion on IRC, I *think* this might be a peculiarity
of having / on nand.  On my SheevaPlug, which has / on an MMC card,
this works as expected without any manual intervention (IOW, lockd
gets assigned to port 4045).  On my Netgear Stora (the NFS server)
and my GuruPlug, / is ubifs on /dev/mtd2, and both of them show 
the problem behavior.  I don't know if that's related at all, but
it's something to explore.  However, I must go to bed now, and I'll
not be able to do anything with this tomorrow, but at least I have
an idea to pursue now...
(Continue reading)

Davide | 4 Apr 09:23 2011
Picon

R: sysctl.conf not applied??

The firs thing that comes into my mins is that at the time rc.S loads your sysctl maybe not all the nfs modules
have been bulled up.
Make sure rc.modules has all the modules you need for your nfs server and 
add "/sbin/sysctl -e -p /etc/sysctl.conf" somewhere just after running rc.modules but before starting nfs.

Regards
David

--- Lun 4/4/11, Robby Workman <rw <at> rlworkman.net> ha scritto:

> Da: Robby Workman <rw <at> rlworkman.net>
> Oggetto: [ARMedslack] sysctl.conf not applied??
> A: "Slackware ARM port" <armedslack <at> lists.armedslack.org>
> Data: Lunedì 4 Aprile 2011, 07:03
> I asked this on IRC a few moments
> ago, but I suspect there are 
> a few more sets of eyes here, soo...
> 
> Does anyone else try to set various params via
> /etc/sysctl.conf, 
> and if so, does it work correctly?  I set lockd (nfs)
> ports via 
> sysctl params, and on x86* hosts, that works as expected,
> but 
> not on arm hosts.  Here's my /etc/sysctl.conf
> contents: 
>   fs.nfs.nlm_udpport=4045
>   fs.nfs.nlm_tcpport=4045
> 
> It's supposed to run from rc.S, and I don't see why it
(Continue reading)

Davide | 5 Apr 09:00 2011
Picon

R: R: sysctl.conf not applied??

In support to what I supposed I had a look at my dockstar running current but no nfs services active:
root <at> slackware:~# sysctl -a | grep nfs
error: permission denied on key 'net.ipv4.route.flush'
error: permission denied on key 'net.ipv6.route.flush'
root <at> slackware:~#

The two keys you mention do not yet exist until the nfsd module is loaded:
root <at> slackware:/etc/rc.d# modprobe nfsd
root <at> slackware:/etc/rc.d# sysctl -a | grep nfs
fs.nfs.nlm_grace_period = 0
fs.nfs.nlm_timeout = 10
fs.nfs.nlm_udpport = 0
fs.nfs.nlm_tcpport = 0
fs.nfs.nsm_use_hostnames = 0
fs.nfs.nsm_local_state = 0
error: permission denied on key 'net.ipv4.route.flush'
error: permission denied on key 'net.ipv6.route.flush'
sunrpc.nfs_debug = 0
sunrpc.nfsd_debug = 0
root <at> slackware:/etc/rc.d#

You can fix this by adding the sysctl -p.... just after loading nfsd module in rc.nfsd or just like I said by
loading the module in rc.modules and making sure that sysctl.conf is reloaded after rc.modules.
--- Lun 4/4/11, Davide <louigi600 <at> yahoo.it> ha scritto:

> Da: Davide <louigi600 <at> yahoo.it>
> Oggetto: [ARMedslack] R:  sysctl.conf not applied??
> A: "Slackware ARM port" <armedslack <at> lists.armedslack.org>
> Data: Lunedì 4 Aprile 2011, 09:23
> The firs thing that comes into my
(Continue reading)

Robby Workman | 6 Apr 06:05 2011
Picon

Re: R: R: sysctl.conf not applied??

On Tue, 5 Apr 2011 08:00:50 +0100 (BST)
Davide <louigi600 <at> yahoo.it> wrote:

> In support to what I supposed I had a look at my dockstar running
> current but no nfs services active: root <at> slackware:~# sysctl -a |
> grep nfs error: permission denied on key 'net.ipv4.route.flush'
> error: permission denied on key 'net.ipv6.route.flush'
> root <at> slackware:~#
> 
> The two keys you mention do not yet exist until the nfsd module is
> loaded: root <at> slackware:/etc/rc.d# modprobe nfsd
> root <at> slackware:/etc/rc.d# sysctl -a | grep nfs
> fs.nfs.nlm_grace_period = 0
> fs.nfs.nlm_timeout = 10
> fs.nfs.nlm_udpport = 0
> fs.nfs.nlm_tcpport = 0
> fs.nfs.nsm_use_hostnames = 0
> fs.nfs.nsm_local_state = 0
> error: permission denied on key 'net.ipv4.route.flush'
> error: permission denied on key 'net.ipv6.route.flush'
> sunrpc.nfs_debug = 0
> sunrpc.nfsd_debug = 0
> root <at> slackware:/etc/rc.d#
> 
> You can fix this by adding the sysctl -p.... just after loading nfsd
> module in rc.nfsd or just like I said by loading the module in
> rc.modules and making sure that sysctl.conf is reloaded after
> rc.modules. 

Yep, that's definitely it - just confirmed.  Weird though, as
(Continue reading)


Gmane