Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

At what point is sysctl.conf supposed to be read during boot, and why might it not be running? I have the following settings which are not being applied when I reboot:

net.bridge.bridge-nf-call-arptables = 0
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-filter-pppoe-tagged = 0
net.bridge.bridge-nf-filter-vlan-tagged = 0

fs.nfs.nlm_udpport = 32768
fs.nfs.nlm_tcpport = 32768

The first section is needed for KVM bridging, and the second is to run the NFS lock manager on a known port. However, after booting, these values have not taken effect. If I run sysctl -p, then they do.

This wouldn't be a huge issue, except that I can't figure out how to restart the lock manager without rebooting. I would really like to know why sysctl.conf isn't working at boot, but I'd settle for just being able to restart the lock manager.

This is on Ubuntu server 10.04.2, kernel 2.6.32-31-server. I know some daemons check the permissions on their config files and refuse to work if they're too permissive, but sysctl.conf is 644 root:root, which I'm pretty sure is the default.

share|improve this question

3 Answers 3

up vote 4 down vote accepted

Have a look at Some sysctl's are ignored on boot. In short, the settings are applied early, before some kernel modules are loaded.

share|improve this answer

On ubuntu, it will be loaded up as part of the upstart daemon running the /etc/init/procps.conf file.

Check that it's there, and that you haven't disabled it.

share|improve this answer
    
The file is there, and its contents match those of a known-good system. I'm not real familiar with upstart, but it appears that an upstart job is disabled by renaming it something other than *.conf or editing it so that it never runs. So it should be enabled. –  Brian May 17 '11 at 16:53

If it's anything like Debian, the on-boot sysctl is run by /etc/init.d/procps. For comparison, my default one looks like this.

# /etc/init.d/procps: Set kernel variables from /etc/sysctl.conf
# Description:  Loads kernel parameters that are specified in /etc/sysctl.conf
which sysctl > /dev/null || exit 0
                   for file in /etc/sysctl.conf /etc/sysctl.d/*.conf ; do
                                   sysctl $quiet -p "$file"

Might be worth checking if it's there, and if your runlevel init symlink(s) are intact. (mine's in rcS.d only.). It's not a sensitive config file, so 644 permissions shouldn't be a problem.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.