Subject: 1.2TB array vs sysinst
To: None <current-users@netbsd.org>
From: Stephen Borrill <netbsd@precedence.co.uk>
List: current-users
Date: 04/16/2005 08:52:16
I've a 3ware 8506-8 RAID card with 4 400GB S-ATA disks in a 1.2TB RAID 5 array 
and I'm attempting to install NetBSD 2.0 (preferably) or 3.0 on it.
Having read the thread starting with
http://mail-index.netbsd.org/current-users/2004/09/29/0005.html I thought it 
should be OK, but I just come up again negative numbers, bizarre arithmetic and 
no way to easily achieve my goal.

dmesg:

twe0 at pci3 dev 9 function 0: 3ware Escalade
twe0: interrupting at irq 5
twe0: 8 ports, Firmware FE8S 1.05.00.068, BIOS BE7X 1.08.00.048
twe0: Monitor ME7X 1.01.00.040, PCB Rev5    , Achip 3.20    , Pchip 1.30-66 
twe0: port 0: ST3400832AS                              381554 MB
twe0: port 1: ST3400832AS                              381554 MB
twe0: port 2: ST3400832AS                              381554 MB
twe0: port 3: ST3400832AS                              381554 MB
ld0 at twe0 unit 0: 64K stripe RAID5, status: Normal
ld0: 1117 GB, 145923 cyl, 255 head, 63 sec, 512 bytes/sect x 2344262016 sectors

sysinst reports the NetBSD part is -952492 MB and from that point 
there's problems. Setting a simple disklabel like the following:

MB   Cyl Sec
1027 131 2104515 /
1027 131 2104515 swap

reports "Reduce partition size by 954458MB". Fiddling about (e.g. by 
adding 1000000 MB as e to allow it to proceed to the next screen) produces 
disklabels like this:

# /dev/rld0d:
type: unknown
disk: mydisk
label: flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 145923
total sectors: 2344252995
rpm: 3600
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/sgs]
  a:   2104515        12     4.2BSD   1024  8192 45752  # (Cyl.      0*- 
131*)
  b:   2104515   2104527       swap                     # (Cyl.    131*- 
262*)
  c: 2344262004        12     unused      0     0        # (Cyl.      0*- 
145923+)

N.B. size of c is greater than the disk plus there's meant to be a d and e here

/tmp/disktab is:

mydisk|NetBSD installation generated:\
 	:dt=unknown:ty=winchester:\
 	:nc#145923:nt#255:ns#63:\
 	:sc#16065:su#-1950705280:\
 	:se#512:\
 	:pa#2104515:oa#12:ta=4.2BSD:ba#8192:fa#1024:ta=4.2BSD:\
 	:pb#2104515:ob#2104527:tb=swap:\
 	:pc#-1950705292:oc#12:tc=unused:\
 	:pd#-1950705280:od#0:td=unused:\
 	:pe#-1954914322:oe#4209042:te=4.2BSD:be#8192:fe#1024:ta=4.2BSD:\
 	:pf#0:of#0:tf=unused:\
 	:pg#0:og#0:tg=unused:\
 	:ph#0:oh#0:th=unused:\
 	:pi#0:oi#0:ti=unused:\
 	:pj#0:oj#0:tj=unused:\
 	:pk#0:ok#0:tk=unused:\
 	:pl#0:ol#0:tl=unused:\
 	:pm#0:om#0:tm=unused:\
 	:pn#0:on#0:tn=unused:\
 	:po#0:oo#0:to=unused:\
 	:pp#0:op#0:tp=unused:

I guess my only option is to install on a separate drive and then try to 
manually install on the array (however even then disklabel insists on partition 
c being greater than the disk even when I set it to the right value).

NetBSD 2.0.2 and 3.0_BETA show the same symptoms.

-- 
Stephen Borrill