From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: Abe <ml-btrfs@zeroloop.net>, <linux-btrfs@vger.kernel.org>
Subject: Re: Broken RAID6, segfault on chunk-recover
Date: Fri, 8 Jan 2016 09:42:21 +0800 [thread overview]
Message-ID: <568F13FD.90605@cn.fujitsu.com> (raw)
In-Reply-To: <568E94CA.4070907@zeroloop.net>
Abe wrote on 2016/01/07 17:39 +0100:
> No wonder why chunck-recover crashed, superblocks are valid but they all
> contain a bogus chunk_root, it exceeds the total_bytes !
> So all I need it to find where that btree root is on disk, right?
>
> Problem is almost every tool from btrfs-progs is unusuable because they
> try to read the chunck root at first. Do you know of any alternative
> tool that could scan devices and find where roots might be?
First, you're wrong about the total_bytes and chunk_root bytenr.
Chunk_root bytenr is btrfs *logical* bytenr.
It is completely OK for logical bytenr to beyond total bytenr,
So the problem is not here.
The real problem for chunk recovery to segfault, would be that, in your
cmds-check.c:5013, the leaf->data could be empty.
But you did give enough info or checked *leaf, so I can't determine now.
To recovery your RAID6, the possible chance lies in your superblock.
Please use run btrfs-show-super with -f -a to get full backup roots output.
Which may have a good old chunk root.
Thanks,
Qu
>
>
> All superblock copies for all devices look like this :
>
> # ./btrfs-show-super /dev/sdb1
> superblock: bytenr=65536, device=/dev/sdb1
> ---------------------------------------------------------
> csum 0x938855ef [match]
> bytenr 65536
> flags 0x1
> ( WRITTEN )
> magic _BHRfS_M [match]
> fsid bec7b9a0-c56c-494e-8631-072d3f89c0c9
> label hive
> generation 34245
> root 6766859681792
> sys_array_size 321
> chunk_root_generation 32751
> root_level 1
> chunk_root 4415566151680 <--- Impossible Offset
> chunk_root_level 1
> log_root 0
> log_root_transid 0
> log_root_level 0
> total_bytes 4096872997376 <---
> bytes_used 2438972817408
> sectorsize 4096
> nodesize 16384
> leafsize 16384
> stripesize 4096
> root_dir 6
> num_devices 8
> compat_flags 0x0
> compat_ro_flags 0x0
> incompat_flags 0x1e1
> ( MIXED_BACKREF |
> BIG_METADATA |
> EXTENDED_IREF |
> RAID56 |
> SKINNY_METADATA )
> csum_type 0
> csum_size 4
> cache_generation 34245
> uuid_tree_generation 34245
> dev_item.uuid ea4a089b-c88c-4a6c-80e5-b2c93f0613f5
> dev_item.fsid bec7b9a0-c56c-494e-8631-072d3f89c0c9 [match]
> dev_item.type 0
> dev_item.total_bytes 512109125120
> dev_item.bytes_used 349754621952
> dev_item.io_align 4096
> dev_item.io_width 4096
> dev_item.sector_size 4096
> dev_item.devid 5
> dev_item.dev_group 0
> dev_item.seek_speed 0
> dev_item.bandwidth 0
> dev_item.generation 0
>
>
> Best regards,
> --
> 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
>
>
prev parent reply other threads:[~2016-01-08 1:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-04 13:32 Broken RAID6, segfault on chunk-recover Abe
2016-01-06 22:51 ` Abe
2016-01-07 16:39 ` Abe
2016-01-08 1:42 ` Qu Wenruo [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=568F13FD.90605@cn.fujitsu.com \
--to=quwenruo@cn.fujitsu.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=ml-btrfs@zeroloop.net \
/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.