Skip to contentSkip to conversation

Recovering from btrfsck --init-csum-tree

DISCUSSION Robin Kreis 1 participant 1 message Jun 4, 2013 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hello,

how can I recover from running btrfsck --init-csum-tree on my 2TB btrfs? Every attempt to read a file results in no checksum being found, followed by a checksum mismatch which leads to the data block being zeroed out (see label zeroit in inode.c). My current fix is simply skipping the whole checksum validation, which enables me to read my files again. I still think at least one of the following should happen:

1. Add a warning that --init-csum-tree is pretty desctructive.
2. Make --init-csum-tree mark all inodes with INODE_NODATASUM.
3. Have some global flag or mount option to disable CRC checks.

What do you think?