Subject: Re: RAID1 Mirror Boot Support
To: Wojciech Puchar <wojtek@wojtek.3miasto.net>
From: Tom Ivar Helbekkmo <tih@kpnQwest.no>
List: port-i386
Date: 10/24/2001 07:50:58
I've been looking at the problem of booting off a RAID 1 set without
the separate little boot partition with a kernel on it, and I seem to
be stuck. Here's my current setup:
The outer partitioning on sd0 and sd1 are identical, thus:
Partition table:
0: sysid 169 (NetBSD)
start 63, size 35524377 (17345 MB), flag 0x80
beg: cylinder 0, head 1, sector 1
end: cylinder 1022, head 254, sector 63
Disklabels on sd0 and sd1 are also identical:
a: 35524313 127 4.2BSD 0 0 0 # (Cyl. 0*- 14405*)
c: 35524377 63 unused 0 0 # (Cyl. 0*- 14405*)
d: 35548320 0 unused 0 0 # (Cyl. 0 - 14415*)
e: 35524377 63 RAID # (Cyl. 0*- 14405*)
The RAID set is within the 'd' partition, labeled thus:
a: 524288 0 4.2BSD 1024 8192 32 # (Cyl. 0 - 511)
b: 2099200 524288 swap # (Cyl. 512 - 2561)
c: 35522560 0 unused 0 0 # (Cyl. 0 - 34689)
d: 35524224 0 unused 0 0 # (Cyl. 0 - 34691*)
e: 1048576 2623488 4.2BSD 1024 8192 32 # (Cyl. 2562 - 3585)
f: 10485760 3672064 4.2BSD 2048 16384 64 # (Cyl. 3586 - 13825)
g: 2097152 14157824 4.2BSD 1024 8192 32 # (Cyl. 13826 - 15873)
h: 19267584 16254976 4.2BSD 2048 16384 64 # (Cyl. 15874 - 34689)
With this setup, I can access raid0a as sd0a, to install boot blocks.
However, the boot record for the partition gets installed at offset
127, which means the BIOS can't access it. If I change the BIOS's
idea of where the NetBSD partition begins, by incrementing the start
of the 169 partition to sector 127, I lose access to the outer disk
labels, so that the inner (raid0) disk label is also seen as the outer
(sd0) disk label. Poof goes access to the partitions making up the
RAID set.
It looks like a Catch 22 to me...
Please tell me I'm wrong! ;-)
-tih
--
Puritanism -- the haunting fear that someone, somewhere, may be happy.