From owner-freebsd-current@FreeBSD.ORG Thu Jul 28 19:36:37 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1297E106570F for ; Thu, 28 Jul 2011 19:36:37 +0000 (UTC) (envelope-from lwhalen@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id C1A568FC1D for ; Thu, 28 Jul 2011 19:36:36 +0000 (UTC) Received: by vxg33 with SMTP id 33so3046604vxg.13 for ; Thu, 28 Jul 2011 12:36:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:disposition-notification-to:date:from:user-agent :mime-version:to:subject:content-type:content-transfer-encoding; bh=VTmoiJuIo/uix4XA1X3R6x8MumkjCa+s9Ff4qSWppyQ=; b=I/jVvjkygxiYXZm4767YbqaJp4zorG+ArrObZJn7MZuCbjcpAKVW/NGkmgrrW7K268 p4muiVKCSWn62yKJ6QOxymk4zCBRyJ9cWLR2SSQNBBjehAs/pQTqA1IqARc60xS4ZjgV FXSHr2Lc51i4vimelY5cdVfewUvlmQ70VVzfo= Received: by 10.220.117.143 with SMTP id r15mr114851vcq.113.1311880381919; Thu, 28 Jul 2011 12:13:01 -0700 (PDT) Received: from lwhalen-mbpro.local (bastion-ext.sermo.com [38.104.7.126]) by mx.google.com with ESMTPS id o3sm434698vca.26.2011.07.28.12.13.00 (version=SSLv3 cipher=OTHER); Thu, 28 Jul 2011 12:13:01 -0700 (PDT) Message-ID: <4E31B4BC.5060604@gmail.com> Date: Thu, 28 Jul 2011 15:13:00 -0400 From: Lee Whalen User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: freebsd-current@freebsd.org Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: recovering data from a RAID1 array from a single disk on a different system X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2011 19:36:37 -0000 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