Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Mar 2011 15:27:09 +0100
From:      Anders Andersson <pipatron@gmail.com>
To:        freebsd-fs@freebsd.org
Subject:   Re: Recover a ufs2 filesystem from a reformat with another ufs2 filesystem
Message-ID:  <AANLkTimBjjCjvtwh08NOEHBEppO0QP8nHbMBLzKE_Hap@mail.gmail.com>
In-Reply-To: <ij9td4$8dh$1@dough.gmane.org>
References:  <AANLkTikSTgcsVnjRuF2Un4oBXfYaYy0r_o%2BgKzcRmkrX@mail.gmail.com> <ij9td4$8dh$1@dough.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Dear list! I realized that I never replied with a follow-up to this
problem I had, and even though a long time have passed I want to
explain what I did so that others in a similar situation can read
about it.


On Mon, Feb 14, 2011 at 1:35 AM, Ivan Voras <ivoras@freebsd.org> wrote:
> On 13/02/2011 21:39, Anders Andersson wrote:
>
>> 1) If an old file system is overwritten by a new file system with the
>> same size, are there any traces of the old file system meta data left?
>> I'm thinking randomized backup headers scattered throughout the file
>> system, which would have a different location after each new format.
>
> No, not randomized at all, unfortunately for your purpose - there are copies
> of superblocks, but all important data is on precisely deterministic
> positions for somewhat the same reasons - to help recovery in case parts of
> it are missing.

Perhaps it would be beneficial if some of this information was spread
out at random for recover purpose, although I don't know what bad side
effects this would create.



>> 4) If everything else fails, can you recommend a good overview about
>> UFS2, how and where the bits and pieces are stored on disk?
>
> That would be a very complicated but also very interesting way to learn in
> extreme details about a file system :)

The more you learn, the better. :) I never went to this length though.
I ended up just using photorec/magicrescue on the block device to find
at least some photos and documents.



> In any case, as others said, DO NOT WORK ON THE "LIVE" HARD DRIVE. Make a
> copy image of it.

Naturally. Though I had to do some extra trickery here since I didn't
have 2TB spare to take a full backup. What I did was to use the device
mapper subsystem in linux to create writable snapshots over the
read-only master. Having multiple writable snapshots is handy when
comparing things.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimBjjCjvtwh08NOEHBEppO0QP8nHbMBLzKE_Hap>