Subject: Re: Installing onto raid1
To: Chris Lloyd <strawberry@toth.org.uk>
From: David Brownlee <abs@netbsd.org>
List: netbsd-help
Date: 08/12/2002 10:08:10
On Sun, 11 Aug 2002, Chris Lloyd wrote:
> loey,
>
> I know that NetBSD(/i386) can boot from a raid 1 device, but what is the best
> way to install onto one? Should I make some custom install floppies, or is
> there a better way?
You can install as normal on one disk, get everything running and
use the following to switch to RAID. I've used this on systems
without console access, but not recommended :)
Assuming you want to mirror wd0 and wd1.
- Install the system normally on wd0, without setting up RAID.
- disklabel wd1, and ensure wd1a starts at least 100 blocks from
the start of the disk (a cylinder is a good unit), wd1c should
be identical to wd1d. You can raid the entire disk, or just part,
using the remainder for less critical storage, or even swap.
- Create /etc/raid0.conf, note 'wd9a' should be a non existant disk
START array
1 2 0
START disks
/dev/wd1a
/dev/wd9a
START layout
128 1 1 1
START queue
fifo 100
- Setup the raid
raidctl -C /etc/raid0.conf raid0
raidctl -I 6502 (Just need to pick a unique number)
raidctl -i raid0 (Ignore error messages)
- disklabel -i -I raid0
Create at least raid0a.
- Copy installed system from / to /mnt. Dump, pax, or tar OK.
eg:
newfs raid0a
mount /dev/raid0a /mnt (If separate /usr etc, newfs & mount).
eg: 'cd / ; pax -X -rw -pe / /mnt'
- Edit /mnt/etc/fstab and update wd0 lines to raid0.
- /usr/mdec/installboot -b 16 /usr/mdec/biosboot.sym /dev/rwd1d
- 'raidctl -A root raid0', then reboot. The kernel should boot
from wd0, then automatically use raid0 as the root filesystem.
- disklabel wd0 to match wd1. Note, if the c: partition did not
previously start at offset 0 you will need to use 'disklabel -I'
(possibly twice to make sure :)
- raidctl -a /dev/wd0a raid0
- raidctl -F component1 raid0
- /usr/mdec/installboot -b 16 /usr/mdec/biosboot.sym /dev/rwd0d
--
David/absolute -- www.netbsd.org: No hype required --