Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: AccSwtch50 <accswtch50@gmail.com>, linux-btrfs@vger.kernel.org
Subject: Re: Broken BTRFS Partition
Date: Thu, 14 Aug 2025 14:43:56 +0930	[thread overview]
Message-ID: <bf1aae38-7f88-4ab2-b375-0a3c3864ac70@suse.com> (raw)
In-Reply-To: <CAHR-kGg0K71gJsYkWK-0hpbEH3NZObxXHc3CJ=R-g79iP=99Cw@mail.gmail.com>



在 2025/8/14 12:51, AccSwtch50 写道:
> Hi, How do I fix my broken btrfs partition?

History please.

This is a pretty serious failure of COW.

Unless you were using nobarrier mount option and a sudden power loss 
happened, it may indicate your storage doesn't properly handle FUA/FLUSH 
commands.

> 
> This is the dmesg log when I tried to mount it:
> [22709.506970] BTRFS info (device sda21): first mount of filesystem
> 853da0a7-a25b-423a-8b42-4ef0cec712fe
> [22709.506989] BTRFS info (device sda21): using crc32c (crc32c-x86)
> checksum algorithm
> [22709.506997] BTRFS info (device sda21): using free-space-tree
> [22709.809320] BTRFS error (device sda21): level verify failed on logical
> 205872398336 mirror 1 wanted 1 found 0
> [22709.809395] BTRFS error (device sda21): failed to load root free space
> [22709.810018] BTRFS error (device sda21): open_ctree failed: -5

You can try "ro,rescue=all", which will make btrfs to ignore the 
corrupted free space tree.

If lucky enough, you can still salvage your data.

> 
> And here's the output of btrfs check:
> Opening filesystem to check...
> ERROR: root [10 0] level 0 does not match 1

Repair will not help much in this case.

Thanks,
Qu

> 
> ERROR: could not setup free space tree
> ERROR: cannot open file system
> 


      reply	other threads:[~2025-08-14  5:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-14  3:21 Broken BTRFS Partition AccSwtch50
2025-08-14  5:13 ` Qu Wenruo [this message]

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=bf1aae38-7f88-4ab2-b375-0a3c3864ac70@suse.com \
    --to=wqu@suse.com \
    --cc=accswtch50@gmail.com \
    --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