From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 19 23:16:00 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 349A716A4CE for ; Mon, 19 Jul 2004 23:16:00 +0000 (GMT) Received: from angryfist.fasttrackmonkey.com (angryfist.fasttrackmonkey.com [216.223.196.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD9CF43D48 for ; Mon, 19 Jul 2004 23:15:59 +0000 (GMT) (envelope-from spork@fasttrackmonkey.com) Received: (qmail 21058 invoked by uid 2003); 19 Jul 2004 23:14:41 -0000 Received: from spork@fasttrackmonkey.com by angryfist.fasttrackmonkey.com by uid 1001 with qmail-scanner-1.20 (clamscan: 0.65. Clear:RC:1(216.220.116.154):. Processed in 0.046499 secs); 19 Jul 2004 23:14:41 -0000 Received: from unknown (HELO toad.nat.fasttrackmonkey.com) (216.220.116.154) by 0 with (DHE-RSA-AES256-SHA encrypted) SMTP; 19 Jul 2004 23:14:41 -0000 Date: Mon, 19 Jul 2004 19:14:39 -0400 (EDT) From: Charles Sprickman X-X-Sender: spork@toad.nat.fasttrackmonkey.com To: freebsd-hackers@freebsd.org Message-ID: <20040719191408.V28049@toad.nat.fasttrackmonkey.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: disk recovery help X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2004 23:16:00 -0000 Hi, I'm sorry for hitting this list, but I'm trying to target people with some good old-fashioned recovery procedures in their toolboxes, and people that have a better understanding of UFS than I do. I'll try to keep this brief. We are looking for either some "here you go" help, or if there's someone who's really a whiz at this, paid help... The story, in brief, and what we're looking for: We have a mail server that had it's RAID array trashed by a typo. No backups (perhaps this will make the budget for that appear). There are four disks running in RAID 1+0 on an Adaptec 2110s. While replacing a failed drive I screwed the pooch with a typo. I meant "raidutil -a rebuild" but I typed "raidutil -a build". That command ran for about 45 seconds before I realized what had happened and cut power to the box. fsck was able to fix / with no problems, and most other partitions. We reinstalled the base OS and rebuilt all our local additions (ports + vpopmail/qmail/courier-imap-pop) in case there was any corrupted gunk left on the drive. However the partition holding all the mail (in Maildir format, working with vpopmail/qmail) seemed quite screwed. We let fsck try for about 12 hours and had to cancel out of it. While working on other things, I dd'd off this partition via ssh to another machine (ssh borked.box dd if=/dev/da1s1h bs=1024 > dd.img) hoping that we could do something with it later. Once that was done, we newfs'd that partition and let vpopmail recreate mailboxes as mail came in. So we're done on that front, but missing all old mail. I now have the disk image on a spare box. It's 26GB (about 20GB of actual data). My initial plan is just to see what happens if I mount it read-only, and then try to fsck without any time pressure and see what we've got left. Since I wasn't able to figure out how to dd this back to a pre-partitioned drive, I was going to try vnconfig to attach the dd image to vn0, then mount and fsck that. Should that work? I have little faith that all this will work though... If anyone has some tips/pointers/prayers, let me know. Again, we can probably dig up some cash if someone with experience in this would like to help. I'm still waiting for some info from Adaptec to see exactly what the "build" option does, and where it starts from and how far it might have got in that period of time. Oddly, the last tech that called for more info said he was going to ask DriveSavers (as they know that stuff???). Please email me directly with any other questions. I wanted to keep this as brief as possible since it's fairly OT. Thanks, Charles