[Top] [All Lists]

Re: UPDATE: low-level XFS drive recovery

To: Adam Milazzo <adam@xxxxxxxxxxxx>
Subject: Re: UPDATE: low-level XFS drive recovery
From: Nathan Straz <nstraz@xxxxxxx>
Date: Wed, 24 Apr 2002 14:49:26 -0500
Cc: "'linux-xfs@xxxxxxxxxxx'" <linux-xfs@xxxxxxxxxxx>
In-reply-to: <44D5677E9B8478468DE31AE26DF0AFD6077C92@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Mail-followup-to: Adam Milazzo <adam@xxxxxxxxxxxx>, "'linux-xfs@xxxxxxxxxxx'" <linux-xfs@xxxxxxxxxxx>
References: <44D5677E9B8478468DE31AE26DF0AFD6077C92@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mutt/1.3.28i
A few months back I repartitioned a BSD box before I realized that I
lost my backups.  The tool that helped me recover most of my data was
Python.  Why Python?

 - Interactive scripting language

      With an interactive scripting language you can write the tools
      while you use it.  I can paste functions in from an editor, try
      them out, fix the bugs in the editor and repeat.

 - the struct package

      Python has a package that takes strings and unpacks them into
      variables.  I've used it to decode everything from superblocks to
 - the mmap package
      mmap your entire disk image read-only and access it like an array.
      You can then use slices and regex on it to find where structures

If you want, I can send you my code as a starting point.  It's for
OpenBSD (4.4BSD UFS), but it should give you some ideas.

Nate Straz                                              nstraz@xxxxxxx
sgi, inc                                           http://www.sgi.com/
Linux Test Project                                  http://ltp.sf.net/

<Prev in Thread] Current Thread [Next in Thread>