I have a VDI file that has a corrupted BTRFS inside. I’ve made a copy of the VDI file and am attempting recovery in a new VM. I’ve reviewed many articles before coming here. I’m asking, a possible duplicate question, to see if there is any new information on this file system that could allow me to recover it.
The current VM is using Fedora 35. Prior to updating, btrfs check --repair /dev/sdb2 produced a lot of enteries. After running dnf update it only reports error [4 0]
>mount -t btrfs -o ro,rescue=usebackuproot /dev/sdb2 /data2
wrong fs type, bad option, bad superblock on /dev/sdb2, missing codepage or helper programm or other error.
>btrfs fi show
label: fedora_localhost-live uuidL: 044dffdd-5125-4450-af0f-8605a0f12f25
total devices 1 fs bytes used 10gb
devid 1 size 31gb used 13gb path /dev/sdb2
>btrfs rescue super-recover /dev/sdb2
all supers are valid, no need to recover
>btrfs check --repair /dev/sdb2
starting repair
opening file system to check ...
parent transid verify failed on 30408704 wanted 339510 found 346008
Ignoring transid failure
error: root [4 0] level 2 does not match 0
>btrfs rescue chuck-recover /dev/sdb2
chuck tree recovery failed
=====
All Devices:
Device: id = 1, name = /dev/sdb2
Scanning: DONE in dev0
DEVICE SCAN RESULT:
Filesystem Information:
sectorsize: 4096
nodesize: 16384
tree root generation: 347376
chunk root generation: 339510
All Devices:
Device: id = 1, name = /dev/sdb2
All Block Groups:
Block Group: start = 1048576, len = 4194304, flag = 2
Block Group: start = 5242880, len = 8388608, flag = 4
Block Group: start = 13631488, len = 8388608, flag = 1
Block Group: start = 22020096, len = 8388608, flag = 22
Block Group: start = 30408704, len = 268435456, flag = 24
Block Group: start = 298844160, len = 1073741824, flag = 1
Block Group: start = 1372585984, len = 1073741824, flag = 1
Block Group: start = 2446327808, len = 1073741824, flag = 1
Block Group: start = 3520069632, len = 1073741824, flag = 1
Block Group: start = 4593811456, len = 1073741824, flag = 1
Block Group: start = 5667553280, len = 1073741824, flag = 1
Block Group: start = 6741295104, len = 268435456, flag = 24
Block Group: start = 7009730560, len = 1073741824, flag = 1
Block Group: start = 8083472384, len = 1073741824, flag = 1
Block Group: start = 9157214208, len = 1073741824, flag = 1
Block Group: start = 10230956032, len = 1073741824, flag = 1
Block Group: start = 11304697856, len = 1073741824, flag = 1
All Chunks:
Chunk: start = 1048576, len = 4194304, type = 2, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 1048576
Chunk: start = 5242880, len = 8388608, type = 4, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 5242880
Chunk: start = 13631488, len = 8388608, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 13631488
Chunk: start = 22020096, len = 8388608, type = 22, num_stripes = 2
Stripes list:
[ 0] Stripe: devid = 1, offset = 22020096
[ 1] Stripe: devid = 1, offset = 30408704
Chunk: start = 30408704, len = 268435456, type = 24, num_stripes = 2
Stripes list:
[ 0] Stripe: devid = 1, offset = 38797312
[ 1] Stripe: devid = 1, offset = 307232768
Chunk: start = 298844160, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 575668224
Chunk: start = 1372585984, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 1649410048
Chunk: start = 2446327808, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 2723151872
Chunk: start = 3520069632, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 3796893696
Chunk: start = 4593811456, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 4870635520
Chunk: start = 5667553280, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 5944377344
Chunk: start = 6741295104, len = 268435456, type = 24, num_stripes = 2
Stripes list:
[ 0] Stripe: devid = 1, offset = 7018119168
[ 1] Stripe: devid = 1, offset = 7286554624
Chunk: start = 7009730560, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 7554990080
Chunk: start = 8083472384, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 8628731904
Chunk: start = 9157214208, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 9702473728
Chunk: start = 10230956032, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 10776215552
Chunk: start = 11304697856, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 11849957376
Chunk: start = 12378439680, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 12923699200
All Device Extents:
Device extent: devid = 1, start = 1048576, len = 4194304, chunk offset = 1048576
Device extent: devid = 1, start = 5242880, len = 8388608, chunk offset = 5242880
Device extent: devid = 1, start = 13631488, len = 8388608, chunk offset = 13631488
CHECK RESULT:
Recoverable Chunks:
Chunk: start = 1048576, len = 4194304, type = 2, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 1048576
Block Group: start = 1048576, len = 4194304, flag = 2
Device extent list:
[ 0]Device extent: devid = 1, start = 1048576, len = 4194304, chunk offset = 1048576
Chunk: start = 5242880, len = 8388608, type = 4, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 5242880
Block Group: start = 5242880, len = 8388608, flag = 4
Device extent list:
[ 0]Device extent: devid = 1, start = 5242880, len = 8388608, chunk offset = 5242880
Chunk: start = 13631488, len = 8388608, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 13631488
Block Group: start = 13631488, len = 8388608, flag = 1
Device extent list:
[ 0]Device extent: devid = 1, start = 13631488, len = 8388608, chunk offset = 13631488
Unrecoverable Chunks:
Chunk: start = 22020096, len = 8388608, type = 22, num_stripes = 2
Stripes list:
[ 0] Stripe: devid = 1, offset = 22020096
[ 1] Stripe: devid = 1, offset = 30408704
Block Group: start = 22020096, len = 8388608, flag = 22
No device extent.
Chunk: start = 30408704, len = 268435456, type = 24, num_stripes = 2
Stripes list:
[ 0] Stripe: devid = 1, offset = 38797312
[ 1] Stripe: devid = 1, offset = 307232768
Block Group: start = 30408704, len = 268435456, flag = 24
No device extent.
Chunk: start = 298844160, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 575668224
Block Group: start = 298844160, len = 1073741824, flag = 1
No device extent.
Chunk: start = 1372585984, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 1649410048
Block Group: start = 1372585984, len = 1073741824, flag = 1
No device extent.
Chunk: start = 2446327808, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 2723151872
Block Group: start = 2446327808, len = 1073741824, flag = 1
No device extent.
Chunk: start = 3520069632, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 3796893696
Block Group: start = 3520069632, len = 1073741824, flag = 1
No device extent.
Chunk: start = 4593811456, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 4870635520
Block Group: start = 4593811456, len = 1073741824, flag = 1
No device extent.
Chunk: start = 5667553280, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 5944377344
Block Group: start = 5667553280, len = 1073741824, flag = 1
No device extent.
Chunk: start = 6741295104, len = 268435456, type = 24, num_stripes = 2
Stripes list:
[ 0] Stripe: devid = 1, offset = 7018119168
[ 1] Stripe: devid = 1, offset = 7286554624
Block Group: start = 6741295104, len = 268435456, flag = 24
No device extent.
Chunk: start = 7009730560, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 7554990080
Block Group: start = 7009730560, len = 1073741824, flag = 1
No device extent.
Chunk: start = 8083472384, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 8628731904
Block Group: start = 8083472384, len = 1073741824, flag = 1
No device extent.
Chunk: start = 9157214208, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 9702473728
Block Group: start = 9157214208, len = 1073741824, flag = 1
No device extent.
Chunk: start = 10230956032, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 10776215552
Block Group: start = 10230956032, len = 1073741824, flag = 1
No device extent.
Chunk: start = 11304697856, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 11849957376
Block Group: start = 11304697856, len = 1073741824, flag = 1
No device extent.
Chunk: start = 12378439680, len = 1073741824, type = 1, num_stripes = 1
Stripes list:
[ 0] Stripe: devid = 1, offset = 12923699200
No block group.
No device extent.
Total Chunks: 18
Recoverable: 3
Unrecoverable: 15
Orphan Block Groups:
Orphan Device Extents:
No mapping for 6948208640-6948225024
Couldn't map the block 6948208640
Couldn't read tree root
open with broken chunk error
Chunk tree recovery failed
=====
GParted 1.3.1
configuration --enable-libparted-dmraid --enable-online-resize
libparted 3.4
========================================
Device: /dev/sda
Model: ATA VBOX HARDDISK
Serial:
Sector size: 512
Total sectors: 41943040
Heads: 255
Sectors/track: 2
Cylinders: 82241
Partition table: msdos
Partition Type Start End Flags Partition Name File System Label Mount Point
/dev/sda1 Primary 2048 2099199 boot ext4 /boot
/dev/sda2 Primary 2099200 41943039 btrfs fedora_localhost-live /, /home
========================================
Device: /dev/sdb
Model: ATA VBOX HARDDISK
Serial:
Sector size: 512
Total sectors: 67108864
Heads: 255
Sectors/track: 2
Cylinders: 131586
Partition table: msdos
Partition Type Start End Flags Partition Name File System Label Mount Point
/dev/sdb1 Primary 2048 2099199 boot ext4
/dev/sdb2 Primary 2099200 67108863 btrfs fedora_localhost-live
========================================
Device: /dev/sdc
Model: ATA VBOX HARDDISK
Serial:
Sector size: 512
Total sectors: 41943040
Heads: 255
Sectors/track: 2
Cylinders: 82241
Partition table: none
Partition Type Start End Flags Partition Name File System Label Mount Point
/dev/sdc Unpartitioned 0 41943039 ext4 data
========================================
Check and repair file system (btrfs) on /dev/sdb2 00:14:33 ( ERROR )
calibrate /dev/sdb2 00:00:02 ( SUCCESS )
path: /dev/sdb2 (partition)
start: 2099200
end: 67108863
size: 65009664 (31.00 GiB)
check file system on /dev/sdb2 for errors and (if possible) fix them 00:14:31 ( ERROR )
btrfs check '/dev/sdb2' 00:14:31 ( ERROR )
Opening filesystem to check...
Checking filesystem on /dev/sdb2
UUID: 044dffdd-5125-4450-af0f-8605a0f12f25
found 10820648960 bytes used, error(s) found
total csum bytes: 5961932
total tree bytes: 103399424
total fs tree bytes: 61751296
total extent tree bytes: 31014912
btree space waste bytes: 16456853
file data blocks allocated: 4281233408
referenced 2388201472
Any other suggestions and offline assistance would be helpful.