[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: RAIDFRAME and skipping a cylinder
On 01-Mar-00 matthew patton wrote:
> In a lot of cases (scsi in particular) a cylinder is 64 sectors. I seem to
> hazily recall some documenet that pretty much said "reserve 64 sectors
> from the beginning of the disk for RAIDFRAME use." Several of my disks
> work out to having a couple hundred sectors per cylinder. How much space
> does the OpenBSD disklabel really require? And how much does RAIDFRAME
> really require?
A practical example follows
Disk: /dev/rsd1c geometry: 554/255/63 [8900010 sectors]
Offset: 0 Signatures: 0xAA55,0x0
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
-------------------------------------------------------------------------
*0: A6 0 0 2 - 553 254 63 [ 1 - 8900009] OpenBSD
Disk: /dev/rsd2c geometry: 553/255/63 [8883945 sectors]
Offset: 0 Signatures: 0xAA55,0x805D0271
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
-------------------------------------------------------------------------
*0: A6 0 0 2 - 553 254 63 [ 1 - 8900009] OpenBSD
Disk: /dev/rsd3c geometry: 553/255/63 [8883945 sectors]
Offset: 0 Signatures: 0xAA55,0x0
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
-------------------------------------------------------------------------
*0: A6 0 0 2 - 552 254 63 [ 1 - 8883944] OpenBSD
These are fdisk setup of three drives participating in a small RAID5 array.
Notice all A6 (OpenBSD) partitions begin at sector 2 (not 64).
I only preserved the first sector for the BIOS MBR (not really needed, though)
# using MBR partition 3: type A6 off 1 (0x1) size 8900009 (0x87cda9)
# /dev/rsd1c:
16 partitions:
# size offset fstype [fsize bsize cpg]
c: 8910423 0 unused 0 0 # (Cyl. 0 - 8366*)
e: 8890759 1 4.2BSD 1024 8192 16 # (Cyl. 0*- 8348*)
# using MBR partition 0: type A6 off 1 (0x1) size 8900009 (0x87cda9)
# /dev/rsd2c:
16 partitions:
# size offset fstype [fsize bsize cpg]
c: 8890760 0 unused 0 0 # (Cyl. 0 - 5927*)
e: 8890759 1 4.2BSD 1024 8192 16 # (Cyl. 0*- 5927*)
# using MBR partition 3: type A6 off 1 (0x1) size 8883944 (0x878ee8)
# /dev/rsd3c:
16 partitions:
# size offset fstype [fsize bsize cpg]
c: 8890760 0 unused 0 0 # (Cyl. 0 - 5927*)
e: 8890759 1 4.2BSD 1024 8192 16 # (Cyl. 0*- 5927*)
Those disklabel entries confirm I'm using partitions beginning on the second
sector of each disk. They of course are setup to be the same size.
Which gives us a RAID5 array disklabeled as follows :
# /dev/rraid0c:
type: RAID
disk: raid
label: Raid0
flags:
bytes/sector: 512
sectors/track: 2048
tracks/cylinder: 1
sectors/cylinder: 2048
cylinders: 8682
total sectors: 17781376
rpm: 7200
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
16 partitions:
# size offset fstype [fsize bsize cpg]
c: 17781376 0 unused 0 0 # (Cyl. 0 - 8682*)
d: 4194304 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 2047)
e: 409600 4194304 4.2BSD 1024 8192 16 # (Cyl. 2048 - 2247)
f: 11743872 4603904 4.2BSD 1024 8192 16 # (Cyl. 2248 - 7982*)
g: 1433600 16347776 4.2BSD 1024 8192 16 # (Cyl. 7982*- 8682*)
Notice, here the first partition begins on the first sector of the RAID,
because I didn't use fdisk on it. (No MBR to preserve)
As for the space used here by RaidFrame, some algebra will tell us.
3 disks Raid-5 -> theoric size is 2x the size of one disk part
ThSize = 2 x 8890759 = 17781518
And we have a RAID size (usable size) of 17781376
Thus, RaidFrame uses 17781518 - 17781376 = 142 sectors on each disk
This is more than enough to store any useful information, isn't it ?