From: Mark Harmstone <mark@harmstone.com>
To: PranshuTheGamer <12345qwertyman12345@gmail.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [help me] corrupted filesystem, restoration methods exhausted.
Date: Thu, 17 Jul 2025 14:39:18 +0100 [thread overview]
Message-ID: <8dc2668f-9fa2-4a23-9735-36f7f2d520e8@harmstone.com> (raw)
In-Reply-To: <CAPYq2E2V-sY9HcUOqCnz1hrHJmXSB0O2wHxFBeC62fjrMg+R4w@mail.gmail.com>
Have you done an extended SMART test on your disk? The most likely root cause is
that your disk is goosed.
On 16/07/2025 7.36 pm, PranshuTheGamer wrote:
> Hello.
> I was here 2 weeks ago, and this time I have another btrfs system
> corrupted for the same reason, sudden power loss. I clearly didn't
> learn from my mistakes. I shall attach a few commands and their
> outputs.
>
>> sudo mount -o ro,compress=zstd,noatime,barrier,flushoncommit,rescue=all /dev/disk/by-label/WD-01\\x20Storage /run/media/shivangi/WD-01
> mount: /run/media/shivangi/WD-01: can't read superblock on /dev/sdc1.
> dmesg(1) may have more information after failed mount system call.
>
>> sudo dmesg
> [ 8832.794775] BTRFS: device label WD-01 Storage devid 1 transid 9193
> /dev/sdc1 (8:33) scanned by mount (18864)
> [ 8832.795869] BTRFS info (device sdc1 state S): first mount of
> filesystem 57e6e11e-33c5-4348-a737-2efe07548dbc
> [ 8832.795897] BTRFS info (device sdc1 state S): using crc32c
> (crc32c-x86) checksum algorithm
> [ 8832.795907] BTRFS info (device sdc1 state S): using free-space-tree
> [ 8832.804406] BTRFS error (device sdc1 state S): parent transid
> verify failed on logical 732954411008 mirror 1 wanted 9193 found 9191
> [ 8832.805077] BTRFS error (device sdc1 state S): parent transid
> verify failed on logical 732954411008 mirror 2 wanted 9193 found 9191
> [ 8832.805095] BTRFS warning (device sdc1 state S): couldn't read tree root
> [ 8832.805841] BTRFS error (device sdc1 state S): open_ctree failed: -5
>
>> sudo btrfs restore -l /dev/disk/by-label/WD-01\\x20Storage
> parent transid verify failed on 732954411008 wanted 9193 found 9191
> parent transid verify failed on 732954411008 wanted 9193 found 9191
> parent transid verify failed on 732954411008 wanted 9193 found 9191
> Ignoring transid failure
> tree key (EXTENT_TREE ROOT_ITEM 0) 732954443776 level 2
> tree key (DEV_TREE ROOT_ITEM 0) 30834688 level 1
> tree key (FS_TREE ROOT_ITEM 0) 732809641984 level 2
> tree key (CSUM_TREE ROOT_ITEM 0) 732954558464 level 2
> tree key (UUID_TREE ROOT_ITEM 0) 732809723904 level 0
> tree key (FREE_SPACE_TREE ROOT_ITEM 0) 732954542080 level 1
> tree key (258 ROOT_ITEM 0) 1074905481216 level 1
> tree key (259 ROOT_ITEM 0) 1074905546752 level 1
> tree key (260 ROOT_ITEM 0) 1075680133120 level 2
> tree key (261 ROOT_ITEM 0) 1074912346112 level 1
> tree key (265 ROOT_ITEM 304) 1075044286464 level 1
> tree key (266 ROOT_ITEM 305) 1075057786880 level 2
> tree key (267 ROOT_ITEM 306) 1075066519552 level 1
> tree key (270 ROOT_ITEM 338) 1075071647744 level 1
> tree key (271 ROOT_ITEM 339) 1075072745472 level 2
> tree key (272 ROOT_ITEM 340) 1075087720448 level 1
> tree key (275 ROOT_ITEM 516) 1075088801792 level 1
> tree key (276 ROOT_ITEM 517) 1075091931136 level 2
> tree key (277 ROOT_ITEM 518) 1075105366016 level 1
> tree key (279 ROOT_ITEM 0) 733124001792 level 2
> tree key (281 ROOT_ITEM 819) 733086138368 level 2
> tree key (282 ROOT_ITEM 829) 37928960 level 2
> tree key (289 ROOT_ITEM 879) 733147119616 level 2
> tree key (291 ROOT_ITEM 970) 733220503552 level 1
> tree key (292 ROOT_ITEM 971) 733221715968 level 2
> tree key (293 ROOT_ITEM 972) 733222060032 level 1
> tree key (295 ROOT_ITEM 976) 732351725568 level 2
> tree key (303 ROOT_ITEM 2159) 1075506905088 level 2
> tree key (304 ROOT_ITEM 2429) 733309599744 level 2
> tree key (306 ROOT_ITEM 2432) 733311385600 level 2
> tree key (308 ROOT_ITEM 2434) 733312335872 level 1
> tree key (309 ROOT_ITEM 5300) 732955852800 level 2
> tree key (310 ROOT_ITEM 5547) 1074997673984 level 2
> tree key (311 ROOT_ITEM 5548) 1075586596864 level 2
> tree key (312 ROOT_ITEM 5634) 32423936 level 2
> tree key (313 ROOT_ITEM 5657) 32456704 level 2
> tree key (314 ROOT_ITEM 5658) 35717120 level 2
> tree key (317 ROOT_ITEM 6878) 732579905536 level 2
> tree key (318 ROOT_ITEM 8931) 732809347072 level 2
> tree key (DATA_RELOC_TREE ROOT_ITEM 0) 30523392 level 0
>
> ^ These are a lot of snapshots btw
>
> I ran `sudo btrfs inspect-internal dump-tree -b 1074905481216
> /dev/sdc1 > tree_258.txt` for each of these, then ran this script:
> for file in tree_*.txt; do
> echo "\n========== $file =========="
> echo "-- DIR_ITEM --"
> grep -i 'DIR_ITEM' "$file" || echo "No DIR_ITEM found."
> echo "-- INODE_ITEM --"
> grep -i 'INODE_ITEM' "$file" || echo "No INODE_ITEM found."
> done | tee summary.txt,
> ^ which I have attached.
>
> Then, in zsh i ran this script to list anything that can give me a
> name, because nothing is giving me any names to restore.
>
> roots=(
> 258 259 260 261 265 266 267 270 271 272
> 275 276 277 279 281 282 289 291 292 293
> 295 303 304 306 308 309 310 311 312 313
> 314 317 318
> )
>
> for root in $roots; do
> echo "---- Trying root $root ----"
> sudo btrfs restore --dry-run --verbose --root=$root
> /dev/disk/by-label/WD-01\ Storage /mnt/tmp 2>&1 | grep -E
> '^Restoring|^ignoring'
> done
>
> The output was empty
>
> Finally I ran:
>
>> sudo btrfs restore --dry-run --verbose --i /dev/disk/by-label/WD-01\\x20Storage /mnt/tmp | grep '^Restoring'
>
> parent transid verify failed on 732954411008 wanted 9193 found 9191
> parent transid verify failed on 732954411008 wanted 9193 found 9191
> parent transid verify failed on 732954411008 wanted 9193 found 9191
> Ignoring transid failure
>
> So yeah I'm in deep stuff now. Please send help
next prev parent reply other threads:[~2025-07-17 13:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-16 18:36 [help me] corrupted filesystem, restoration methods exhausted PranshuTheGamer
2025-07-17 13:39 ` Mark Harmstone [this message]
2025-07-18 5:54 ` PranshuTheGamer
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=8dc2668f-9fa2-4a23-9735-36f7f2d520e8@harmstone.com \
--to=mark@harmstone.com \
--cc=12345qwertyman12345@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 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.