From: Qu Wenruo <wqu@suse.com>
To: Thomas Debesse <dev@illwieckz.net>, linux-btrfs@vger.kernel.org
Subject: Re: corruption after block-group-tree conversion, how to recover? (data is readable)
Date: Mon, 27 Apr 2026 07:48:52 +0930 [thread overview]
Message-ID: <07db83f8-5769-4aaf-9f54-2711ddad9eea@suse.com> (raw)
In-Reply-To: <CALpuBKwmZRYX0Mag-gLSoL9NgBBR_D+iOeKX7sdhHtyAposGRg@mail.gmail.com>
在 2026/4/27 06:53, Thomas Debesse 写道:
> Hi, I just did a `btrfstune --convert-to-block-group-tree` conversion
> operation on a btrfs filesystem and this corrupted the volume:
>
> ```
> [ 786.278571] BTRFS info (device dm-9): first mount of filesystem <uuid>
> [ 786.278595] BTRFS info (device dm-9): using crc32c (crc32c-intel)
> checksum algorithm
> [ 786.442781] BTRFS error (device dm-9): parent transid verify failed
> on logical 9820282388480 mirror 2 wanted 5715946 found 5717327
> [ 786.448020] BTRFS error (device dm-9): parent transid verify failed
> on logical 9820282388480 mirror 1 wanted 5715946 found 5717327
Unfortunately, transid mismatch is not reliably repairable.
> [ 786.449543] BTRFS error (device dm-9): failed to read block groups: -5
> [ 786.481199] BTRFS error (device dm-9): open_ctree failed: -5
> ```
>
> I can mount the btrfs volume with `mount -oro,rescue=all`, I can
> browse the filesystem, and every file data I checked loocked fine.
>
> Here is the log when mounting with `-oro,rescue=all`:
>
> ```
> [ 2523.344235] BTRFS info (device dm-9): first mount of filesystem <uuid>
> [ 2523.344260] BTRFS info (device dm-9): using crc32c (crc32c-intel)
> checksum algorithm
> [ 2523.612830] BTRFS error (device dm-9: state C): parent transid
> verify failed on logical 9820282388480 mirror 2 wanted 5715946 found
> 5717327
> [ 2523.613372] BTRFS error (device dm-9: state C): parent transid
> verify failed on logical 9820282388480 mirror 1 wanted 5715946 found
> 5717327
> [ 2523.639263] BTRFS info (device dm-9: state C): enabling ssd optimizations
> [ 2523.639268] BTRFS info (device dm-9: state C): disabling log replay
> at mount time
> [ 2523.639271] BTRFS info (device dm-9: state C): turning on async discard
> [ 2523.639273] BTRFS info (device dm-9: state C): enabling free space tree
> [ 2523.639276] BTRFS info (device dm-9: state C): ignoring bad roots
> [ 2523.639278] BTRFS info (device dm-9: state C): ignoring data csums
> ```
>
> The log reports SSD optimization to be enabled because those drives
> are bcache backing devices. Bcache was disabled throughout the
> operation.
>
> I expect that recovering from backup would take 10 days, so I would
> like to avoid that if possible. If there are ways to recompute the
> broken metadata for example or other repair operation, I would prefer
> doing that.
I'm afraid restoring from backup is the only reliable solution.
>
> The system is running Ubuntu 24.04.4 with Linux 6.8.0-110-generic and
> btrfs-progs 6.6.3-1.1build2.
Unfortunately the btrfs-progs is too old, and possibility the root cause.
There are some fixes in progs v6.15, thus it's strongly recommended to
use progs newer than v6.15.
Thanks,
Qu
> I can run rescue systems on removable
> drives if newer tools are required to repair.
>
> Best regards,
>
next prev parent reply other threads:[~2026-04-26 22:19 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 [this message]
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
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=07db83f8-5769-4aaf-9f54-2711ddad9eea@suse.com \
--to=wqu@suse.com \
--cc=dev@illwieckz.net \
--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