From owner-freebsd-questions@FreeBSD.ORG Mon Jul 21 21:42:24 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6FA5106566B for ; Mon, 21 Jul 2008 21:42:24 +0000 (UTC) (envelope-from john@zog.net) Received: from taklamakan.88.net (taklamakan.88.net [80.68.94.209]) by mx1.freebsd.org (Postfix) with ESMTP id 540118FC17 for ; Mon, 21 Jul 2008 21:42:24 +0000 (UTC) (envelope-from john@zog.net) Received: from localhost (localhost [127.0.0.1]) by taklamakan.88.net (Postfix) with ESMTP id 77D8BC8012 for ; Mon, 21 Jul 2008 22:42:23 +0100 (BST) X-Virus-Scanned: Debian amavisd-new at 88.net Received: from taklamakan.88.net ([127.0.0.1]) by localhost (taklamakan.88.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KHBkHMpxDFdd for ; Mon, 21 Jul 2008 22:42:16 +0100 (BST) Received: from [192.168.1.10] (ASt-Lambert-151-1-14-188.w82-120.abo.wanadoo.fr [82.120.108.188]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by taklamakan.88.net (Postfix) with ESMTP id E01D2C800B for ; Mon, 21 Jul 2008 22:42:15 +0100 (BST) Message-Id: <4B57CEBA-2F62-4979-B4CE-D3C9727A0E85@zog.net> From: John Morgan Salomon To: freebsd-questions@freebsd.org In-Reply-To: <1CD17FFA-7CE2-4C6A-A578-BA9542E4A9AE@zog.net> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v924) Date: Mon, 21 Jul 2008 23:42:14 +0200 References: <2385.82.120.108.188.1216634229.squirrel@www.88.net> <20080721125225.956c3aa4.freebsd@edvax.de> <1CD17FFA-7CE2-4C6A-A578-BA9542E4A9AE@zog.net> X-Mailer: Apple Mail (2.924) Subject: Re: Recover Lost Superblocks? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2008 21:42:24 -0000 OK, I have a followup question to this. After some mucking around, I've managed to lose my partition again (although the data is still there, I installed testdisk and let photorec run; it looks like it's finding pretty much everything.) Running newfs -N on /dev/aacd0 finds a ton of backup superblocks. My filesystems were originally /dev/aacd0s1a, aacd0s1b and aacd0s1e. When I originally recreated the FreeBSD partition with the same geometry under my new rescue HDD, it added a device entry "aacd0s1c" but not any of the others. Running fsck_ufs -b doesn't seem to do much of anything. I'd be grateful if someone could help me with the following questions: 1) when I run the above command, is it supposed to replace a filesystem's superblock with the backup superblock? 2) is there a way to look at the contents of the backup superblocks that newfs -N found? 3) is there a way to re-create aacd0s1a, aacd0s1b and aacd0s1e? The rescue OS seems to only want to bother with aacd0s1c, which was not used by any of the partitions previously. Thanks for any help, -John On Jul 21, 2008, at 1:04 PM, John Morgan Salomon wrote: > Wow, a sympathetic ear, was expecting far more scorn than that :-) > > I am currently running TestDisk, which at least _appears_ to be > finding something filesystem-like (at least it's listed a few > "empty" "somethings" that look somehow reasonable, size-wise.) > Cross your fingers. Gpart and TestDisk are entirely passive, i.e. > don't touch data on the disks. > > My plan, if this works out, is to buy a secondary backup consisting > of a RAID 1+0 NAS. I don't have anything big enough to back up > everything to. > > I tried pretty much everything with fsck_ufs. Like I said, though, > I am able to mount the entire partition from the bootable IDE > drive. I see /, /etc/, /dev/ and all that, but since the "rescue" > OS can't see any additional superblocks, it has no devices for the > other filesystems. I am not sufficiently well versed in UFS to > understand how an entire partition can be mounted as a filesystem if > that partition originally had multiple filesystems on it. I'm a bit > wary of playing more with fsck until all else has failed. :-) > > What also weirds me out is that FreeBSD constantly bitches about the > partition being larger than the physical disk (which it decidedly > isn't.) I've tried setting geometry in fdisk any which way > (including using the RAID controller's provided values), and as I > said, the thing mounts the root partition of the array just fine. > I'm considering an exorcist. > > Best, > > -John > > > On Jul 21, 2008, at 12:52 PM, Polytropon wrote: > >> Hi! >> >> On Mon, 21 Jul 2008 11:57:09 +0200 (CEST), "John Morgan Salomon" > > wrote: >>> Before you ask, this was the backup server. My primary box had >>> decided to >>> die shortly before. I had no backup backup server. Murphy strikes. >> >> I completely do understand you, I'm suffering from a similar problem >> at the moment, but much worse than yours... >> >> Buy tape drives! Buy tape drives! Buy tape drives! :-) >> >> >>> Can someone recommend a way to manually scan the entire partition >>> (either >>> aacd0, aacd0s1 or aacd0s1c) for formerly present filesystems? I >>> am 99% >>> sure that all the data is still present, and if I reinstall the >>> superblocks I'll be able to boot the array, mount the filesystems >>> and get >>> the data off before I continue. I don't know whether I've missed >>> any >>> gpart options (I have the impression it only scans for lost >>> partitions, >>> not ufs filesystem signatures.) >> >> As far as I know - NB that I'm just starting to learn more about UFS, >> shame on me that I'll do this just as every piece of data is gone - >> there are more than one superblock present. According to "man >> fsck_ufs", >> this could be a starting point: >> >> -b Use the block specified immediately after the flag as >> the super >> block for the file system. An alternate super block is >> usually >> located at block 32 for UFS1, and block 160 for UFS2. >> >> This applies if just the first superblock is gone. >> >> Before you start experimenting, maybe it's a good idea to dd the >> data out of the disks and run fsck on the images? I'm not sure... >> >> >>> Any help, tips or pointers would be tremendously appreciated. >> >> Hope you're lucky. >> >> >> >> >> >> >> -- >> Polytropon >>> From Magdeburg, Germany >> Happy FreeBSD user since 4.0 >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org >> " > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org > "