Subject: Re: Upgrading a RAID 1 system
To: Matthias Scheler <tron@zhadum.de>
From: Frederick Bruckman <fredb@immanent.net>
List: port-i386
Date: 06/16/2004 20:11:25
On Wed, 16 Jun 2004, Matthias Scheler wrote:

> 16 partitions:
> #        size    offset     fstype [fsize bsize cpg/sgs]
>  a: 312452784    129024       RAID                     # (Cyl.    128 - 310100)
>  c:        16         0     unused      0     0        # (Cyl.      0 -      0*)
>  d: 312581808         0     unused      0     0        # (Cyl.      0 - 310100)
>  e:    129024         0     4.2BSD   1024  8192    90  # (Cyl.      0 -    127)
>
> Partition "e" is the dummy partition which was necessary to make this work
> with the NetBSD 1.6.x boot loader. After upgrading to NetBSD 2.0_BETA
> I tried to upgrade the bootblocks, too, like this:
>
> mount /dev/wd0e /mnt
> cp -p /usr/mdec/boot /mnt
> installboot -v /dev/rwd0e /usr/mdec/bootxx_ffsv1
> umount /mnt

I guess you want to use the new features of 2.0? I believe it should
work to...

1) Put the disklabel back the way it is above, and

2) make MBR partition 0 start at 129024 with size 312452784, and make
it active. (If there's an MBR partition in one of the other slots for
wd0e, you can leave it, for now.)

3) Next, you'll need to label the disk as if it were new, using the
previously saved text label, as there will be no label in the (new)
primary NetBSD partition.

4) Now, assuming this is raid0, "raidctl -A root raid0".
("/etc/raid0.conf" will give an "already configured" error
on next boot, but you can move that out of the way later.)

5) Now, install the bootblocks to "/dev/rwd0a", copy "boot" to root,
and reboot.

> The BIOS started the new boot loader just fine but the boot loader wants
> to load the kernel from partition "e" instead of "a". I've afterwards
> remove "boot" from "wd0e" because the manual page claims that the boot
> loader will automatically use the partition "a" if "boot" isn't found
> on the current partition. But that didn't work, too.

There really isn't a file system on "wd0a"; there's a RAID set. The
filesytem starts further in. Nonetheless, it "just works" if you
install the boot blocks to a raid set configured as "root on RAID".

Frederick