Saturday, June 17, 2006

Fix for RAID_AUTOCONFIG bug in 3.9

OpenBSDI had been using RAIDframe with OpenBSD 3.8 without issue (mostly, see my previous post). I had configured my RAID sets to use auto-configure (raidctl -A yes raid0).

But, when I upgraded to OpenBSD 3.9, my server would hang during the boot process immediately after "Kernelized RAIDframe activated". So, I compiled a kernel with RAIDframe enabled but RAID_AUTOCONFIG not enabled. I still needed my /etc/raid*.conf files, but my server was working perfectly. I searched the misc@ archives and found several threads (including this one) about the RAID + hang problem in OpenBSD 3.9.

But, someone had a solution...

Simon Vallet posted a solution to misc@ with a patch for the kernel which skips scanning for CDs during initialization:
On Sun, 4 Jun 2006 16:59:30 +0200
Simon Vallet wrote:

> dmesg and the console output with RAIDDEBUG enabled
> follow -- it appears the two RAID members are indeed
> recognized, but they somehow can't be mounted as the root dev.

After some crude debugging, I was able to identify the problem on my machine: the RAID device detection loop was hanging on cd0 -- don't ask me why.

A patch against 3.9 follows -- I'm not sure it solves the general problem, but it does work for me. You might want to try it out.

HTH,
Simon


To use Simon's patch:

  • Download the patch.

  • Apply it to your source tree (cd /usr/src ; patch -p0 < ~/raid_cd39.patch).

  • Recompile your kernel (cd sys/arch/i386/compile/GENERIC_RAID; make; sudo make install).



You can then get rid of your /etc/raid0.conf (or, as I did, "mv /etc/raid0.conf /etc/raid0.conf.auto").

Thanks, Simon.

No comments:

Post a Comment