Subject: RAIDFrame booting from RAID-1 & kernel dumps
To: None <netbsd-users@netbsd.org>
From: Mark Cullen <mark.r.cullen@gmail.com>
List: netbsd-users
Date: 06/29/2006 21:40:41
I've been following the guide on how to set up a bootable RAID-1 volume 
using RAIDFrame and have come across a little problem.

Here's an example disk layout (which I will very likely be using):

PM (Primary Master) - Root RAID-1 Disk 1
PS (Primary Slave ) - Home RAID-1 Disk 1
SM (Secondary Master) - Root RAID-1 Disk 2
PS (Secondary Slave ) - Home RAID-1 Disk 2

All is well, I have managed to get the root RAID-1 volume to boot after 
a bit of messing about ( first time with this one, so I made a few 
mistakes ;) ). I have defined the area in each disk, wd0 and wd2's 
disklabel that covers the swap partition to allow kernel dumps, and in 
fstab I have gone by the guide and put in an entry which points to 
/dev/wd0b as "dp".

I think the guide assumes that there are only two disks in the system, 
as it says:

"Note that the kernel crash dumps must not be saved on a RAID device but 
on a real physical disk (wd0b). This dump area was created in the 
previous chapter on the second disk (wd1b) but we will make wd0 an 
identical copy of wd1 later so wd0b and wd1b will have the same size and 
offset. If wd0 fails and is removed from the server wd1 becomes wd0 
after reboot and crash dumps will still work as we are using wd0b in 
/etc/fstab."

Unfortunately this appears not to be the case for me. Suppose I remove 
the PM drive with this setup. The PS drive, one of the disks which is 
actually part of the home RAID array, is now wd0 and *NOT* the SM disk. 
I can see this being potentially quite dangerous, especially since I do 
actually have a 'b' partition defined in disk label on one of the drives 
in the home RAID array.

My question is probably reasonably obvious by now: is there any way that 
I can force the secondary master drive to be 'wd0' in the event that the 
primary master drive disappears (preferably without spending money on an 
IDE controller card, or a RAID card even)? I know I could re-order the 
drives so that the PS drive is disk #2 for the root device, but then 
both of the arrays would have both of their disks on the same IDE 
channel, and that would be quite a performance hit I imagine...