Re: recover from BTRFS critical: corrupt leaf: invalid extent length
From: Bernhard Bock <hidden>
Date: 2021-06-30 16:36:14
From: Bernhard Bock <hidden>
Date: 2021-06-30 16:36:14
Hi, Bernhard Bock [off-list ref] wrote:
I found one of our servers with a read-only btrfs this morning. dmesg says: BTRFS critical (device dm-1): corrupt leaf: block=6404379377664 slot=66 extent bytenr=3138606432256 len=18446619972284938920 invalid extent length, have 18446619972284938920 expect aligned to 4096 ... BTRFS error (device dm-1): block=6404379377664 write time tree block corruption detected
looks like all is well. After a reboot, btrfsck didn't find any errors any more. Additionally, btfs-scrub also completed without errors. Seems like the write time btrfs corruption checks found everything before committing to disk. Possibly a memory error despite ECC RAM? To any future readers having similar problems: Do not trust any checks / log statements before reboot if you encounter possible btrfs corruption. All the best, Bernhard