On Mon, Nov 04, 2013 at 06:12:15PM -0500, mia wrote:
> On 11/03/13 10:35, Nick Holland wrote:
> >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.
> >
> >
> Hi Nick,
> 
> Thanks,
> 
> I'm not sure what I would do with fdisk, it appears as though it's
> how it should be.
> 
> # fdisk sd0
> fdisk: disk too large (8789061120 sectors). size truncated.
> Disk: sd0       geometry: 267349/255/63 [4294961685 Sectors]
> Offset: 0       Signature: 0xAA55
>             Starting         Ending         LBA Info:
>  #: id      C   H   S -      C   H   S [       start:        size ]
> -------------------------------------------------------------------------------
>  0: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
>  1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
>  2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
> *3: A6      0   1   2 - 267348 254  63 [          64:  4294961621 ] OpenBSD
> # disklabel sd0
> # /dev/rsd0c:
> type: SCSI
> disk: SCSI disk
> label: ARC-1210-VOL#00
> duid: 0000000000000000
> flags:
> bytes/sector: 512
> sectors/track: 63
> tracks/cylinder: 255
> sectors/cylinder: 16065
> cylinders: 547093
> total sectors: 8789061120
> boundstart: 64
> boundend: 4294961685
> drivedata: 0
> 
> 16 partitions:
> #                size           offset  fstype [fsize bsize  cpg]
>   c:       8789061120                0  unused
> 
> I have the backup for the old disklable and it looks like this:
> # cat disklabel.sd0.current
> # /dev/rsd0c:
> type: SCSI
> disk: SCSI disk
> label: ARC-1210-VOL
> duid: b040b4952bec09ff
> flags:
> bytes/sector: 512
> sectors/track: 63
> tracks/cylinder: 255
> sectors/cylinder: 16065
> cylinders: 547093
> total sectors: 8789061120
> boundstart: 512
> boundend: 199019008
> drivedata: 0
> 
> 16 partitions:
> #                size           offset  fstype [fsize bsize  cpg]
>   a:       8789060608              512  4.2BSD   8192 65536    1
>   c:       8789061120                0  unused
> 
> 
> I ran scan_ffs as the link you provided suggested and got the following:
> # scan_ffs sd0
> ffs at 141801792 size 404619264 mount /var/log time Wed Nov  4 22:08:20 2009
> ffs at 148164352 size 658538496 mount /mnt/var/log time Mon Apr 27
> 21:28:03 2009
> ffs at 148192192 size 404619264 mount /var/named/log time Wed Nov  4
> 22:08:21 2009
> ffs at 209347391 size 656504832 mount /mnt time Wed Nov  4 22:08:18 2009
> ffs at 210398518 size 2293760 mount /mnt time Tue Mar 12 20:23:34 2013
> ffs at 1171552506 size 1982464 mount /mnt time Tue Mar 12 20:46:03 2013
> ffs at 1177197110 size 2293760 mount /mnt time Tue Mar 12 20:23:34 2013
> ffs at 4043451456 size 2145386496 mount /analysis time Mon Dec 14
> 11:08:40 1998
> ffs at 4045272640 size 2145386496 mount /analysis time Mon Dec 14
> 11:08:40 1998
> scan_ffs: read: Invalid argument
> 
> None of these are the mount point however as I always mounted
> /dev/sd0a at /data .
> 
> From what I see it looks like the fdisk portion is all set up and i
> just need to create a disklable for partition a with an offset of
> 512 (this seems really weird and I wouldn't have set it to this) and
> to let it be the full size of the disk.
> 
> Does that seem right?
> 
> Thanks again.
> 
> Aaron
> 

There may be a copy of your old disklabel at /var/backups/disklabel.sdN.backup
or /var/backups/disklabel.sdN.current.

.... Ken

Reply via email to