From: Chris Mason <chris.mason@oracle.com>
To: Michael Niederle <mniederle@gmx.at>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: A rescue tool for btrfs
Date: Thu, 16 Dec 2010 19:39:42 -0500 [thread overview]
Message-ID: <1292546177-sup-2921@think> (raw)
In-Reply-To: <20101217001849.1b5f4c28@simplux>
Excerpts from Michael Niederle's message of 2010-12-16 18:18:49 -0500:
> Hi!
>
> Last week I crashed a btrfs file system. I didn't lose a lot of data because I
> had current backups of most data and a full backup from a month ago.
>
> But I thought it would be a nice idea to have a rescue tool! Currently I have a
> first release of this tool (surely buggy and runnning on little endian
> architectures only).
>
> The tool is written in C using the header files from the btrfs userland tools.
> I use a wrapper (written in a script language) to restore whole directories.
> Such a wrapper could also detect hard links and handle them correctly.
>
> btrfs_rescue implements all disk accesses itself and tries to access only the
> absolute minimum of necessary data structures to avoid the pitfalls that lurk
> somewhere in the destroyed file system. So you can rescue parts of a destroyed
> file system even if the file system driver cannot mount it anymore.
>
> The source code is available under
>
> http://simplux.org/downloads/btrfs_rescue.c
A very good idea, its the same direction I'm going with the btrfsck code
right now. The basic idea is that it is much more reliable (and faster
to implement) to pull data off the disk than it is to try and fix it in
place. I'm growing some in place fixes as well for the really common
errors (especially power crashes w/o barriers)
If you're interested in doing more on this, I'll have my code up
shortly.
-chris
next prev parent reply other threads:[~2010-12-17 0:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-16 23:18 A rescue tool for btrfs Michael Niederle
2010-12-17 0:39 ` Chris Mason [this message]
2010-12-20 12:18 ` Bryan Østergaard
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=1292546177-sup-2921@think \
--to=chris.mason@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=mniederle@gmx.at \
/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.