Subject: Re: disklabel modification for RAID mirror
To: mel kravitz <melk@switchpwr.com>
From: Greg Oster <oster@cs.usask.ca>
List: current-users
Date: 09/12/2000 14:31:43
mel kravitz writes:
> Hi,
> Can the enclosed disklabel wd0 be modified for Raid 1 use with a second
> wd1 drive by simple change of fstype 4.2BSD (wd0e) to RAID , this drive
> is 4.3GB with 500MB used by wd0e /usr? I realize after changing
> disklable on wd0 i will need to run /usr/mdec/installboot
> /usr/mdec/bioosboot.sym/dev/rwd0a to reinstall the boot sector.

For a RAID 1 component, the "data" part of the component (in this case, FFS)
starts 64 blocks in from the beginning of the component.  So while you could
likely(*1) turn wd0e into a RAID 1 component simply by making its offset 1224656
(1224720-64) and shortening wd0b by 64 blocks, you wouldn't be able 
to do that for wd0a (since it would need an offset of -1) :(

In general, however, turning a 'regular' partition w/ real data into a RAID 1
component is quite tricky (and not something I recommend doing :) )

(*1) RAIDframe will truncate components slightly too, so it depends on exactly 
how well the current FFS fits into what RAIDframe decides to give you :-/ )

> # /dev/rwd0d:
> type: unknown
> disk: mydisk
> label: 
> flags:
> bytes/sector: 512
> sectors/track: 63
> tracks/cylinder: 15
> sectors/cylinder: 945
> cylinders: 8944
> total sectors: 8452080
> 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]
>   a:   436527       63     4.2BSD     1024  8192    16   # (Cyl.    0*- 461)
>   b:   788130   436590       swap                        # (Cyl.  462 - 1295)
>   c:  8452017       63     unused        0     0         # (Cyl.    0*- 8943)
>   d:  8452080        0     unused        0     0         # (Cyl.    0 - 8943)
>   e:  7227360  1224720     4.2BSD     1024  8192    16   # (Cyl. 1296 - 8943)

Later...

Greg Oster