All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Dan Stromberg <strombrg@dcs.nac.uci.edu>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: recovering data from a corrupt ext3?
Date: Thu, 16 Dec 2004 19:50:59 +0000	[thread overview]
Message-ID: <1103226657.21806.28.camel@localhost.localdomain> (raw)
In-Reply-To: <pan.2004.12.16.18.20.43.438752@dcs.nac.uci.edu>

On Iau, 2004-12-16 at 18:20, Dan Stromberg wrote:
> 1) Is there a better tool for ext3 data recovery?

You can use e2fsdebug to poke around a bit and to follow inodes. You
might want to start lower down the stack however and check the LVM
claims to be the right size for the file system and any partition data
looks right.

> 2) If there isn't, is there a document that provides an overview of the
> ext3 on-disk filesystem structure, so that I might write a tool for doing
> the recovery?  (I wrote one once for the atari 800 floppy disk filesystem).

This is the stuff e2fsdebug essentially knows about - ext3 is ext2 with
journal so both are very similar.

> 1) What kind of alignment assumptions can I make about the various data
> structures?  EG, if I can assume that a bunch of directory entries always
> start on a 512 byte boundary, that'll speed up directory entry hunting
> considerably.

Superblocks give you all the basic layout information. The disk is split
into cylinder groups which in turn are split into inode and data zones.
Lookups are essentially

	directory entry -> inode number -> inode block

	inode block -> data (first few blocks direct, next indirected once,
then twice ..)


The superblocks will at least be disk block aligned so a good starting
point might be to find the superblocks on the disk itself without LVM in
the way. That should tell you the start/end/layout of the fs and you may
even be able to then pull those blocks into a file and loopback mount
the copy


  reply	other threads:[~2004-12-16 20:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-16 18:20 recovering data from a corrupt ext3? Dan Stromberg
2004-12-16 19:50 ` Alan Cox [this message]
2004-12-17 17:33   ` Dan Stromberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1103226657.21806.28.camel@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=strombrg@dcs.nac.uci.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.