All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konstantin Svist <fry.kun@gmail.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>,
	Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
Subject: Re: Trying to recover data from SSD
Date: Tue, 10 Aug 2021 22:22:05 -0700	[thread overview]
Message-ID: <544e3e73-5490-2cae-c889-88d80e583ac4@gmail.com> (raw)
In-Reply-To: <c7fed97e-d034-3af1-2072-65a9bb0e49ef@gmx.com>

On 8/10/21 16:54, Qu Wenruo wrote:
>
>
> On 2021/8/11 上午7:21, Konstantin Svist wrote:
>> On 8/10/21 15:24, Qu Wenruo wrote:
>>>
>>> On 2021/8/11 上午12:12, Konstantin Svist wrote:
>>>>
>>>>>> 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/
>>>>>
>>>>>
>>>>
>>>>
>>>> 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.



Awesome, that worked to map the sector & mount the partition.. but I
still can't access subvol_root, where the recent data is:

[root@fry ~]# mount -oro,rescue=all /dev/sdb3 /mnt/
[root@fry ~]# ll /mnt/
ls: cannot access '/mnt/subvol_root': Input/output error
total 0
d?????????? ? ?    ?     ?            ? subvol_root
drwxr-xr-x. 1 root root 12 Mar 18 20:55 subvol_snapshots


dmesg:

[532051.071515] BTRFS info (device sdb3): enabling all of the rescue options
[532051.071521] BTRFS info (device sdb3): ignoring data csums
[532051.071523] BTRFS info (device sdb3): ignoring bad roots
[532051.071524] BTRFS info (device sdb3): disabling log replay at mount time
[532051.071526] BTRFS info (device sdb3): disk space caching is enabled
[532051.071528] BTRFS info (device sdb3): has skinny extents
[532051.077018] BTRFS warning (device sdb3): sdb3 checksum verify failed
on 786939904 wanted 0xcdcdcdcd found 0xc375d6b6 level 2
[532051.077710] BTRFS warning (device sdb3): sdb3 checksum verify failed
on 786939904 wanted 0xcdcdcdcd found 0xc375d6b6 level 2
[532052.705324] BTRFS error (device sdb3): bad tree block start, want
920748032 have 0
[532052.705934] BTRFS error (device sdb3): bad tree block start, want
920748032 have 0


  reply	other threads:[~2021-08-11  5:22 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-10  4:41 Trying to recover data from SSD Konstantin Svist
2021-08-10  5:24 ` Qu Wenruo
     [not found]   ` <CADQtc0=GDa-v_byewDmUHqr-TrX_S734ezwhLYL9OSkX-jcNOw@mail.gmail.com>
2021-08-10  6:56     ` Qu Wenruo
2021-08-10 16:12       ` Konstantin Svist
2021-08-10 22:24         ` Qu Wenruo
2021-08-10 23:21           ` Konstantin Svist
2021-08-10 23:54             ` Qu Wenruo
2021-08-11  5:22               ` Konstantin Svist [this message]
2021-08-11  5:24                 ` Qu Wenruo
2021-08-11  5:34                   ` Konstantin Svist
2021-08-11  5:49                     ` Qu Wenruo
2021-08-11 19:33                       ` Konstantin Svist
2021-08-11 21:51                         ` Qu Wenruo
2021-08-11 22:34                           ` Konstantin Svist
2021-08-12  1:18                             ` Qu Wenruo
2021-08-21  2:56                               ` Konstantin Svist
2021-08-28  5:57                                 ` Konstantin Svist
2021-08-28  6:16                                   ` Qu Wenruo
2021-08-28 23:16                                     ` Konstantin Svist
2021-08-28 23:30                                       ` Qu Wenruo
2021-08-29  6:34                                         ` Konstantin Svist
2021-08-29  7:19                                           ` Qu Wenruo
2021-08-29 20:02                                             ` Konstantin Svist
2021-08-30  0:22                                               ` Qu Wenruo
2021-08-30  3:48                                                 ` Konstantin Svist
2021-08-30  7:20                                                   ` Qu Wenruo
     [not found]                                                     ` <aa33b83f-b822-b1d8-9fe4-5cf4ab45c3e1@gmail.com>
2021-08-31 11:05                                                       ` Qu Wenruo
2021-09-01  1:38                                                         ` Konstantin Svist
2021-09-01  1:47                                                           ` Qu Wenruo
2021-08-11  0:30       ` Zygo Blaxell

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=544e3e73-5490-2cae-c889-88d80e583ac4@gmail.com \
    --to=fry.kun@gmail.com \
    --cc=ce3g8jdj@umail.furryterror.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.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.