Subject: Re: Bootable root on raidframe
To: Martti Kuparinen <martti.kuparinen@iki.fi>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: port-i386
Date: 08/04/2003 20:31:51
On Mon, Aug 04, 2003 at 09:13:23PM +0300, Martti Kuparinen wrote:
> Hello list,
> 
> I'm going to build a new home server with RAID-1 for everything (root,
> /home and swap). I've read raidctl(8) and David's howto at
> 
> http://mail-index.netbsd.org/port-i386/2002/07/17/0006.html
> 
> but one thing is a little bit unclear to me.
> 
> >   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,
> 
> Is this
> 
> 1) increase wd1c to the same values as wd1d
> 
> or
> 
> 2) decrease wd1d to the same values as wd1c
> 
> Why is this needed? If the first is correct I assume this means I have to
> redo fdisk to start from 0 (instead of 63). But what if I have other
> operating systems (e.g. WinXP) on the same disk?

I don't understand why he's saying this in the first place.
I have several root raidframe setups. What I do is have a small 4.2BSD
partition at start of wd1c, which isn't wd1a (I usually take wd1f) that will
hold /boot. wd1a is type RAID, and will be the root device.

> 
> I'd really like to see some real-life fdisk and disklabel values...

No problems:
asim:/users/largo1/bouyer#fdisk sd0
Disk: /dev/rsd0d
NetBSD disklabel disk geometry:
cylinders: 14627 heads: 5 sectors/track: 490 (2450 sectors/cylinder)

BIOS disk geometry:
cylinders: 1024 heads: 64 sectors/track: 32 (2048 sectors/cylinder)

Partition table:
0: <UNUSED>
1: <UNUSED>
2: <UNUSED>
3: sysid 169 (NetBSD)
    start 32, size 35843638 (17501 MB), flag 0x80
        beg: cylinder    0, head   1, sector  1
        end: cylinder 1023, head  63, sector 32

asim:/users/largo1/bouyer#disklabel sd0
# /dev/rsd0d:
type: SCSI
disk: DPSS-318350N
label: fictitious
flags:
bytes/sector: 512
sectors/track: 490
tracks/cylinder: 5
sectors/cylinder: 2450
cylinders: 14627
total sectors: 35843670
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

8 partitions:
#        size    offset     fstype  [fsize bsize cpg/sgs]
 a:   2205000      2450       RAID                      # (Cyl.    1 - 900)
 b:   2099200    108250       swap                      # (Cyl.   44*- 900)
 c:  35843638        32     unused      0     0         # (Cyl.    0*- 14630*)
 d:  35843670         0     unused      0     0         # (Cyl.    0 - 14630*)
 e:  33636220   2207450       RAID                      # (Cyl.  901 - 14630*)
 f:      2418        32     4.2BSD   1024  8192    40   # (Cyl.    0*- 0)


I have 2 raid device on this disk, raid0 and raid1 (raid0 for root and swap,
raid1 for other partitions). sd0f holds the /boot, kernel (and root) in on
raid0a.
asim:/users/largo1/bouyer#disklabel raid0
# /dev/rraid0d:
type: RAID
disk: raid
label: default label
flags:
bytes/sector: 512
sectors/track: 128
tracks/cylinder: 63
sectors/cylinder: 8064
cylinders: 273
total sectors: 2204928
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

4 partitions:
#        size    offset     fstype  [fsize bsize cpg/sgs]
 a:    104832         0     4.2BSD   1024  8192    12   # (Cyl.    0 - 12)
 b:    516096    104832       swap                      # (Cyl.   13 - 76)
 d:   2204928         0     unused      0     0         # (Cyl.    0 - 273*)

asim:/users/largo1/bouyer#disklabel raid1
# /dev/rraid1d:
type: RAID
disk: raid
label: default label
flags:
bytes/sector: 512
sectors/track: 128
tracks/cylinder: 63
sectors/cylinder: 8064
cylinders: 4171
total sectors: 33636096
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

9 partitions:
#        size    offset     fstype  [fsize bsize cpg/sgs]
 d:  33636096         0     unused      0     0         # (Cyl.    0 - 4171*)
 e:   2096640         0     4.2BSD   1024  8192    13   # (Cyl.    0 - 259)
 f:   2096640   2096640     4.2BSD   1024  8192    11   # (Cyl.  260 - 519)
 g:   2096640   4193280     4.2BSD   1024  8192    13   # (Cyl.  520 - 779)
 h:  25248384   6289920     4.2BSD   1024  8192    13   # (Cyl.  780 - 3910)
 i:   2097792  31538304     4.2BSD   1024  8192    10   # (Cyl. 3911 - 4171*)

> 
> PS. I think we should have something about raidframe in the NetBSD Guide.

Sure.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 24 ans d'experience feront toujours la difference
--