Thread (25 messages) 25 messages, 3 authors, 2021-08-30

Re: Trying to recover data from SSD

From: Qu Wenruo <hidden>
Date: 2021-08-10 23:54:47


On 2021/8/11 上午7:21, Konstantin Svist wrote:
On 8/10/21 15:24, Qu Wenruo wrote:
quoted
On 2021/8/11 上午12:12, Konstantin Svist wrote:
quoted
quoted
quoted
I don't know how to do that (corrupt the extent tree)
There is the more detailed version:
https://lore.kernel.org/linux-btrfs/744795fa-e45a-110a-103e-13caf597299a@gmx.com/ (local)

So, here's what I get:


# btrfs ins dump-tree -t root /dev/sdb3 |grep -A5 'item 0 key
(EXTENT_TREE'

      item 0 key (EXTENT_TREE ROOT_ITEM 0) itemoff 15844 itemsize 439
          generation 166932 root_dirid 0 bytenr 786939904 level 2 refs 1
          lastsnap 0 byte_limit 0 bytes_used 50708480 flags 0x0(none)
          uuid 00000000-0000-0000-0000-000000000000
          drop key (0 UNKNOWN.0 0) level 0
      item 1 key (DEV_TREE ROOT_ITEM 0) itemoff 15405 itemsize 439


# btrfs-map-logical -l 786939904 /dev/sdb3

checksum verify failed on 952483840 wanted 0x00000000 found 0xb6bde3e4
checksum verify failed on 952483840 wanted 0x00000000 found 0xb6bde3e4
checksum verify failed on 952483840 wanted 0x00000000 found 0xb6bde3e4
bad tree block 952483840, bytenr mismatch, want=952483840, have=0
ERROR: failed to read block groups: Input/output error
Open ctree failed



Sooooo.. now what..?
With v5.11 or newer kernel, mount it with "-o rescue=all,ro".

Sorry, I guess that wasn't clear: that error above is what I get while
trying to corrupt the extent tree as per your guide.
Oh, that btrfs-map-logical is requiring unnecessary trees to continue.

Can you re-compile btrfs-progs with the attached patch?
Then the re-compiled btrfs-map-logical should work without problem.

Thanks,
Qu

That said, my kernel is 5.13.* (without your patch) and this mount
command still fails as before

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help