Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Konstantin Svist <fry.kun@gmail.com>
To: Chris Murphy <lists@colorremedies.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Restoring a file from damaged btrfs raid1 shard
Date: Sat, 24 Apr 2021 23:42:29 -0700	[thread overview]
Message-ID: <351b947f-0d7d-9c2e-e629-277da4d4efa4@gmail.com> (raw)
In-Reply-To: <CAJCQCtT6iNwN20uHjv4FPs--6_j34XpmD=6M+_Jkt7AiBcvMag@mail.gmail.com>

On 4/24/21 12:46, Chris Murphy wrote:
> On Wed, Apr 21, 2021 at 9:24 PM Konstantin Svist <fry.kun@gmail.com> wrote:
>
>> Superblock thinks the generation is 5857883
>> Superblock thinks the level is 1
>> Found tree root at 4883439714304 gen 5857883 level 1
>> Well block 4883437158400(gen: 5857882 level: 1) seems good, but
>> generation/level doesn't match, want gen: 5857883 level: 1
>> Well block 4883434635264(gen: 5857881 level: 1) seems good, but
>> generation/level doesn't match, want gen: 5857883 level: 1
>> Well block 4883426295808(gen: 5857880 level: 1) seems good, but
>> generation/level doesn't match, want gen: 5857883 level: 1
>> Well block 4883417972736(gen: 5857879 level: 1) seems good, but
>> generation/level doesn't match, want gen: 5857883 level: 1
>> Well block 4883409846272(gen: 5857878 level: 1) seems good, but
>> generation/level doesn't match, want gen: 5857883 level: 1
>> Well block 4883352633344(gen: 5857877 level: 1) seems good, but
>> generation/level doesn't match, want gen: 5857883 level: 1
>> ...
> You can try plugging these larger block values in, starting at the top
> (most recent) into 'btrfs restore -iv -D -t $BLOCKNUM' and see if
> it'll work.

# btrfs restore -iv -D -t 4883437158400 /dev/sdb3 -l
warning, device 3 is missing
warning, device 3 is missing
parent transid verify failed on 4883437158400 wanted 5857883 found 5857882
parent transid verify failed on 4883437158400 wanted 5857883 found 5857882
Ignoring transid failure
bad tree block 5246265278464, bytenr mismatch, want=5246265278464, have=0
Could not open root, trying backup super
warning, device 3 is missing
warning, device 3 is missing
parent transid verify failed on 4883437158400 wanted 5857883 found 5857882
parent transid verify failed on 4883437158400 wanted 5857883 found 5857882
Ignoring transid failure
bad tree block 5246265278464, bytenr mismatch, want=5246265278464, have=0
Could not open root, trying backup super
warning, device 3 is missing
warning, device 3 is missing
parent transid verify failed on 4883437158400 wanted 5857883 found 5857882
parent transid verify failed on 4883437158400 wanted 5857883 found 5857882
Ignoring transid failure
bad tree block 5246265278464, bytenr mismatch, want=5246265278464, have=0
Could not open root, trying backup super

From my very limited understanding, the older generation info should be
on the disk, even if the newer one is mangled somehow.

But also looks like this is not happening..?




      reply	other threads:[~2021-04-25  6:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-22  3:24 Restoring a file from damaged btrfs raid1 shard Konstantin Svist
2021-04-24 19:46 ` Chris Murphy
2021-04-25  6:42   ` Konstantin Svist [this message]

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=351b947f-0d7d-9c2e-e629-277da4d4efa4@gmail.com \
    --to=fry.kun@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.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