0

I have an encrypted LUKS partition, with btrfs for backups on it.

Kernel panic happened while system was mounted and performing receive/send operations during backup.

After restart no problem with LUKS itself, but on btrfs was found some errors and warnings:

btrfs ch -p /dev/mapper/bckp

Opening filesystem to check... Checking filesystem on /dev/mapper/bckp UUID: 4b793176-530a-4a82-b156-3363db035760 [1/7] checking root items (0:01:24 elapsed, 5200849 items checked) ref mismatch on [2351455076352 16384] extent item 0, found 1sed, 995581 items checked) tree backref 2351455076352 parent 6690 root 6690 not found in extent tree backpointer mismatch on [2351455076352 16384] [2/7] checking extents (0:04:33 elapsed, 997158 items checked) ERROR: errors found in extent allocation tree or chunk allocation [3/7] checking free space cache (0:00:30 elapsed, 4870 items checked) [4/7] checking fs roots (0:09:36 elapsed, 724856 items checked) [5/7] checking csums (without verifying data) (0:00:42 elapsed, 1691026 items checked) [6/7] checking root refs (0:00:00 elapsed, 223 items checked) [7/7] checking quota groups skipped (not enabled on this FS) found 3669056704512 bytes used, error(s) found total csum bytes: 3565923444 total tree bytes: 16333701120 total fs tree bytes: 11922030592 total extent tree bytes: 561364992 btree space waste bytes: 2285778795 file data blocks allocated: 49969135439872 referenced 5223974543360

I run it with another superblock or with backup of root tree like:

btrfs ch -p -s 1 /dev/mapper/bckp

btrfs ch -p -b /dev/mapper/bckp

But with exactly same result and figures. I didn't run the repair option because it is marked as dangerous.

Are these errors reparable? How can I save the filesystem?

0

1 Answer 1

1

Thanks Emmanuel Rosa for your comment, you've pointed me to the right direction.

After i run scrub on a mounted volume
btrfs sc start -Bd /dev/mapper/bckp

I've got this result:
scrub device /dev/mapper/bckp (id 1) done scrub started at Thu Sep 12 13:28:38 2019 and finished after 05:12:29 total bytes scrubbed: 3.02TiB with 0 errors

No errors or warnings in logs.

So I again run btrfs check and finally got clean output:
bf ch -p /dev/mapper/bckp Opening filesystem to check... Checking filesystem on /dev/mapper/bckp UUID: 4b793176-530a-4a82-b156-3363db035760 [1/7] checking root items (0:01:27 elapsed, 5102746 items checked) [2/7] checking extents (0:04:15 elapsed, 969366 items checked) [3/7] checking free space cache (0:00:32 elapsed, 4871 items checked) [4/7] checking fs roots (0:09:14 elapsed, 720718 items checked)ked) [5/7] checking csums (without verifying data) (0:00:29 elapsed, 1557593 items checked) [6/7] checking root refs (0:00:00 elapsed, 222 items checked) [7/7] checking quota groups skipped (not enabled on this FS) found 3308474904576 bytes used, no error found total csum bytes: 3214237436 total tree bytes: 15878373376 total fs tree bytes: 11854004224 total extent tree bytes: 553287680 btree space waste bytes: 2253478467 file data blocks allocated: 49609008967680 referenced 4863848071168

My software is:
btrfs version
btrfs-progs v4.19

uname -rom
4.19.57-gentoo x86_64 GNU/Linux`

So FS is clean and usable again without any warnings, thank you for helping me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .