Hello fellow linux users,
I got (I think) a bitflip today as my main drive sprung into read-only mode with the message " tree first key mismatch detected"
After rebooting I landed in initramfs as /root could not be mounted. In my tries to recover/repair this I accidentally deleted the message with btrfs rescue zero-log /dev/nvme0n1p2
I'm now at a point, where I don't know, what I should do now.
I tried:
siducer@siduction:~$ sudo btrfsck -p /dev/nvme0n1p2
Opening filesystem to check...
Checking filesystem on /dev/nvme0n1p2
UUID: 678ea3a2-d45e-4198-a28a-3a7d93329e7f
[1/7] checking root items (0:00:08 elapsed, 5484866 items checked)
ref mismatch on [7601295360 8192] extent item 9, found 1elapsed, 399549 items checked)
[2/7] checking extents (0:00:24 elapsed, 405437 items checked)
ERROR: errors found in extent allocation tree or chunk allocation
[3/7] checking free space tree (0:00:01 elapsed, 1076 items checked)
[4/7] checking fs roots (0:01:47 elapsed, 297815 items checked)
[5/7] checking csums (without verifying data) (0:00:00 elapsed, 876800 items checked)
[6/7] checking root refs (0:00:00 elapsed, 59 items checked)
[7/7] checking quota groups skipped (not enabled on this FS)
found 1122057031680 bytes used, error(s) found
total csum bytes: 1088396968
total tree bytes: 6641614848
total fs tree bytes: 4897996800
total extent tree bytes: 541425664
btree space waste bytes: 1040216153
file data blocks allocated: 5041668685824
referenced 1470731497472
siducer@siduction:~$ sudo btrfs rescue chunk-recover /dev/nvme0n1p2
Scanning: 852492288 in dev0scan chunk headers error
siducer@siduction:~$ sudo btrfs check -p --check-data-csum /dev/nvme0n1p2
Opening filesystem to check...
Checking filesystem on /dev/nvme0n1p2
UUID: 678ea3a2-d45e-4198-a28a-3a7d93329e7f
[1/7] checking root items (0:00:08 elapsed, 5484866 items checked)
ref mismatch on [7601295360 8192] extent item 9, found 1elapsed, 399765 items checked)
[2/7] checking extents (0:00:23 elapsed, 405437 items checked)
ERROR: errors found in extent allocation tree or chunk allocation
[3/7] checking free space tree (0:00:01 elapsed, 1076 items checked)
[4/7] checking fs roots (0:01:47 elapsed, 297815 items checked)
[5/7] checking csums against data (0:41:49 elapsed, 876800 items checked))
[6/7] checking root refs (0:00:00 elapsed, 59 items checked)
[7/7] checking quota groups skipped (not enabled on this FS)
found 1122057031680 bytes used, error(s) found
total csum bytes: 1088396968
total tree bytes: 6641614848
total fs tree bytes: 4897996800
total extent tree bytes: 541425664
btree space waste bytes: 1040216153
file data blocks allocated: 5041668685824
referenced 1470731497472
siducer@siduction:~$ sudo btrfs check -p -b /dev/nvme0n1p2
Opening filesystem to check...
Checking filesystem on /dev/nvme0n1p2
UUID: 678ea3a2-d45e-4198-a28a-3a7d93329e7f
[1/7] checking root items (0:00:07 elapsed, 5484866 items checked)
ref mismatch on [7601295360 8192] extent item 9, found 1elapsed, 401033 items checked)
[2/7] checking extents (0:00:24 elapsed, 405437 items checked)
ERROR: errors found in extent allocation tree or chunk allocation
[3/7] checking free space tree (0:00:01 elapsed, 1076 items checked)
[4/7] checking fs roots (0:01:46 elapsed, 297815 items checked)
[5/7] checking csums (without verifying data) (0:00:01 elapsed, 876800 items checked)
[6/7] checking root refs (0:00:00 elapsed, 59 items checked)
[7/7] checking quota groups skipped (not enabled on this FS)
found 1122057031680 bytes used, error(s) found
total csum bytes: 1088396968
total tree bytes: 6641614848
total fs tree bytes: 4897996800
total extent tree bytes: 541425664
btree space waste bytes: 1040216153
file data blocks allocated: 5041668685824
referenced 1470731497472
I have not tried --repair and --init-csum-tree/--init-extent-tree as they come with a lot of warnings I don't have that much experience with btrfs yet.
Can someone please help me out of this misery?
o/ Zombiefleischer