Subject: Re: / on RAID 1
To: <>
From: David Laight <david@l8s.co.uk>
List: netbsd-help
Date: 11/17/2003 17:50:06
On Mon, Nov 17, 2003 at 03:58:02PM +0100, Martin Schmitz wrote:
> Am Sonntag, 16. November 2003 09:18 schrieb Martti Kuparinen:
> > Martin Schmitz wrote:
> > > I would like to setup a NetBSD system where / and the whole rest of
> > > the system is on a 2 disk RAID 1. I found plenty of documentations
> > > to setup RAIDFrame but none which shows how to do so with /. Can
> > > anyone point me to the right place?
> >
> > If you are using NetBSD 1.6.x take a look at this:
> >
> > http://www.iki.fi/kuparine/bsd/raid/
> 
> Thanks, this seems to be a very nice step by step explanation. Is there 
> anything different in -current?

yes.... on i386 at least.
NetBSD i386 'current' will boot directly from a filesystem at the start
of a raidframe raid 1 set - so you don't need an extra partition that
only contains 'boot' and the kernel.

I also think (untested) that it ought to be possible to install as follows:
1) Partition the disk with 64 free sectors before the netbsd mbr partition
   (eg make the partition start at sector 127 instead of 63).
2) Install as normal.
3) Use fdisk to add another mbr partition covering sectors 63..127 that
   is also of type netbsd (169). Give it, and the one starting at 127,
   'bootmenu' labels.
4) Use disklabel to make sectors 63 onward be of type 'raid'

5) Do whatever magic is required to initialise the raid set and give
   it the same disklabel as wd0.
   (step 4 will have written the disklabel to both type 169 partitions).

6) Run installboot on the raid netbsd partition.

7) Reboot from the raid set.

8) Add the second disk to the raid set.

9) Use fdisk to create a single mbr partition that covers the entire
   disk area.

Someone who knows the raid commands ought to try it.
Step '5' is certainly 'hand waving' as far as I am concerned.

	David

-- 
David Laight: david@l8s.co.uk