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

2011-07-29 Thread Ian FREISLICH
Alban Hertroys wrote:
> On 28 Jul 2011, at 21:13, Lee Whalen wrote:
> 
> I'm no expert, but I'll add my insights regardless ;)
> 
> > 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
>
> As far as I know, CCD (concatenated disk) can not do mirroring, so
> your RAID-1 disk won't be created using CCD.

If it's a ccd, just configure a 1 disk mirror using ccdconfig.  See
ccdconfig(8) for more info.

But it sounds like this may be some proprietry RAID format used by
the controller in the NAS device.  Often the controller doesn't
actually do the RAID, so the OP might have some success using
ataraid(4) to attach the disks.

Ian

-- 
Ian Freislich
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


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

2011-07-29 Thread Alban Hertroys
On 28 Jul 2011, at 21:13, Lee Whalen wrote:

I'm no expert, but I'll add my insights regardless ;)

> 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

As far as I know, CCD (concatenated disk) can not do mirroring, so your RAID-1 
disk won't be created using CCD.

> 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.

According to the man page, descriptions of the various fs_type's are in 
/usr/include/sys/disklabel.h, and indeed:

...
#define FS_RAID 15  /* RAIDFrame drive */
...
static const char *fstypenames[] = {
...
"raid",
...
};

So, apparently your disk contains a "RAIDFrame drive". I never heard of that 
before, but apparently it's something that's part of NetBSD: 
http://www.netbsd.org/docs/guide/en/chap-rf.html

So my guess is that the NAS device contained NetBSD instead of FreeBSD.


Alban Hertroys

--
The scale of a problem often equals the size of an ego.



!DSPAM:909,4e32752b12094789815349!


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


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

2011-07-28 Thread Lee Whalen
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

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"