From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: "David C. Partridge" <david.partridge@perdrix.co.uk>,
linux-btrfs@vger.kernel.org
Subject: Re: Problems with btrfs
Date: Sun, 29 Apr 2018 10:07:37 +0800 [thread overview]
Message-ID: <c26c307a-75ce-d0f5-ca29-75854c34280c@gmx.com> (raw)
In-Reply-To: <002f01d3df5d$25dd0270$71970750$@perdrix.co.uk>
[-- Attachment #1.1: Type: text/plain, Size: 4771 bytes --]
On 2018年04月29日 09:55, David C. Partridge wrote:
> Not a problem
>
> See attached
The final binary dump:
# dd if=<device> of=/tmp/copy1.img bs=1 count=16K skip=25942081536
# dd if=<device> of=/tmp/copy2.img bs=1 count=16K skip=26478952448
Thanks,
Qu
>
>
> -----Original Message-----
> From: Qu Wenruo [mailto:quwenruo.btrfs@gmx.com]
> Sent: 29 April 2018 02:35
> To: David C. Partridge; linux-btrfs@vger.kernel.org
> Subject: Re: Problems with btrfs
>
>
>
> On 2018年04月29日 00:02, David C. Partridge wrote:
>> Here are the dumps you requested.
>
> Sorry, I took wrong dump.
>
> The correct dump would be:
> # btrfs inspect dump-tree -t extent <dev>
>
> And you still need to do an extra dump for the final offending tree block.
>
> Considering the extra steps and delays, feel free to use btrfs-restore to recovery your data.
>
> Thanks,
> Qu
>
>>
>> -----Original Message-----
>> From: Qu Wenruo [mailto:quwenruo.btrfs@gmx.com]
>> Sent: 28 April 2018 15:23
>> To: David C. Partridge; linux-btrfs@vger.kernel.org
>> Subject: Re: Problems with btrfs
>>
>>
>>
>> On 2018年04月28日 22:06, David C. Partridge wrote:
>>> Here's the log you asked for ...
>>>
>>> David
>>
>> To dump the offending tree block, you could use the following command:
>>
>> # dd if=/dev/mapper/Charon--vg-root of=copy1.dump bs=1 count=16k
>> skip=22919544832
>>
>> # dd if=/dev/mapper/Charon--vg-root of=copy2.dump bs=1 count=16k
>> skip=23456415744
>>
>> And attach copy1.img and copy2.img.
>>
>> Thanks,
>> Qu
>>
>>>
>>> -----Original Message-----
>>> From: Qu Wenruo [mailto:quwenruo.btrfs@gmx.com]
>>> Sent: 28 April 2018 14:54
>>> To: David C. Partridge
>>> Subject: Re: Problems with btrfs
>>>
>>>
>>>
>>> On 2018年04月28日 21:38, David C. Partridge wrote:
>>>> Oh! doing a private build from source a bit beyond my skill level :( Are there alternatives like climbing in with a disk editor or is there too much to change?
>>>
>>> It's possible to only modify that offending tree block.
>>> But I can't ensure the safety, thus I recommend to use btrfs-corrupt-block.
>>> Since it's not convenient for you, then let's go that way.
>>>
>>> Please provide the following dump:
>>>
>>> # btrfs inspect dump-tree -t chunk <device>
>>>
>>> Then I could calculate the offset on-disk for you to do a binary dump and send that tree block back to me to hand patch it.
>>>
>>>>
>>>> I'm prepared to install a newer version of btrfs-progs if that will fix the problem (assuming I can find a suitable package file).
>>>>
>>>> I'm assuming that I'll likely also need to update the kernel?
>>>
>>> Not exactly.
>>> If latest btrfs check gives no error after fix, even old kernel should handle it well without problem.
>>>
>>> But as a generic advice, it's recommended to use latest kernel for btrfs if possible.
>>>
>>> And currently there is nothing sensitive in the thread (btrfs-inspect.log could contain some filenames, but nothing sensitive right now), so it's better to CC the mail to mail list, just in case some other guy could provide extra help.
>>>
>>> (Next mail may be after 8~10 hours, as it's bed time for my timezone)
>>>
>>> Thanks,
>>> Qu
>>>
>>>>
>>>> David
>>>>
>>>> -----Original Message-----
>>>> From: Qu Wenruo [mailto:quwenruo.btrfs@gmx.com]
>>>> Sent: 28 April 2018 14:25
>>>> To: David C. Partridge
>>>> Subject: Re: Problems with btrfs
>>>>
>>>>
>>>>
>>>> On 2018年04月28日 21:14, David C. Partridge wrote:
>>>>> Here's the output from
>>>>>
>>>>> # btrfs inspect dump-tree /dev/mapper/Charon--vg-root | grep -C 20
>>>>> 224304857088
>>>>
>>>> Located the problem:
>>>>
>>>> item 382 key (224304857088 EXTENT_ITEM 16384) itemoff 14495 itemsize 51
>>>> extent refs 1 gen 735989 flags TREE_BLOCK
>>>> tree block key (4401028 UNKNOWN.0 0) level 0
>>>> ^^^^^^^^^^^^^^^^^^^
>>>> shared block backref parent 140827475968
>>>>
>>>> It could be fixed by special crafted btrfs-corrupt-block tool to handle it.
>>>> Although this means you need to compile btrfs-progs by yourself with special branch.
>>>>
>>>> Before patching btrfs-progs, I'd like to double check if other part is correct.
>>>>
>>>> Please execute the following command:
>>>> # btrfs inspect dump-tree -b 140827475968
>>>> /dev/mapper/Charon--vg-root
>>>>
>>>> If the output is correct, I could start patching btrfs-corrupt-block then.
>>>> But please be aware of that, this could only fix the problem found in extent tree, I'm not 100% sure if there will be other problems, as the btrfs-progs is pretty old.
>>>>
>>>> Thanks,
>>>> Qu
>>>>
>>>>>
>>>>> HtH
>>>>> David
>>>>>
>>>>
>>>
>>
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2018-04-29 2:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-27 18:38 Problems with btrfs David C. Partridge
2018-04-28 0:20 ` Qu Wenruo
2018-04-28 3:09 ` Chris Murphy
[not found] ` <003801d3def2$d90965c0$8b1c3140$@perdrix.co.uk>
[not found] ` <a5c24cee-ad20-f317-28e8-40e88039db45@gmx.com>
[not found] ` <004d01d3def6$4000ed40$c002c7c0$@perdrix.co.uk>
[not found] ` <60674123-6fe2-2cfe-e7a8-25d62e023c53@gmx.com>
2018-04-28 14:06 ` David C. Partridge
2018-04-28 14:23 ` Qu Wenruo
2018-04-28 16:02 ` David C. Partridge
2018-04-29 1:35 ` Qu Wenruo
[not found] ` <002f01d3df5d$25dd0270$71970750$@perdrix.co.uk>
2018-04-29 2:07 ` Qu Wenruo [this message]
[not found] ` <002a01d3df93$74b7b760$5e272620$@perdrix.co.uk>
[not found] ` <126b8a98-384e-af68-8a36-ad702f07fad2@gmx.com>
2018-04-29 9:20 ` David C. Partridge
2018-04-29 9:36 ` Qu Wenruo
2018-04-29 9:55 ` David C. Partridge
2018-04-29 10:00 ` Qu Wenruo
[not found] ` <003501d3dfa0$ce3f1b40$6abd51c0$@perdrix.co.uk>
2018-04-29 10:15 ` Qu Wenruo
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=c26c307a-75ce-d0f5-ca29-75854c34280c@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=david.partridge@perdrix.co.uk \
--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