On 11/02/13 22:35, Nick Holland wrote:
On 11/02/13 14:18, mia wrote:
Hi All,

I have a system with a sata disk or the OS and a areca pcie raid card
with 4 1.5 Tb drives in a raid5 configuration.  The raid has data on it
and the OS drive was blank.

I was doing a fresh install on the OS, unfortuntately I forgot that the
OpenBSD install sees the OS drive as sd1.  I chose sd0 and got some
message, wasn't on a console so didn't capture it, about drive too large
for fdisk.  I went on and then saw the number of sectors and realized
immediately I chose the wrong disk.  I did a control+C, rebooted and
then installed on the sd1 drive.

Now that i'm back in the OS I went to mount the raid and got a device
not configured message for /dev/sd0a.  I did a disklable -E sd0 and to
my horror there is no a partition left on the raid.  :-(

Is there any way to get this back?  Can I simply use disklable to use
all space on the drive to recreate the mbr and my data will be
available?  I'm desperate, ANY help will be GREATLY appreciated.
ok, if I followed this, you changed the MBR with fdisk -- AND NOTHING ELSE.

IF that's true...and you know what and where partitions were, yes, you
are in not bad shape.

I'd start by using fdisk to recreate the OpenBSD partition as it was
(hopefully, whole disk.  probably starting at either sector 64 (if
"newer") or sector 63 (if "older").  Do that, reboot (I'm not sure
that's needed, but it prolongs the suspense), and you should see your
disklabel partitions just come back from the not-quite-dead.  If you
aren't sure about your starting partition, try both 64 and 63, see which
one brings back your disklabel.

A few more tips here:
http://www.openbsd.org/faq/faq14.html#OhBugger

Good luck.

Nick.

Hi Nick,

Thanks for the reply, I didn't directly use fdisk. This was part of a fresh install of 5.4. I chose the wrong disk, fdisk looked at the drive, complained about it being too big, I hit enter and then did a ctrl+c to get out before it did any damage/write (i thought). I'm guessing when it warned about the partition being too big and I hit enter, it did something that wiped my mbr at that point.

The partition was originally W (WHOLE DISK), yes, with a single partition. This raid drive was just for data and usually mounted ro unless I need to add something.

The old system was 5.3, so it is newer (weird that current does 63 on my ssd).

So if i'm following you, I should use fdisk and not use disklable at all? I thought I'd go into disklable -E do an "a a" with no newfs afterward and I should be able to just do a "mount /dev/sd0a /mnt/point" (I'm glad i didn't proceed.) I'm really hoping to not lose this data.. mostly centimental stuff that I can't replace.

Thanks again,

Aaron



Thanks in advance,

Aaron

# dmesg
OpenBSD 5.4 (GENERIC.MP) #41: Tue Jul 30 15:30:02 MDT 2013
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 2129526784 (2030MB)
avail mem = 2065170432 (1969MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.51 @ 0x7feeb000 (33 entries)
bios0: vendor Phoenix Technologies LTD version "6.00" date 12/29/2010
bios0: Supermicro PDSM4+
acpi0 at bios0: rev 0
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP MCFG APIC BOOT SSDT SSDT SSDT SSDT SSDT SSDT
SSDT SSDT SSDT
acpi0: wakeup devices PXHA(S5) PXHB(S5) DEV3(S5) EXP1(S5) EXP5(S5)
EXP6(S5) PCIB(S5) KBC0(S1) MSE0(S1) COM1(S5) COM2(S5) USB1(S4) USB2(S4)
USB3(S4) USB4(S4) EUSB(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimcfg0 at acpi0 addr 0xf0000000, bus 0-19
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Xeon(R) CPU 3060 @ 2.40GHz, 2400.10 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF
cpu0: 4MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 0
cpu0: apic clock running at 266MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Xeon(R) CPU 3060 @ 2.40GHz, 2399.74 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF
cpu1: 4MB 64b/line 16-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
ioapic1 at mainbus0: apid 3 pa 0xfecc0000, version 20, 24 pins
ioapic2 at mainbus0: apid 4 pa 0xfecc0400, version 20, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 2 (PXHA)
acpiprt2 at acpi0: bus 3 (PXHB)
acpiprt3 at acpi0: bus 10 (DEV3)
acpiprt4 at acpi0: bus 14 (EXP1)
acpiprt5 at acpi0: bus 18 (EXP5)
acpiprt6 at acpi0: bus 19 (EXP6)
acpiprt7 at acpi0: bus 20 (PCIB)
acpicpu0 at acpi0
acpicpu1 at acpi0
acpibtn0 at acpi0: PWRB
ipmi at mainbus0 not configured
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel E7230 Host" rev 0xc0
ppb0 at pci0 dev 1 function 0 "Intel E7230 PCIE" rev 0xc0: msi
pci1 at ppb0 bus 1
ppb1 at pci1 dev 0 function 0 "Intel 6700PXH PCIE-PCIX" rev 0x09
pci2 at ppb1 bus 2
"Intel IOxAPIC" rev 0x09 at pci1 dev 0 function 1 not configured
ppb2 at pci1 dev 0 function 2 "Intel 6700PXH PCIE-PCIX" rev 0x09
pci3 at ppb2 bus 3
"Intel IOxAPIC" rev 0x09 at pci1 dev 0 function 3 not configured
ppb3 at pci0 dev 3 function 0 "Intel 82975X PCIE" rev 0xc0: msi
pci4 at ppb3 bus 10
ppb4 at pci4 dev 0 function 0 "Intel IOP332 PCIE-PCIX" rev 0x07
pci5 at ppb4 bus 11
arc0 at pci5 dev 14 function 0 "Areca ARC-1210" rev 0x00: apic 2 int 18
arc0: 4 ports, 256MB SDRAM, firmware V1.47 2009-07-02
scsibus0 at arc0: 16 targets
sd0 at scsibus0 targ 0 lun 0: <Areca, ARC-1210-VOL#00, R001> SCSI3
0/direct fixed eui.0004d927fffff800
sd0: 4291533MB, 512 bytes/sector, 8789061120 sectors
ppb5 at pci4 dev 0 function 2 "Intel IOP332 PCIE-PCIX" rev 0x07
pci6 at ppb5 bus 12
ppb6 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x01: msi
pci7 at ppb6 bus 14
ppb7 at pci0 dev 28 function 4 "Intel 82801G PCIE" rev 0x01: msi
pci8 at ppb7 bus 18
em0 at pci8 dev 0 function 0 "Intel 82573E" rev 0x03: msi, address
00:30:48:8c:4e:80
ppb8 at pci0 dev 28 function 5 "Intel 82801G PCIE" rev 0x01: msi
pci9 at ppb8 bus 19
em1 at pci9 dev 0 function 0 "Intel 82573L" rev 0x00: msi, address
00:30:48:8c:4e:81
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x01: apic 2 int 23
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x01: apic 2 int 19
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x01: apic 2 int 18
uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x01: apic 2 int 16
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x01: apic 2 int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb9 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xe1
pci10 at ppb9 bus 20
vga1 at pci10 dev 4 function 0 "ATI ES1000" rev 0x02
radeondrm0 at vga1: apic 2 int 16
drm0 at radeondrm0
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
pcib0 at pci0 dev 31 function 0 "Intel 82801GB LPC" rev 0x01
pciide0 at pci0 dev 31 function 1 "Intel 82801GB IDE" rev 0x01: DMA,
channel 0 configured to compatibility, channel 1 configured to compatibility
pciide0: channel 0 disabled (no drives)
pciide0: channel 1 disabled (no drives)
ahci0 at pci0 dev 31 function 2 "Intel 82801GR AHCI" rev 0x01: msi, AHCI 1.1
scsibus1 at ahci0: 32 targets
sd1 at scsibus1 targ 0 lun 0: <ATA, ST3160815AS, 3.CH> SCSI3 0/direct
fixed t10.ATA_ST3160815AS_5RX07MEK_
sd1: 152627MB, 512 bytes/sector, 312581808 sectors
cd0 at scsibus1 targ 1 lun 0: <ATAPI, iHAS124 B, AL08> ATAPI 5/cdrom
removable
ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x01: apic 2
int 19
iic0 at ichiic0
lm1 at iic0 addr 0x2d: W83627HF
wbng0 at iic0 addr 0x2f: w83793g
spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM ECC PC2-5300CL5
spdmem1 at iic0 addr 0x52: 1GB DDR2 SDRAM ECC PC2-5300CL5
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
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 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
wbsio0 at isa0 port 0x2e/2: W83627HF rev 0x41
lm2 at wbsio0 port 0x290/8: W83627HF
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
mtrr: Pentium Pro MTRR support
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd1a (6e74d7f65ecaa74a.a) swap on sd1b dump on sd1b

Reply via email to