On Thu, Nov 16, 2006 at 06:33:48AM -0800, David Newman wrote:
> OpenBSD 4.0 on UltraSparc II, two 18G SCSI drives
> 
> I am trying to set up software RAID disk mirroring. There are many fine
> howtos out there, including:
> 
> http://www.monkey.org/openbsd/archive/misc/0203/msg00803.html
> http://www.eclectica.ca/howto/openbsd-software-raid-howto.php
> http://os.newsforge.com/os/06/03/08/1646257.shtml?tid=8
> 
> However, all of these are for x86 and only the first is SCSI-specific.

The SCSI part shouldn't really matter, as long as you are working with
block devices that are available early enough. Just replace `wd' with
`sd' as appropriate.

> Some steps, like fdisk and copying some files from mdec, don't apply on
> sparc64. For example these commands don't work:
> 
> mount /dev/sd1a /mnt
> cp /bsd /usr/mdec/boot /mnt
> /usr/mdec/installboot -v /mnt/boot /usr/mdec/biosboot sd1
> umount /mnt
> 
> There is no /usr/mdec/boot or biosboot in sparc64.

Take a look at boot_sparc64(8) and whatever that references, I suppose.
I don't have, and never had, a working Sparc system.

> I've gotten as far as building a RAID kernel and setting up RAID using
> raidctl -C but not surprisingly the parity bit is dirty and cannot be
> set clean.

`Not surprisingly'? You don't need a valid boot block to be able to get
RAIDFrame working... (at least, not a block that actually boots; you do
need a valid partition table on i386-ish machines, and so on).

> The raid1.conf, disklabel contents, and dmesg.boot output are below.
> 
> Please let me know what I need to do to get RAID mirroring working on
> this system.

> - ------------------------
> # raidctl -s raid1
> raid1 Components:
>            /dev/sd1d: optimal
>            /dev/sd2d: failed

Remember the `sd2'.

> No spares.
> Parity status: DIRTY
> Reconstruction is 100% complete.
> Parity Re-write is 100% complete.
> Copyback is 100% complete.
> 
> - ------------------------
> raid1.conf:

> - ------------------------
> # disklabel sd0
> #             size        offset  fstype [fsize bsize  cpg]
>   a:       8389044             0  4.2BSD   2048 16384   16 # Cyl     0 -
>  7025
>   b:       1048332       8389044    swap                   # Cyl  7026 -
>  7903
>   c:      35879700             0  unused      0     0      # Cyl     0 -
> 30049
> - ------------------------
> # disklabel sd1
> #             size        offset  fstype [fsize bsize  cpg]
>   a:        205368             0  4.2BSD   2048 16384   16 # Cyl     0 -
>   171
>   c:      35879700             0  unused      0     0      # Cyl     0 -
> 30049
>   d:      35674332        205368  4.2BSD   2048 16384   16 # Cyl   172 -
> 30049
> ((note: set partition d to type "RAID" when using disklabel -- not sure
> why it says 4.2BSD now))

That bears investigating, methinks.

> - ------------------------
> from dmesg.boot:
> console is /[EMAIL PROTECTED],0/[EMAIL PROTECTED],1/[EMAIL PROTECTED]/[EMAIL 
> PROTECTED],400000:a
> Copyright (c) 1982, 1986, 1989, 1991, 1993
>       The Regents of the University of California.  All rights reserved.
> Copyright (c) 1995-2006 OpenBSD. All rights reserved.
> http://www.OpenBSD.org
> 
> OpenBSD 4.0 (GENERIC_RAID) #0: Mon Nov 13 23:14:58 PST 2006
> 
> [EMAIL PROTECTED]:/usr/src/sys/arch/sparc64/compile/GENERIC_RAID

> sd0 at scsibus0 targ 0 lun 0: <FUJITSU, MAN3184MP, 0108> SCSI3 0/direct
> fixed
> sd0: 17522MB, 30050 cyl, 2 head, 597 sec, 512 bytes/sec, 35885448 sec total
> sd1 at scsibus0 targ 1 lun 0: <FUJITSU, MAN3184MP, 0108> SCSI3 0/direct
> fixed
> sd1: 17522MB, 30050 cyl, 2 head, 597 sec, 512 bytes/sec, 35885448 sec total

> Kernelized RAIDframe activated

> root on sd0a
> rootdev=0x700 rrootdev=0x1100 rawdev=0x1102
> raidlookup on device: /dev/sd2d failed !
> Hosed component: /dev/sd2d.
> Hosed component: /dev/sd2d.
> raid1: Component /dev/sd1d being configured at row: 0 col: 0
>          Row: 0 Column: 0 Num Rows: 1 Num Columns: 2
>          Version: 2 Serial Number: 112341 Mod Counter: 88
>          Clean: No Status: 0
> /dev/sd1d is not clean !
> raid1: Ignoring /dev/sd2d.
> raid1 (root)raid1: no disk label
> raid1: Error re-writing parity!

Note the lack of `sd2'. You'd at least be able to get status to `clean'
if you used two block devices the system actually has. The kernel is
pretty much right in telling you that /dev/sd2d is hosed. ;-)

As to being able to boot from sd2, that's another problem, likely to be
sufficiently addressed by the man pages (but for some reason, there's
no boot_sparc64(8) on this (i386) box - perhaps it would be a good idea
to install them anyway?).

                Joachim

Reply via email to