Subject: Root on Raid for Sparc64
To: None <port-sparc64@NetBSD.org>
From: Chris Fuhrman <chris.fuhrman@tfcci.com>
List: port-sparc64
Date: 08/12/2003 09:12:00
Howdy,

I'm trying to get RAIDframe set up on an Ultra 1E with two identical 9GB 
SCSI drives in it.  I've been able to get the partitions properly 
disklabel'd, formatted, and mounted, and made sure the partition with root 
on it was configured with raidctl as root (raidctl -A root raid1).  Yet, 
when I try and boot off the raid device, it doesn't seem to recognize the 
correct partition as the root partition.

Here is how my disk is labeled:

-- disklabel.sd1 --

# /dev/rsd1c:
type: unknown
disk: mydisk1
label: sparcdisc1
flags:
bytes/sector: 512
sectors/track: 212
tracks/cylinder: 12
sectors/cylinder: 2544
cylinders: 6962
total sectors: 17783240
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0		# microseconds
track-to-track seek: 0	# microseconds
drivedata: 0 

7 partitions:
#        size    offset     fstype  [fsize bsize cpg/sgs]
 a:     10176      2544     4.2BSD   1024  8192    42   # (Cyl.    1 - 4)
 b:   1294896     12720       swap                      # (Cyl.    5 - 513)
 c:  17783240         0     unused      0     0         # (Cyl.    0 - 6990*)
 d:   1307616         0       RAID                      # (Cyl.    0 - 513)
 e:  16475624   1307616       RAID                      # (Cyl.  514 - 6990*)

And here is how my first RAID partition is labeled:

-- disklabel.raid0 --

# /dev/rraid0c:
type: RAID
disk: raid
label: default label
flags:
bytes/sector: 512
sectors/track: 128
tracks/cylinder: 8
sectors/cylinder: 1024
cylinders: 1279
total sectors: 1306592
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0		# microseconds
track-to-track seek: 0	# microseconds
drivedata: 0 

3 partitions:
#        size    offset     fstype  [fsize bsize cpg/sgs]
 a:     10240      1024     4.2BSD    512  4096    23   # (Cyl.    1 - 10)
 b:   1294336     11264       swap                      # (Cyl.   11 - 1274)
 c:   1305600         0     unused      0     0         # (Cyl.    0 - 1274)

And, for good measure, here is my dmesg:

-- dmesg.txt --

console is keyboard/display
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 1.6.1 (GENERIC) #0: Mon Apr  7 10:27:16 UTC 2003
    autobuild@cs20.apochromatic.org:/autobuilder/build/netbsd-1-6/sparc64/OBJ/autobuilder/build/netbsd-1-6/src/sys/arch/sparc64/compile/GENERIC
total memory = 256 MB
avail memory = 228 MB
using 1651 buffers containing 13208 KB of memory
bootpath: /sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@0,0
mainbus0 (root): SUNW,Ultra-1
cpu0 at mainbus0: SUNW,UltraSPARC @ 167 MHz, version 0 FPU
cpu0: physical 32K instruction (32 b/l), 16K data (32 b/l), 512K external (64 b/l)
timer0 at mainbus0 addr 0xfffc3c00 irq vectors 7f0 and 7f1
sbus0 at mainbus0 addr 0xfffcc000: clock = 25 MHz
DVMA map: ff800000 to ffffe000
IOTSB: 12b6000 to 12b8000
audiocs0 at sbus0 slot 13 offset 0xc000000 vector 24 ipl 13: CS4231A
audio0 at audiocs0: full duplex
auxio0 at sbus0 slot 15 offset 0x1900000
flashprom at sbus0 slot 15 offset 0x0 not configured
SUNW,fdtwo at sbus0 slot 15 offset 0x1400000 vector 29 ipl 11 not configured
clock0 at sbus0 slot 15 offset 0x1200000: mk48t59: hostid 808cb351
zs0 at sbus0 slot 15 offset 0x1100000 vector 28 ipl 12 softpri 6
zstty0 at zs0 channel 0
zstty1 at zs0 channel 1
zs1 at sbus0 slot 15 offset 0x1000000 vector 28 ipl 12 softpri 6
zstty2 at zs1 channel 0 (console input)
kbd0 at zstty2 (console input)
zstty3 at zs1 channel 1
ms0 at zstty3
sc at sbus0 slot 15 offset 0x1300000 not configured
SUNW,pll at sbus0 slot 15 offset 0x1304000 not configured
dma0 at sbus0 slot 14 offset 0x8400000: dma rev 2
esp0 at dma0 slot 14 offset 0x8800000 vector 20 ipl 3: ESP200, 40MHz, SCSI ID 7
scsibus0 at esp0: 8 targets, 8 luns per target
ledma0 at sbus0 slot 14 offset 0x8400010: dma rev 2
le0 at ledma0 slot 14 offset 0x8c00000 vector 21 ipl 6: address 08:00:20:8c:b3:51
le0: 8 receive buffers, 2 transmit buffers
bpp0 at sbus0 slot 14 offset 0xc800000 vector 22 ipl 2: dma rev 2
hme0 at sbus0 slot 1 offset 0x8c00000 vector 4 ipl 6: Sun Happy Meal Ethernet (SUNW,hme)
hme0: Ethernet address 08:00:20:8c:b3:51
nsphy0 at hme0 phy 1: DP83840 10/100 media interface, rev. 1
nsphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
esp1 at sbus0 slot 1 offset 0x8800000 vector 3 ipl 3: FAS366/HME, 40MHz, SCSI ID 7
scsibus1 at esp1: 16 targets, 8 luns per target
cgsix0 at sbus0 slot 2 offset 0x0 vector 5 ipl 5: SUNW,501-2325, 1152 x 900, rev 11 (console)
cgsix0: attached to /dev/fb
pcons at mainbus0 not configured
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 0 lun 0: <SEAGATE, ST39102LC, 0004> SCSI2 0/direct fixed
sd0: 8683 MB, 6962 cyl, 12 head, 212 sec, 512 bytes/sect x 17783240 sectors
sd0: sync (100.0ns offset 15), 8-bit (10.000MB/s) transfers, tagged queueing
sd1 at scsibus0 target 1 lun 0: <SEAGATE, ST39102LC, 0006> SCSI2 0/direct fixed
sd1: 8683 MB, 6962 cyl, 12 head, 212 sec, 512 bytes/sect x 17783240 sectors
sd1: sync (100.0ns offset 15), 8-bit (10.000MB/s) transfers, tagged queueing
cd0 at scsibus0 target 6 lun 0: <TOSHIBA, DVD-ROM SD-M1401, 1009> SCSI2 5/cdrom removable
cd0: sync (100.0ns offset 15), 8-bit (10.000MB/s) transfers
scsibus1: waiting 2 seconds for devices to settle...
Kernelized RAIDframe activated
RAID autoconfigure
Configuring raid0:
RAIDFRAME: protectedSectors is 64
RAIDFRAME: Configure (RAID Level 1): total number of sectors is 1307520 (638 MB)
RAIDFRAME(RAID Level 1): Using 6 floating recon bufs with no head sep limit
RAID autoconfigure
Configuring raid1:
RAIDFRAME: Configure (RAID Level 1): total number of sectors is 16475520 (8044 MB)
RAIDFRAME(RAID Level 1): Using 6 floating recon bufs with no head sep limit
root on sd0a dumps on sd0b
root file system type: ffs
WARNING: raid0: total sector size in disklabel (1306592) != the size of raid (1307520)
raid0: Device already configured!
raid1: Device already configured!
WARNING: raid0: total sector size in disklabel (1306592) != the size of raid (1307520)
raid0: Error re-writing parity!
raid1: Error re-writing parity!
WARNING: raid0: total sector size in disklabel (1306592) != the size of raid (1307520)
Closing vnode for row: 0 col: 0
Closing vnode for row: 0 col: 1
vnode was NULL
Closing vnode for row: 0 col: 0
Closing vnode for row: 0 col: 1
vnode was NULL

Note that this is when I boot off a regular (non-RAID) drive.  When I try 
and boot off the raid, it thinks /dev/sd1g is the root partition which it 
is clearly not!

I've copied /usr/mdec/ofwboot and a compressed copy of my kernel over to 
/dev/sd1a so that's all set up and have even played around with various 
configurations all with the same effect.

I'm pretty sure I'm missing something basic but for the life of me I can't 
figure out what.  Anyone know if there's anything special I have to do 
with sparc64 hardware?

Thanks!

-- 
Chris Fuhrman           | Twenty First Century Communications
chris.fuhrman@tfcci.com | Senior Software Engineer
(W) 614-442-1215 x271   |
(F) 614-442-5662        | PGP/GPG Public Key Available on Request