From: Foo Bar <marcoep@gmail.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: btrfs check: backref lost, mismatch with its hash -- can't repair
Date: Tue, 30 Jan 2018 21:14:50 +0100 [thread overview]
Message-ID: <a74b27a0-11db-627f-a4b2-7d74cf0b3930@gmail.com> (raw)
In-Reply-To: <47ee25a7-f0fd-e342-fc99-7bd0fd91af48@gmx.com>
[-- Attachment #1.1: Type: text/plain, Size: 3337 bytes --]
Finally restored by merging the last snapshot with what btrfs restore gave me
-- surprisingly almost the whole bunch of it :-)
Thanks for helping!
Cheers,
Marco
Qu Wenruo wrote on 2018-01-30 02:24:
>
>
> On 2018年01月30日 02:16, ^m'e wrote:
>> Thanks!
>>
>> Got these
>>
>> # ./btrfs.static inspect dump-super -fFa /dev/sdb3 |grep
>> backup_tree_root: | sort -u
>> backup_tree_root: 180410073088 gen: 463765 level: 1
>> backup_tree_root: 180415758336 gen: 463766 level: 1
>> backup_tree_root: 180416364544 gen: 463767 level: 1
>> backup_tree_root: 4194304 gen: 463764 level: 1
>>
>> but, nada: all have transid failures...
>
> That's why I call it "small chance"
>
>>
>> The backup snapshots are OK as per original check.
>
> Then you should be OK to restore.
>
> Thanks,
> Qu
>
>>
>>
>> On Mon, Jan 29, 2018 at 3:09 PM, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>>
>>>
>>> On 2018年01月29日 22:49, ^m'e wrote:
>>>> On Mon, Jan 29, 2018 at 2:04 PM, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>>>>>
>>>>>
>>>>> On 2018年01月29日 21:58, ^m'e wrote:
>>>>>> Thanks for the advice, Qu!
>>>>>>
>>>>>> I used the system for a while, did some package upgrades -- writing in
>>>>>> the suspect corrupted area. Then tried a btrfs-send to my backup vol,
>>>>>> and it failed miserably with a nice kernel oops.
>>>>>>
>>>>>> So I went for a lowmem repair:
>>>>>> ----------------------------------------------------------------------------------------
>>>>>> # ./btrfsck.static check --repair --mode=lowmem /dev/sdb3 2>&1 | tee
>>>>>> /mnt/custom/rescue/btrfs-recovery/btrfs-repair.BTR-POOL.1.log
>>>>>> WARNING: low-memory mode repair support is only partial
>>>>>> Fixed 0 roots.
>>>>>> checking extents
>>>>>> checking free space cache
>>>>>> checking fs roots
>>>>>> ERROR: failed to add inode 28891726 as orphan item root 257
>>>>>> ERROR: root 257 INODE[28891726] is orphan item
>>>>>
>>>>> At least I need dig the kernel code further to determine if the orphan
>>>>> inode handling in btrfs-progs is correct or not.
>>>>>
>>>>> So there won't be more dirty fix soon.
>>>>>
>>>>> Hopefully you could get some good backup and restore the system.
>>>>>
>>>>> At least the problem is limited to a very small range, and it's
>>>>> something we could handle easily.
>>>>>
>>>>> Thanks for all your report,
>>>>> Qu
>>>>>
>>>>>
>>>>
>>>> Right.
>>>>
>>>> Meanwhile, could you please suggest the best course of action? btrfs
>>>> rescue or restore?
>>>> I have snapshots of my two subvols (rootfs, home -- now fs-checking
>>>> them just in case...)
>>>
>>> Don't run --repair any more.
>>> It seems to make the case worse.
>>>
>>> While the RW mount with orphan cleanup abort seems to screwed up the
>>> filesystem.
>>>
>>> In this case, it's pretty hard to recover, but still has small chance.
>>>
>>> Use btrfs inspec dump-super to get backup roots:
>>>
>>> # btrfs inspect dump-super -fFa <device> |grep backup_tree_root: | sort
>>> | uniq
>>>
>>> And try all the 4 numbers in the following commands:
>>>
>>> # btrfs check --tree-root <number> <device>
>>>
>>> To see if is there any good one without transid error.
>>>
>>> Thanks,
>>> Qu
>>>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2018-01-30 20:14 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-22 14:11 btrfs check: backref lost, mismatch with its hash -- can't repair ^m'e
2018-01-22 14:38 ` Qu Wenruo
2018-01-22 15:04 ` ^m'e
2018-01-24 8:49 ` Qu Wenruo
2018-01-24 9:18 ` Foo Bar
2018-01-24 10:14 ` Qu Wenruo
2018-01-24 11:57 ` ^m'e
2018-01-24 12:39 ` Qu Wenruo
2018-01-24 14:47 ` ^m'e
2018-01-24 19:00 ` ^m'e
2018-01-24 20:41 ` ^m'e
2018-01-25 0:59 ` Qu Wenruo
2018-01-25 11:54 ` ^m'e
2018-01-25 12:09 ` Qu Wenruo
2018-01-25 12:29 ` ^m'e
2018-01-25 12:37 ` Qu Wenruo
2018-01-25 16:40 ` ^m'e
2018-01-25 23:30 ` Qu Wenruo
2018-01-26 11:19 ` ^m'e
2018-01-26 12:16 ` Qu Wenruo
2018-01-26 15:15 ` ^m'e
2018-01-29 1:34 ` Qu Wenruo
2018-01-29 13:58 ` ^m'e
2018-01-29 14:04 ` Qu Wenruo
2018-01-29 14:49 ` ^m'e
2018-01-29 15:08 ` ^m'e
2018-01-29 15:10 ` Qu Wenruo
2018-01-29 15:09 ` Qu Wenruo
2018-01-29 18:16 ` ^m'e
2018-01-30 1:24 ` Qu Wenruo
2018-01-30 20:14 ` Foo Bar [this message]
2018-01-25 0:59 ` 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=a74b27a0-11db-627f-a4b2-7d74cf0b3930@gmail.com \
--to=marcoep@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.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).