4

For some unknown reasons, my BTRFS filesystem is corrupted. dmesg prints

BTRFS critical (device sda2): corrupt leaf, slot offset bad: block=43231330304,root=1, slot=47

(more than 1000x in the dmesg trace).

How to repair block #43231330304?

1

If the problem comes from a hard-drive failure (e.g. a bad block), it is not repairable.

To check for bad blocks: badblocks -n /dev/sdX

To know the corrupted files, see How to list files part of a BTRFS block?

0

To get information on a volume, btrfs device stats /MountPoint will give you plenty of hints on the state of the filesystem.

For an unmounted volume, btrfs check --repair /dev/TheDevice will check and repair the filesystem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.