Skip to contentSkip to conversation

btrfs mirror fails to mount - corrupt leaf

DISCUSSION Craig Silva 1 participant 1 message Apr 3, 2023 Btrfs file system

lore
Share & tools
lore
#0 lore raw

This happened as the result of a power outage (someone knocked the plug on a power block)

The NAS is openmedivault - btrfs-progs v4.20.1

btrfs filesystem show
Label: none uuid: 34f2c6cc-2665-4b9b-9503-356c83066d33 Total devices 2 FS bytes used 864.48GiB
devid 1 size 3.18TiB used 2.02TiB path /dev/sda1
devid 2 size 3.18TiB used 2.02TiB path /dev/sdb1

blkid
/dev/sdb1: UUID="34f2c6cc-2665-4b9b-9503-356c83066d33" UUID_SUB="5c40e61e-04d0-4025-8c97-be4a12da719a" TYPE="btrfs" PARTLABEL="primary" PARTUUID="c0bde629-1d0c-44d9-a48a-6f4657627428" /dev/sda1: UUID="34f2c6cc-2665-4b9b-9503-356c83066d33" UUID_SUB="05db5d7d-92e9-46d3-a7bf-655af00ccb85" TYPE="btrfs" PARTLABEL="primary" PARTUUID="3a5b7725-0be5-4935-89ae-2b67813cbc07"

btrfs-find-root /dev/sda1
incorrect offsets 5447 33559879
Superblock thinks the generation is 1443155
Superblock thinks the level is 1

All supers are valid

dmesg:

BTRFS critical (device sda1): corrupt leaf: root=2 block=546514255872 slot=205, unexpected item end, have 33559879 expect 5447 BTRFS critical (device sda1): corrupt leaf: root=2 block=546514255872 slot=205, unexpected item end, have 33559879 expect 5447 BTRFS error (device sda1): failed to read block groups: -5
BTRFS error (device sda1): open_ctree failed
BTRFS info (device sda1): disk space caching is enabled
BTRFS info (device sda1): has skinny extents
BTRFS info (device sda1): bdev /dev/sda1 errs: wr 0, rd 0, flush 0, corrupt 11, gen 0
BTRFS info (device sda1): bdev /dev/sdb1 errs: wr 0, rd 0, flush 0, corrupt 11, gen 0

I checked hardware both sda and sdb with smartctl and no apparent errors.

I'm in the process of a restore (ho-hum) - but it would be nice if there was a way of fixing it