bad tree block start help
| Newsgroups | org.kernel.vger.linux-btrfs |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I'm looking for help fixing my data array that runs btrfs on top of a
raid5 array. (I believe this is different from the problematic btrfs +
raid5/6 that I see mentioned).
It is a 6 disk array of 6 WDC WD2003FZEX-0 2Tb drives, in a QNAP
enclosure, OS lives on seperate raid1 ssd's.
I normally run have a scrub run once a week, I started notice corruption
last week but am still not super knowledgeable on btrfs enough to fix.
Now the system will go into rescue mode on boot or only mount the /data
drive as readonly.
Things I've tried so far:
btrfs scrub start /dev/md127p1 (aborts at around 30% which messages
about bad tree block start)
mount -o usebackuproot (worked but didn't seem to fix anything)
btrfs check /dev/md127p1 (only run from rescue prompt, I should have
logged to file, my bad)
btrfs rescue super-recover /dev/md127p1 (did not seem to help)
btrfs rescue zero-log /dev/sda1 (allowed me to get past rescue
prompt I believe and just mounts the btrfs fs readonly now)
I know I'm supposed to backup the drive now, I just don't have anything
in house that's that large (does it need to be 9Tb or just 5Tb?)
I've run short smartctl tests on all the underlying disks and they
passed, the raid5 array itself is fine and healthy too:
md127 : active raid5 sdg[3] sdf[2] sdi[6] sdh[4] sdc[1] sdb[0]
9766912000 blocks super 1.2 level 5, 512k chunk, algorithm 2
[6/6] [UUUUUU]
bitmap: 0/15 pages [0KB], 65536KB chunk
Looking for next steps to diagnose / repair this. Is it time to finally
run btrfs check --repair now?
diagnostic info:
uname -a
Linux box 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC
2026 x86_64 x86_64 x86_64 GNU/Linux
btrfs version
btrfs-progs v5.16.2
btrfs fi show
Label: none uuid: dbe3f4de-d406-4249-8eed-32499283c34a
Total devices 1 FS bytes used 4.55TiB
devid 1 size 9.10TiB used 4.60TiB path /dev/md127p1
btrfs fi df /data
Data, single: total=4.59TiB, used=4.54TiB
System, DUP: total=40.00MiB, used=528.00KiB
Metadata, DUP: total=7.00GiB, used=5.75GiB
GlobalReserve, single: total=512.00MiB, used=0.00B
full dmesg attached to email (relevant lines grep'd below):
[Thu Jul 16 21:56:45 2026] BTRFS: device fsid
dbe3f4de-d406-4249-8eed-32499283c34a devid 1 transid 426244 /dev/md127p1
scanned by btrfs (553)
[Thu Jul 16 21:56:48 2026] BTRFS info (device md127p1): using crc32c
(crc32c-intel) checksum algorithm
[Thu Jul 16 21:56:48 2026] BTRFS info (device md127p1): disk space
caching is enabled
[Thu Jul 16 21:56:48 2026] BTRFS info (device md127p1): has skinny extents
[Thu Jul 16 22:00:03 2026] BTRFS error (device md127p1): bad tree block
start, want 6411603214336 have 7735285428691706006
[Thu Jul 16 22:00:03 2026] BTRFS error (device md127p1): failed to run
delayed ref for logical 1614907449344 num_bytes 4096 type 178 action 1
ref_mod 1: -5
[Thu Jul 16 22:00:03 2026] BTRFS: error (device md127p1) in
btrfs_run_delayed_refs:2173: errno=-5 IO failure
[Thu Jul 16 22:00:03 2026] BTRFS info (device md127p1): forced readonly
dmesg.log
(text/x-log, 166 KB) - not displayed