, David Brownlee <abs@netbsd.org>
From: Brian A. Seklecki <lavalamp@spiritual-machines.org>
List: port-i386
Date: 10/20/2002 02:26:16
On Wed, 17 Jul 2002 @ 4:14pm (+0100), David Brownlee wrote:
DB> Of course there _had_ to be a typo in it :)
DB>
DB> Version II
I finally got around to pretty'ing this up:
http://digitalfreaks.org/~lavalamp/raid_l1_root_draft1.html
Thanks for the input, everyone.
-lava
DB>
DB> I ended up pushing the root partition an extra 64 sectors down
DB> the disk and using '-b 16' to installboot to install the second-stage
DB> boot loader contigously in the space.
DB>
DB> The following should work for anyone wanting to setup a RAID system.
DB> As a bonus it it _should_ be possible to use it to convert an existing
DB> system to mirrored without needing any console access, but do _not_
DB> just believe that, try with a test system first :)
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 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.
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> David/absolute -- www.netbsd.org: No hype required --
DB>
DB>