« Famous last words | Main | Elevators »

October 28, 2005

Kernel Changes Missing

Q. I am making changes to my kernel but the changes don't appear to happen. For example, I change the value of shmsys:shminfo_shmmax, then touch /reconfigure and reboot. When I check with sysdef -i the value has not been changed.

A. Believe it or not, the problem is probably due to a failed mirror. Sun servers with root mirrors start the boot sequence by deciding which bootblock and kernel to load. This will normally be taken from the primary mirror (say c1t0d0s0 on a V480). Once the kernel is parsed, th boot process will realise that it needs to mount the metadevice (normally d10) instead of the underlying filesystem and this will happen before the system leaves single-user mode.

Now, if at some point the mirror is all in-sync (say c1t0d0s0 and c1t1d0s0) and the kernel contains metadevice information then all is well. Now imagine the primary fails (c1t0d0s0) in some way (so that it needs maintenance) and the user changes /etc/system. The kernel being changed is on the mirror (and the only single remaining sub-mirror). The system boots and reads the kernel config from c1t0d0s0 which is the *old* configuration and then mounts d10 which displays the *new* configuration. The sysdef does not read /etc/system to check the values, it checks the running kernel in memory which was build from the *old* /etc/system not the currently visible /etc/system.

To fix, remove the disk that needs maintenance (or try to bring the disk back online with metareplace -e) so that both copies of /etc/system are the same.

Posted by Ozguru at October 28, 2005 06:00 AM