linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Murphy <lists@colorremedies.com>
To: Liwei <xieliwei@gmail.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Damaged Root Tree(s)
Date: Sun, 21 Jan 2018 14:45:57 -0700	[thread overview]
Message-ID: <CAJCQCtRpGXD03BTm+yO+SQduwtEeKAonW8bHpqCaYAWz0z_XiA@mail.gmail.com> (raw)
In-Reply-To: <CAPE0SYzT42vq-pRYctKohr42yK0E+T1sWJv2KPLxp5Cv1z7yqg@mail.gmail.com>

On Sun, Jan 21, 2018 at 12:16 PM, Liwei <xieliwei@gmail.com> wrote:
> Hi list,
>
> ====TLDR====
> 1. Can I mount a filesystem using one of the roots found with btrfs-find-root?

Not necessarily because more than just the tree root needs to be
readable to do a mount.

But decent chance it's possible to do an offline scrape using one of
those root trees with btrfs restore.


>
> ====Background Information====
>     I have a 2x10TB raid0 (20TB, raid0 provided by md) volume that (my
> theory is) experienced a headcrash while updating the root tree, or
> maybe while it was carrying out background defragmentation.
>
>     This occurred while I was setting up redundancy by using LVM
> mirroring, so in the logs you'll see some dm errors. Unfortunately the
> lost data has not been mirrored yet (what are the chances, given that
> the mirror was 97% complete when this happened).
>
>     Running a scrub on the raid shows that I have 1000+ unreadable
> sectors, amounting to about 800kB of data. So I've got spare drives
> and imaged the offending drive. Currently ddrescue is still trying to
> read those sectors, but it seems unlikely that they'll ever succeed.

Bad luck. What's the metadata profile? Single or DUP?


>
>     Next I ran btrfs-find-root, which gave me the following:
> Superblock thinks the generation is 318593
> Superblock thinks the level is 1
> Well block 25826479144960(gen: 318346 level: 1) seems good, but
> generation/level doesn't match, want gen: 318593 level: 1


That there's a big gap in generation between what's wanted and what's
found, a bunch of those more recent trees must be colocated and are
probably missing.

Anyway I think it's best to look at restore, and my limited experience
it tends to be more successful when restoring from snapshots



-- 
Chris Murphy

  reply	other threads:[~2018-01-21 21:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-21 19:16 Damaged Root Tree(s) Liwei
2018-01-21 21:45 ` Chris Murphy [this message]
2018-01-22  1:11 ` Qu Wenruo
2018-01-22  1:14   ` Qu Wenruo
  -- strict thread matches above, loose matches on Subject: below --
2018-01-22  3:30 Liwei
2018-01-22  6:11 Liwei
2018-01-22  6:26 ` Qu Wenruo

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=CAJCQCtRpGXD03BTm+yO+SQduwtEeKAonW8bHpqCaYAWz0z_XiA@mail.gmail.com \
    --to=lists@colorremedies.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=xieliwei@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).