At 10/31/2016 01:47 PM, Marc MERLIN wrote:
On Mon, Oct 31, 2016 at 01:27:56PM +0800, Qu Wenruo wrote:
Would you please dump the following bytes?
That's the chunk root tree block on your disk.

offset: 13500329066496 length: 16384
offset: 13500330213376 length: 16384

Sorry for asking, am I doing this wrong?
myth:~# dd if=/dev/mapper/crypt_bcache0 of=/tmp/dump1 bs=512 count=32
skip=26367830208
dd: reading `/dev/mapper/crypt_bcache0': Invalid argument
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.000401393 s, 0.0 kB/s

So, the underlying MD RAID5 are complaining about some wrong data, and refuse to read out.

It seems that btrfs-progs can't handle read failure?
Maybe dm-error could emulate it.

And what about the 2nd range?


According to your fsck error output, I assume btrfs-progs fails to read
the first copy of chunk root, and due to a bug, it doesn't continue to
read 2nd copy.

While kernel continues to read the 2nd copy and everything goes on.

Ah, that would make sense.
But from what you're saying, I should be able to do recovery by pointing
to the 2nd copy of the chunk root, but somehow I haven't typed the right
command to do so yet, correct?

Unfortunately, no the case.

For --chunk-root command, *logical* bytenr is specified.

We can only tell btrfs-progs(kernel is the same) to find tree root/chunk root at given *logical* bytenr.

But to read which *physical* copy, we can't specify.

Normally, btrfs-progs/kernel should find the correct physical copy without problem, but not this time for btrfs-progs.

And further more, all backup chunk root are in facts pointing to current chunk root, so --chunk-root doesn't work at all.


Should I try another command offset than
btrfs check -p --repair --chunk-root 13835462344704 /dev/mapper/crypt_bcache0
?
Nope, that bytenr is *physical* bytenr, not *logical* bytenr --chunk-root accepts.

But the read error for first tree block already gives some hint.
I'll try to emulate it.

Thanks,
Qu


Or are you saying the btrfs progs bug causes it to fail to even try to read
the 2nd copy of the chunk root even though it was given on the command line?

Thanks,
Marc



--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to