From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Thomas Debesse <dev@illwieckz.net>, Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: corruption after block-group-tree conversion, how to recover? (data is readable)
Date: Mon, 27 Apr 2026 14:56:45 +0930 [thread overview]
Message-ID: <634f9a5b-0e1c-4142-b82c-d34662a7a9ad@gmx.com> (raw)
In-Reply-To: <CALpuBKx=EQY=-K5VtLKATufdAbptZD0x6ZiSgbXZgOAG8Q8vAQ@mail.gmail.com>
在 2026/4/27 12:13, Thomas Debesse 写道:
> Le lun. 27 avr. 2026 à 00:18, Qu Wenruo <wqu@suse.com> a écrit :
>> Unfortunately, transid mismatch is not reliably repairable.
>> I'm afraid restoring from backup is the only reliable solution.
>
> Thank you for your answers. Is the data from the “badly converted”
> volume be assumed safe?
If you really want to know that, only a full "btrfs check" can give you
some clue.
The transid mismatch means the block group tree block is being
over-written by some other tree blocks.
It can be minor, e.g. over-written by a new bg tree block, or it can
cause data loss, e.g. over-written by a subvolume tree.
And it can even be worse, if there are multiple tree blocks being
overwritten.
Your "rescue=all" mount working is a good indication that at least most
of your subvolume trees are good, but it also disables datachecksum
verification, so there is still a chance that csum tree is corrupted.
>
> The idea is that, instead of overwriting the “badly converted” volume
> with a brand newly created and empty btrfs volume and copying the data
> from backup, I may consider the option to create the new btrfs volume
> on brand new devices I may source. I would have then the option to
> copy the data from either the backup or the “badly converted” volume.
> If the data is safely copyable from the “badly converted” volume (once
> mounted with recovery options), I expect copying from the “badly
> converted” volume to be way faster than copying from backup.
In that case, you may want to try this mount option instead:
"-o ro,rescue=ibadroots,nologreplay", which will allow btrfs to skip the
bad block group tree, but still enables data checksum verification.
>
> Also another question: if it happens that copying from the “badly
> converted” volume can be assumed to be safe, would `btrfs send` work
> or do I would still have to do it the btrfs-agnostic way, like by
> using rsync?
I think 'btrfs send' may work, but haven't yet verified.
>
> Thanks in advance for your answers, that helps a lot.
>
And I forgot to ask, when did the corruption happen?
Immediately after the conversion finished, or the first mount worked,
but corruption happened later?
If immediately after a finished conversion, then it's very possible the
conversion is the cause.
If not, then it may be something else, like the older non-upstream LTS
kernel from Ubuntu.
The reason I'm asking is, although there are some fixes in progs v6.15,
they are all addressing problems related to resuming interrupted conversion.
Thus I'm wondering what is the root cause of the transid mismatch.
Thanks,
Qu
next prev parent reply other threads:[~2026-04-27 5:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-26 21:23 corruption after block-group-tree conversion, how to recover? (data is readable) Thomas Debesse
2026-04-26 22:18 ` Qu Wenruo
2026-04-27 0:08 ` Ulli Horlacher
2026-04-27 2:24 ` Christoph Anton Mitterer
2026-04-27 2:43 ` Thomas Debesse
2026-04-27 5:26 ` Qu Wenruo [this message]
2026-04-27 12:56 ` Thomas Debesse
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=634f9a5b-0e1c-4142-b82c-d34662a7a9ad@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=dev@illwieckz.net \
--cc=linux-btrfs@vger.kernel.org \
--cc=wqu@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox