Recover Lost Superblocks?
John Morgan Salomon
john at zog.net
Mon Jul 21 21:42:24 UTC 2008
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 <any of the listed backup superblocks> 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" <john at zog.net
>> > 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 at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org
>> "
>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org
> "
More information about the freebsd-questions
mailing list