On 11/02/13 20:38, mia wrote: > 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
definitely start with fdisk, NOT disklabel. The hope is that by defining a proper MBR, you will end up with your (untouched) disklabel "just appearing" where OpenBSD expects it to be. Nick.