Hi all,

I've followed a set of instructions[1] describing a method of
installing OpenBSD onto a RAID 1 array created with raidctl using only
2 disks (sd0b + sd1b).  The basic premise is to first install normally
onto one disk (sd0b) and then created a degraded RAID 1 array using
the second disk (sd1b) and a fake third disk (sd2b).  After booting
off the array you then add the original first (sd0b) disk to the array
and rebuild.

This works but the changes don't 'stick' between reboots, the array
promptly forgets about sd0b:

# raidctl -s raid0
raid0 Components:
         component0: failed
          /dev/sd1b: optimal
No spares.
Parity status: clean
Reconstruction is 100% complete.
Parity Re-write is 100% complete.
Copyback is 100% complete.

# raidctl -a /dev/sd0b raid0
# raidctl -F component0 raid0

# raidctl -s raid0
raid0 Components:
         component0: spared
          /dev/sd1b: optimal
Spares:
          /dev/sd0b: used_spare
Parity status: clean
Reconstruction is 100% complete.
Parity Re-write is 100% complete.
Copyback is 100% complete.

In the man pages there's mention of being able to swap disks over in
the array configuration but I'm unsure how to do this. I've tried
dumping the config with raidctl -G [2], editing it[3] and then
applying it with

# raidctl -c /root/raid0.conf raid0

but I get:

raidctl: ioctl (RAIDFRAME_CONFIGURE) failed

and in /var/log/messages:
raid0: Device already configured!

Also, running raidctl -vs raid0 [4] spits out

raidctl: ioctl (RAIDFRAME_GET_COMPONENT_LABEL) failed

Has anyone else got experience of getting this sort of setup (i.e. an
auto-configurable RAID 1 array as the root file system[5]) working
satisfactorily or have I missed something obvious?

Cheers,

Paul.
[1] - http://os.newsforge.com/os/06/03/08/1646257.shtml?tid=8
[2] running raid0.conf
START array
# numRow numCol numSpare
1 2 1

START disks
component0
/dev/sd1b

START spare
/dev/sd0b

START layout
# sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level_1
128 1 1 1

START queue
fifo 100

[3] edited raid0.conf
START array
# numRow numCol numSpare
1 2 0

START disks
/dev/sd0b
/dev/sd1b

START layout
# sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level_1
128 1 1 1

START queue
fifo 100

[4]
# raidctl -sv raid0
raid0 Components:
         component0: spared
          /dev/sd1b: optimal
Spares:
          /dev/sd0b: used_spare
component0 status is: spared.  Skipping label.
Component label for /dev/sd1b:
  Row: 0, Column: 1, Num Rows: 1, Num Columns: 2
  Version: 2, Serial Number: 605190, Mod Counter: 158
  Clean: No, Status: 0
  sectPerSU: 128, SUsPerPU: 1, SUsPerRU: 1
  Queue size: 100, blocksize: 512, numBlocks: 143232896
  RAID Level: 1
  Autoconfig: Yes
  Root partition: Yes
  Last configured as: raid0
raidctl: ioctl (RAIDFRAME_GET_COMPONENT_LABEL) failed

[5]
# df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/raid0a    490M   32.3M    433M     7%    /
/dev/raid0d    9.8G    969M    8.4G    10%    /usr
/dev/raid0e    1.5G    2.0K    1.4G     0%    /tmp
/dev/raid0f   14.8G    4.9M   14.0G     0%    /var
/dev/raid0g   40.1G    540M   37.6G     1%    /home


GENERIC.RAID
======
include "arch/i386/conf/GENERIC" # include GENERIC configuration
option RAID_AUTOCONFIG # automatically configure RAIDframe arrays on boot
pseudo-device raid 4 # RAIDframe disk driver


dmesg
======
OpenBSD 3.9-stable (GENERIC.RAID) #0: Fri May 19 18:01:35 BST 2006
   [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC.RAID
cpu0: Intel(R) Xeon(TM) CPU 3.00GHz ("GenuineIntel" 686-class) 3 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,CNXT-ID
real mem  = 2146807808 (2096492K)
avail mem = 1952378880 (1906620K)
using 4278 buffers containing 107442176 bytes (104924K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(00) BIOS, date 01/04/06, BIOS32 rev. 0 @ 0xffe90
pcibios0 at bios0: rev 2.1 @ 0xf0000/0x10000
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfbf40/160 (8 entries)
pcibios0: PCI Interrupt Router at 000:31:0 ("Intel 82801EB/ER LPC" rev 0x00)
pcibios0: PCI bus #4 is the last bus
bios0: ROM list: 0xc0000/0xb000! 0xcb000/0x1000 0xcc000/0x9e00
0xd6000/0x1000 0xec000/0x4000!
ipmi0 at mainbus0: version 1.5 interface KCS iobase 0xca8/8 spacing 4
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "Intel E7520 MCH" rev 0x09
ppb0 at pci0 dev 2 function 0 "Intel MCH PCIE" rev 0x09
pci1 at ppb0 bus 1
ppb1 at pci1 dev 0 function 0 "Intel PCIE-PCIE" rev 0x09
pci2 at ppb1 bus 2
em0 at pci2 dev 4 function 0 "Intel PRO/1000MT (82541GI)" rev 0x05:
irq 15, address 00:13:72:3f:a3:5a
ppb2 at pci1 dev 0 function 2 "Intel PCIE-PCIE" rev 0x09
pci3 at ppb2 bus 3
ahd0 at pci3 dev 7 function 0 vendor "Adaptec", unknown product 0x8095
rev 0x10: irq 10
ahd0: aic7902, U320 Wide Channel A, SCSI Id=7, PCI-X 101-133Mhz, 512 SCBs
scsibus0 at ahd0: 16 targets
sd0 at scsibus0 targ 0 lun 0: <SEAGATE, ST373207LW, D703> SCSI3 0/direct fixed
sd0: 70007MB, 90774 cyl, 2 head, 789 sec, 512 bytes/sec, 143374650 sec total
sd1 at scsibus0 targ 1 lun 0: <SEAGATE, ST373207LW, D703> SCSI3 0/direct fixed
sd1: 70007MB, 90774 cyl, 2 head, 789 sec, 512 bytes/sec, 143374650 sec total
ahd1 at pci3 dev 7 function 1 vendor "Adaptec", unknown product 0x8095
rev 0x10: irq 14
ahd1: aic7902, U320 Wide Channel B, SCSI Id=7, PCI-X 101-133Mhz, 512 SCBs
scsibus1 at ahd1: 16 targets
uhci0 at pci0 dev 29 function 0 "Intel 82801EB/ER USB" rev 0x02: irq 15
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 29 function 1 "Intel 82801EB/ER USB" rev 0x02: irq 14
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: Intel UHCI root hub, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
ehci0 at pci0 dev 29 function 7 "Intel 82801EB/ER USB2" rev 0x02: irq 11
usb2 at ehci0: USB revision 2.0
uhub2 at usb2
uhub2: Intel EHCI root hub, rev 2.00/1.00, addr 1
uhub2: 4 ports with 4 removable, self powered
ppb3 at pci0 dev 30 function 0 "Intel 82801BA AGP" rev 0xc2
pci4 at ppb3 bus 4
em1 at pci4 dev 3 function 0 "Intel PRO/1000MT (82541GI)" rev 0x05:
irq 6, address 00:13:72:3f:a3:5b
vga1 at pci4 dev 13 function 0 "ATI Radeon VE QY" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
ichpcib0 at pci0 dev 31 function 0 "Intel 82801EB/ER LPC" rev 0x02
pciide0 at pci0 dev 31 function 1 "Intel 82801EB/ER IDE" rev 0x02:
DMA, channel 0 configured to compatibility, channel 1 configured to
compatibility
pciide0: channel 0 ignored (disabled)
pciide0: channel 1 ignored (disabled)
isa0 at ichpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16: using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
biomask ffad netmask ffed ttymask ffef
pctr: user-level cycle counter enabled
Kernelized RAIDframe activated
ahd0: target 0 synchronous with period = 0x8, offset = 0x3f(RDSTRM|DT|IU|RTI)
ahd0: target 1 synchronous with period = 0x8, offset = 0x3f(RDSTRM|DT|IU|RTI)
raid0 (root): (RAID Level 1) total number of sectors is 143232896
(69937 MB) as root
dkcsum: sd0 matches BIOS drive 0x80
dkcsum: sd1 matches BIOS drive 0x81
rootdev=0x1300 rrootdev=0x3600 rawdev=0x3602
Warning: truncating spare disk /dev/sd0b to 143232896 blocks.
raid0: Failing disk r0 c0.
RECON: initiating reconstruction on row 0 col 0 -> spare at row 0 col 2.
Suspending: Waiting for Quiescence.
Quiescence reached...
Quiescence reached...
Number of I/Os:             207
Elapsed time (us):          1221361459
User I/Os per second:       0
Average user response time: 0 us
Total sectors moved:        4892
Average access size (sect): 23
Achieved data rate:         0.0 MB/sec
Reconstruction of disk at row 0 col 0 completed.
Recon time was 1221.356373 seconds, accumulated XOR time was 0 us (0.000000).
 (start time 1148297652 sec 115891 usec, end time 1148298873 sec 472264 usec)
Total head-sep stall count was 0.
RAIDframe: 2190931 recon event waits, 0 recon delays.
RAIDframe: 10400 max exec ticks.

Reply via email to