recovering data from a RAID1 array from a single disk on a different system

From: Lee Whalen <lwhalen_at_gmail.com>
Date: Thu, 28 Jul 2011 15:13:00 -0400
Hi there, my apologies in advance if this is the wrong mailing list for
this type of question. I have a problem with a previously-RAID1'd
FreeBSD filesystem I was hoping someone could help me with. The
background is this:

The disks originally belong to a client of a friend running an old
obsolete (as in, the company doesn't exist any more) home NAS device by
Fastera (model NAS-T2, two 200GB IDE disks in a RAID1 configuration,
unknown version of FreeBSD). The NAS gave up the ghost when the OS
(stored on a CF card) recently melted down, rendering the device
unbootable. The IDE drives seem unharmed, after sticking them in a USB
drive cage they present themselves to both Linux and FreeBSD operating
systems and both OSes can see partition tables, disklabels, etc.
Unfortunately, because of what appears to be a previously-configured
software RAID1 scheme I can't seem to simply mount the slices under *nix
or *BSD and copy the data off.

Currently one of the drives is attached via USB cradle to a freshly
installed FreeBSD 8.2 VM. I was able to get a good chunk of the data
back off of it with a tool called "photorec", which (to be brief) scans
the block device looking for file-header signatures and makes educated
guesses as to whether it's $file_type_x, $file_type_y and so forth,
copying to a separate recovery directory without the benefit of the
original file name or previous directory structure. It's cool, the guy
technically has his data back (or will, after a couple of hours of
manual sorting), but I've got enough time into this that, by $deity, I
Have To Win(™) by being able to mount the (by all accounts happy and
uncorrupted) filesystem. I was hoping this might be the proper mailing
list for insight into ccd/geom/vinum.

What I think needs to happen at some level (and please feel free to
correct me if I'm wrong) is one of two things:

1. Using CCD or one of the other utilities, I need to add this USB-caged
disk into a temporary RAID-1 array in a 'degraded' state so FreeBSD sees
the disklabels as something other than type "raid". This will allow me
to mount the preexisting partitions as normal, and copy the data off the
disk. If there's some way I can positively identify a given
partition/slice as having been created by either ccd/geom/vinum, that
would be awesome.

2. Using dd or something similar, I need to image the existing disk to a
file and strip the first N bytes that (presumably) hold the software
RAID headers. My hope is that if I get the offset right, the mount
command will pick up on the partition/slice data it needs and allow me
to mount the image via loopback, copying the data off as above.

Does anyone have any insight that could help me accomplish the above, or
a better way to approach the problem?

Here's some information about the disk itself (all commands run from the
FreeBSD 8.2 VM):
ls -l /dev/da0*
http://pastebin.com/6Sv8T4Mg

fdisk /dev/da0 output
http://pastebin.com/ZzPKUXDL

bsdlabel /dev/da0*
http://pastebin.com/3BPKbYZ6

newfs -N "dry run" data (possible superblock locations, blocksize
defaults, etc for /dev/da0s3a, the 'important' one)
http://pastebin.com/b9nLFsjK

incomplete "scan_ffs /dev/da0" run:
http://pastebin.com/28T8Fr67

I hope this helps, any assistance folks could provide would be MOST
helpful! Please don't hesitate to let me know if you need more
information, I'm happy to respond as quick as I possibly can.

Many thanks in advance,
--Lee
Received on Thu Jul 28 2011 - 17:36:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:16 UTC