All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Daniel Underwood <daniel.underwood13@gmail.com>
Cc: Chris Murphy <lists@colorremedies.com>,
	Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Bad superblock when mounting rw, ro mount works
Date: Sat, 23 Jun 2018 08:02:07 +0800	[thread overview]
Message-ID: <d0978796-0000-6060-761e-706ffe127e8b@gmx.com> (raw)
In-Reply-To: <CAHac6Av1L-LWKHat3aePEGBZ0LTW9yb2U+9rdezc774a8fiEhg@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 4341 bytes --]



On 2018年06月23日 05:20, Daniel Underwood wrote:
> Thanks for the help, I started `check --repair --init-extent-tree`
> right around a week ago as a last effort before restoring from backup.
> Unfortunately, that command is still running. It does seem to be using
> about half of the system's RAM (8 of 16GB) and 100% load on a single
> core. Is this type of run time expected for an 8TB drive?

It depends.
Since it will iterate the whole disk serval times, it takes a long time,
especially if you have a lot of used space of that 8T drive.

To determine if it's doing dead loop, we need to verify the output is
not duplicating itself.

> The byte
> numbers it's referencing seem to be a bit odd to me as they're larger
> than the number of bytes on the drive.

Completely valid.
As btrfs is using logical address, it's completely valid that logical
bytenr is larger than your device if you have balanced the device
several times before.

> Here's the head and tail of the
> current run (separated by -----) if that's indicative of progress:
> 
> btrfs unable to find ref byte nr 49673574858752 parent 0 root 1  owner
> 2 offset 0
> btrfs unable to find ref byte nr 49673719529472 parent 0 root 1  owner
> 1 offset 1
> btrfs unable to find ref byte nr 62243448012800 parent 0 root 1  owner
> 0 offset 1
> btrfs unable to find ref byte nr 49673575120896 parent 0 root 1  owner
> 1 offset 1
> btrfs unable to find ref byte nr 49673575251968 parent 0 root 1  owner
> 0 offset 1
> checking extents
> ref mismatch on [49218307751936 67108864] extent item 0, found 1
> data backref 49218307751936 root 5 owner 1359193 offset 536870912
> num_refs 0 not found in extent tree
> incorrect local backref count on 49218307751936 root 5 owner 1359193
> offset 536870912 found 1 wanted 0 back 0x5583559bd790
> backpointer mismatch on [49218307751936 67108864]
> -----------------
> data backref 49230998138880 root 5 owner 1409678 offset 7408779264
> num_refs 0 not found in extent tree
> incorrect local backref count on 49230998138880 root 5 owner 1409678
> offset 7408779264 found 1 wanted 0 back 0x5583b95f0e20
> backpointer mismatch on [49230998138880 16384]
> adding new data backref on 49230998138880 root 5 owner 1409678 offset
> 7408779264 found 1
> Repaired extent references for 49230998138880
> ref mismatch on [49230998155264 16384] extent item 0, found 1
> data backref 49230998155264 root 5 owner 669291 offset 3905650688
> num_refs 0 not found in extent tree
> incorrect local backref count on 49230998155264 root 5 owner 669291
> offset 3905650688 found 1 wanted 0 back 0x5582efb12930
> backpointer mismatch on [49230998155264 16384]
> adding new data backref on 49230998155264 root 5 owner 669291 offset
> 3905650688 found 1

Looks it's processing.
But it's better to keep all the output and verify the same section of
bytenr doesn't re-appear too many times.

> 
> Thanks,
> Daniel
> 
> 
> On Thu, Jun 14, 2018 at 10:43 AM, Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>> From the output, specially the lowmem mode output since original mode
>> handles extent tree corruption poorly and aborted, it's your extent tree
>> corrupted and causing the bug.
>>
>> Thus, you should be able to mount the fs RO and copy all the data back
>> without much hassle.
>> Just need to pay attention for csum error.
>>
>> And considering how many extent tree corruption, I don't think it's a
>> good idea to manually fix the fs.
>>
>> The last chance is, to try --repair --init-extent-tree as your last
>> chance, if you still want to salvage the filesystem.
>> The lowmem mode shows no extra bug, thus it's possible for
>> --init-extent-tree to re-init extent tree and save the day.
>>
>> But personally speaking I'm not fully confident of the operation, thus
>> it may fail and you may need to use the backup.
>>
>> BTW, even --init-extent-tree succeeded, you may still need to run btrfs
>> check again to check if all the bugs are fixed.
>> But at least from the lowmem output, the remaining errors are all fixable.
>>
>> Thanks,
>> Qu
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-06-23  0:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-07 17:07 Bad superblock when mounting rw, ro mount works Daniel Underwood
2018-06-07 20:38 ` Chris Murphy
2018-06-07 20:50   ` Chris Murphy
2018-06-14 14:23     ` Daniel Underwood
2018-06-14 14:43       ` Qu Wenruo
2018-06-22 21:20         ` Daniel Underwood
2018-06-23  0:02           ` Qu Wenruo [this message]
2018-06-08  3:39 ` 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=d0978796-0000-6060-761e-706ffe127e8b@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=daniel.underwood13@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 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.