From: Chris Mason <chris.mason@oracle.com>
To: Timo Nentwig <btrfs@nentwig.biz>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: can't read superblock (but could mount)
Date: Tue, 14 Feb 2012 13:41:31 -0500 [thread overview]
Message-ID: <20120214184131.GZ1573@shiny> (raw)
In-Reply-To: <alpine.LNX.2.00.1202141832420.11051@localhost>
On Tue, Feb 14, 2012 at 06:37:16PM +0100, Timo Nentwig wrote:
> On Mon, 13 Feb 2012, Chris Mason wrote:
>
> >btrfs-debug-tree -b 9872289792 /dev/xxx
>
> # btrfs-debug-tree -b 9872289792 /dev/loop1
> leaf 9872289792 items 51 free space 0 generation 120351 owner 5
Ok, so this block is full of directory items, definitely not crucial to
mounting.
>
> # btrfsck /dev/loop1
> Extent back ref already exists for 9872289792 parent 0 root 5
> leaf parent key incorrect 9872289792
> bad block 9872289792
The block is also corrupted, as in the keys in the block aren't what we
expect.
> ref mismatch on [9872289792 4096] extent item 1, found 2
> Incorrect global backref count on 9872289792 found 1 wanted 2
> backpointer mismatch on [9872289792 4096]
> owner ref check failed [9872289792 4096]
> ref mismatch on [9889067008 4096] extent item 1, found 0
> Backref 9889067008 root 5 not referenced
> Incorrect global backref count on 9889067008 found 1 wanted 0
> backpointer mismatch on [9889067008 4096]
> owner ref check failed [9889067008 4096]
> ref mismatch on [37163102208 65536] extent item 1, found 0
> Incorrect local backref count on 37163102208 root 5 owner 3360937
> offset 0 found 0 wanted 1
> backpointer mismatch on [37163102208 65536]
> owner ref check failed [37163102208 65536]
> ref mismatch on [37163814912 36864] extent item 0, found 1
> Backref 37163814912 root 5 owner 3360939 offset 0 num_refs 0 not
> found in extent tree
> Incorrect local backref count on 37163814912 root 5 owner 3360939
> offset 0 found 1 wanted 0
> backpointer mismatch on [37163814912 36864]
And then we have a few other blocks with incorrect reference counts.
> found 15491117056 bytes used err is 1
> total csum bytes: 14764500
> total tree bytes: 366956544
> total fs tree bytes: 317714432
> btree space waste bytes: 90628933
> file data blocks allocated: 16182484992
> referenced 17813028864
> Btrfs Btrfs v0.19
>
> # mount /dev/loop1 /tmp/b
> mount: block device /dev/loop1 is write-protected, mounting read-only
>
> # ls /tmp/b
> bin boot dev etc home lib lib64 media mnt opt proc root
> run sbin srv sys tmp usr var vm
>
> # echo "hooray!"
>
> Please explain :)
I didn't do it ;) All the commands I asked you to run were readonly.
The block is still corrupted. You've switched from /dev/sda to
/dev/loop0, and loop0 is readonly. So the readonly mount may be
stopping us from going into that bad branch of your tree (orphan cleanup
perhaps).
Regardless, the corrupt block isn't crucial, you should easily be able to
copy things off.
As for how we got here, I think you said you were originally running
something older than 3.2 when these problems started, correct?
-chris
next prev parent reply other threads:[~2012-02-14 18:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-10 19:30 can't read superblock (but could mount) btrfs
2012-02-10 22:18 ` Chris Mason
2012-02-10 23:39 ` Chris Mason
2012-02-11 6:27 ` btrfs
2012-02-13 13:09 ` Chris Mason
2012-02-14 17:37 ` Timo Nentwig
2012-02-14 18:41 ` Chris Mason [this message]
2012-02-14 18:54 ` Timo Nentwig
2012-02-14 21:14 ` Chris Mason
2012-02-15 6:03 ` Timo Nentwig
2012-02-15 13:23 ` Chris Mason
2012-02-16 17:04 ` Timo Nentwig
2012-02-16 18:14 ` Chris Mason
2012-02-17 3:35 ` Timo Nentwig
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=20120214184131.GZ1573@shiny \
--to=chris.mason@oracle.com \
--cc=btrfs@nentwig.biz \
--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;
as well as URLs for NNTP newsgroup(s).