Subject: Re: Installing onto raid1
To: David Brownlee <abs@netbsd.org>
From: Brian A. Seklecki <lavalamp@spiritual-machines.org>
List: netbsd-help
Date: 08/13/2002 23:52:19
On Mon, 12 Aug 2002 @ 10:08am (+0100), David Brownlee wrote:
DB> On Sun, 11 Aug 2002, Chris Lloyd wrote:
DB>
DB> > loey,
DB> >
DB> > I know that NetBSD(/i386) can boot from a raid 1 device, but what is the best
DB> > way to install onto one? Should I make some custom install floppies, or is
DB> > there a better way?
DB>
DB> You can install as normal on one disk, get everything running and
DB> use the following to switch to RAID. I've used this on systems
...any idea if this will work on non-i386? i may have to try this.
-lava
DB> without console access, but not recommended :)
DB>
DB> Assuming you want to mirror wd0 and wd1.
DB>
DB> - Install the system normally on wd0, without setting up RAID.
DB>
DB> - disklabel wd1, and ensure wd1a starts at least 100 blocks from
DB> the start of the disk (a cylinder is a good unit), wd1c should
DB> be identical to wd1d. You can raid the entire disk, or just part,
DB> using the remainder for less critical storage, or even swap.
DB>
DB> - Create /etc/raid0.conf, note 'wd9a' should be a non existant disk
DB> START array
DB> 1 2 0
DB>
DB> START disks
DB> /dev/wd1a
DB> /dev/wd9a
DB>
DB> START layout
DB> 128 1 1 1
DB>
DB> START queue
DB> fifo 100
DB>
DB> - Setup the raid
DB> raidctl -C /etc/raid0.conf raid0
DB> raidctl -I 6502 (Just need to pick a unique number)
DB> raidctl -i raid0 (Ignore error messages)
DB>
DB> - disklabel -i -I raid0
DB> Create at least raid0a.
DB>
DB> - Copy installed system from / to /mnt. Dump, pax, or tar OK.
DB> eg:
DB> newfs raid0a
DB> mount /dev/raid0a /mnt (If separate /usr etc, newfs & mount).
DB> eg: 'cd / ; pax -X -rw -pe / /mnt'
DB>
DB> - Edit /mnt/etc/fstab and update wd0 lines to raid0.
DB>
DB> - /usr/mdec/installboot -b 16 /usr/mdec/biosboot.sym /dev/rwd1d
DB>
DB> - 'raidctl -A root raid0', then reboot. The kernel should boot
DB> from wd0, then automatically use raid0 as the root filesystem.
DB>
DB> - disklabel wd0 to match wd1. Note, if the c: partition did not
DB> previously start at offset 0 you will need to use 'disklabel -I'
DB> (possibly twice to make sure :)
DB>
DB> - raidctl -a /dev/wd0a raid0
DB>
DB> - raidctl -F component1 raid0
DB>
DB> - /usr/mdec/installboot -b 16 /usr/mdec/biosboot.sym /dev/rwd0d
DB>
DB>
DB>
DB> --
DB> David/absolute -- www.netbsd.org: No hype required --
DB>
DB>
later - | _BonaFide[] = { coder, author, | /~\ The ASCII Ribbon
Brian A. Seklecki | problem solver, scholar, BOFH, | \ / Campaign Against
| vegetarian, runner, NetBSD | X Exchange, Outlook
| advocate, spiritual machine }; | / \ & HTML Email
PGP: 0111 4618 0111 4618 4AB2 24EB C853 6611 75C4 A91E A7A7 4973
"GNU/Linux: About as stable as the elements at the bottom of the periodic table"