From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: Broken chunk tree - Was: Mount issue, mount /dev/sdc2: can't read superblock
Date: Sun, 30 Dec 2018 03:59:25 +0000 (UTC) [thread overview]
Message-ID: <pan$8eedd$1bbb1a94$d4e62be5$121b4321@cox.net> (raw)
In-Reply-To: 07b88bad-e1fa-7485-d410-ee261ace321c@metaliza.cz
Tomáš Metelka posted on Sun, 30 Dec 2018 01:48:23 +0100 as excerpted:
> Ok, I've got it:-(
>
> But just a few questions: I've tried (with btrfs-progs v4.19.1) to
> recover files through btrfs restore -s -m -S -v -i ... and following
> events occurred:
>
> 1) Just 1 "hard" error:
> ERROR: cannot map block logical 117058830336 length 1073741824: -2 Error
> copying data for /mnt/...
> (file which absence really doesn't pain me:-))
>
> 2) For 24 files a I got "too much loops" warning (U mean this: "if
> (loops >= 0 && loops++ >= 1024) { ..."). I've always answered yes but
> I'm afraid these files are corrupted (at least 2 of them seems
> corrupted).
>
> How much bad is this? Does the error mentioned in #1 mean that it's the
> only file which is totally lost? I can live without those 24 + 1 files
> so if #1 and #2 would be the only errors then I could say the recovery
> was successful ... but I'm afraid things aren't such easy:-)
In this context, the biggest thing to know about btrfs restore is that
because it's meant as a recovery measure and if it comes to using
restore, the assumption is that the priority is recovery of /anything/
even if the checksums don't match (a chance of recovery of possibly bad
data is considered better than rejecting possibly bad data entirely), it
doesn't worry too much about checksums (AFAIK it ignores data checksums
entirely, not sure whether it checks metadata checksums or not, but it
probably ignores failure in at least some cases if it does, because
that's the point for a tool like this).
Which means that anything recovered using btrfs recover doesn't have the
usual btrfs checksums validation guarantees, and could very possibly be
corrupt.
However, that's mitigated by the fact that most filesystems don't even
have built-in checksumming and validation in the first place, so the data
on them could go bad even in normal operation, and unless it was
obviously corrupted into not working, you'd likely never even know it, so
btrfs restore ignoring checksums simply returns the data to the state
it's /normally/ in on most filesystems, completely unverified.
But if you happen to have checksums independently stored somewhere, or
even just ordinary unvalidated backups you can compare against, and
you're worried about the possibility of undiscovered corruption due to
the restore, and/or you were using btrfs in part /because/ of its built-
in checksum verification, it could be worth doing that verification run
against your old checksum database or backups.
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
next prev parent reply other threads:[~2018-12-30 4:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-20 21:21 Mount issue, mount /dev/sdc2: can't read superblock Peter Chant
2018-12-21 22:25 ` Chris Murphy
2018-12-22 12:34 ` Peter Chant
2018-12-24 0:58 ` Chris Murphy
2018-12-24 2:00 ` Qu Wenruo
2018-12-24 11:36 ` Peter Chant
2018-12-24 11:31 ` Peter Chant
2018-12-24 12:02 ` Qu Wenruo
2018-12-24 12:48 ` Tomáš Metelka
2018-12-24 13:02 ` Qu Wenruo
2018-12-24 13:52 ` Tomáš Metelka
2018-12-24 14:19 ` Qu Wenruo
2018-12-30 0:48 ` Broken chunk tree - Was: " Tomáš Metelka
2018-12-30 3:59 ` Duncan [this message]
2018-12-30 4:38 ` Qu Wenruo
2018-12-24 23:20 ` Chris Murphy
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='pan$8eedd$1bbb1a94$d4e62be5$121b4321@cox.net' \
--to=1i5t5.duncan@cox.net \
--cc=linux-btrfs@vger.kernel.org \
/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