Nick Nauwelaerts wrote:
Hello,
I was wondering how one can recover from a softraid in raid1 with a
failed device. Recover being: just run on 1 leg until I can find a
replacement disk. The error on reboot I'm faced with after loosing one
disk is the following:

softraid0: not assembling partial disk that used to be volume 0

I see references to this on the mailing list in November 2007 and was
wondering if a partial bringup of a raid 1 array was already possible.
All my attempts resulted either in bioctl complaining it did not have
enough disks:

# bioctl -c 1 -l /dev/sd1d softraid0
bioctl: not enough disks

Or an invalid argument (sd1e used to be the second raid1 slice):
# bioctl -c 1 -l /dev/sd1d,/dev/sd1e softraid0
bioctl: BIOCCREATERAID: Invalid argument

This is a test setup to see how I can rebuild raid1 arrays; that's why
both slices are on the same disk.

On a related note: do raid1 arrays ever go dirty? All tests I did thus
far failed to get them in a state where the metadata was corrupt. Does
that get rebuilt upon reboot after an unclean shutdown? I failed to
find anything in the manpage or my dmesg regarding that.

Thanks

// nick


OpenBSD 4.5-beta (GENERIC) #2011: Mon Feb  9 13:01:20 MST 2009
    t...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
real mem = 2146369536 (2046MB)
avail mem = 2072330240 (1976MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (45 entries)
bios0: vendor Phoenix Technologies LTD version "6.00" date 07/22/2008
bios0: VMware, Inc. VMware Virtual Platform
acpi0 at bios0: rev 0
acpi0: tables DSDT FACP APIC BOOT
acpi0: wakeup devices USB_(S1)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Quad-Core AMD Opteron(tm) Processor 8356, 2310.78 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 
16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 16 4MB entries fully associative
cpu0: DTLB 48 4KB entries fully associative, 48 4MB entries fully associative
cpu0: AMD erratum 113 detected and fixed
cpu0: AMD erratum 89 present, BIOS upgrade may be required
cpu0: apic clock running at 65MHz
cpu at mainbus0: not configured
ioapic0 at mainbus0 apid 2 pa 0xfec00000, version 11, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0
acpibat0 at acpi0: BAT1 not present
acpibat1 at acpi0: BAT2 not present
acpiac0 at acpi0: AC unit online
pci0 at mainbus0 bus 0: configuration mode 1
pchb0 at pci0 dev 0 function 0 "Intel 82443BX AGP" rev 0x01
ppb0 at pci0 dev 1 function 0 "Intel 82443BX AGP" rev 0x01
pci1 at ppb0 bus 1
pcib0 at pci0 dev 7 function 0 "Intel 82371AB PIIX4 ISA" rev 0x08
pciide0 at pci0 dev 7 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel 0 
configured to compatibility, channel 1 configured to compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus0 at atapiscsi0: 2 targets, initiator 7
cd0 at scsibus0 targ 0 lun 0: <NECVMWar, VMware IDE CDR00, 1.00> ATAPI 5/cdrom 
removable
cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
piixpm0 at pci0 dev 7 function 3 "Intel 82371AB Power" rev 0x08: SMBus disabled
vga1 at pci0 dev 15 function 0 "VMware Virtual SVGA II" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
mpi0 at pci0 dev 16 function 0 "Symbios Logic 53c1030" rev 0x01: apic 2 int 17 
(irq 9)
scsibus1 at mpi0: 16 targets, initiator 7
sd0 at scsibus1 targ 0 lun 0: <VMware, Virtual disk, 1.0> SCSI2 0/direct fixed
sd0: 6144MB, 512 bytes/sec, 12582912 sec total
sd1 at scsibus1 targ 1 lun 0: <VMware, Virtual disk, 1.0> SCSI2 0/direct fixed
sd1: 51200MB, 512 bytes/sec, 104857600 sec total
mpi0: target 0 Sync at 160MHz width 16bit offset 127 QAS 1 DT 1 IU 1
mpi0: target 1 Sync at 160MHz width 16bit offset 127 QAS 1 DT 1 IU 1
em0 at pci0 dev 17 function 0 "Intel PRO/1000MT (82545EM)" rev 0x01: apic 2 int 
18 (irq 11), address 00:50:56:b9:38:55
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pmsi0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pmsi0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
mtrr: Pentium Pro MTRR support
softraid0 at root
softraid0: not assembling partial disk that used to be volume 0
root on sd0a swap on sd0b dump on sd0b
(kbd slot)

You can't rebuild a softraid(4) right now (manually or automatically). You have to recreate it. The process is to make a new softraid and restore(8) the data from a recent dump(8).

If you don't have a dump you can create the original device with the remaining disk(s) by forcing it:

# bioctl -C force -c 1 -l /dev/sd1d softraid0

Then you can dump, recreate and restore the device.

I do believe there is work being done to add manual and maybe later auto rebuild. For now this is the process as I understand it.

--Aaron

Reply via email to