[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fixing errors on a BTRFS partition?



Try this article
https://en.opensuse.org/SDB:BTRFS

On Thu, Jan 12, 2023, 5:43 AM Nate Bargmann <n0nb@n0nb.us> wrote:
I have a Freedom Box Pioneer (hardware is an Olimex A20-OLinuXino-LIME2
unit with a Samsung 128 GB micro-SD card.  The micro-SD is partitioned
into 2GB boot ext2 and the remainder as the root partition as BTRFS.

The thing has been crashing for months and now it started giving GPG
signature errors when trying to run 'apt update'.  I copied the entire
micro-SD card to an image file with dd so I have a backup.  Running
'btrfs check' resulted in a lot of errors so I ran the check and
directed the output to a file which is over 2MB in size!  The following
is a small snippet of what it in the file:

[1/7] checking root items
[2/7] checking extents
checksum verify failed on 2337062912 found 00000098 wanted 00000025
checksum verify failed on 2337062912 found 00000098 wanted 00000025
Csum didn't match
owner ref check failed [2337062912 16384]
ERROR: errors found in extent allocation tree or chunk allocation
[3/7] checking free space cache
[4/7] checking fs roots
checksum verify failed on 2337062912 found 00000098 wanted 00000025
checksum verify failed on 2337062912 found 00000098 wanted 00000025
Csum didn't match
root 11670 inode 1109704 errors 200, dir isize wrong
root 11670 inode 1109705 errors 2001, no inode item, link count wrong
        unresolved ref dir 1109704 index 2 namelen 4 name json filetype 1 errors 4, no inode ref
root 11670 inode 1109706 errors 2001, no inode item, link count wrong
        unresolved ref dir 1095383 index 2 namelen 11 name 20-json.ini filetype 7 errors 4, no inode ref
root 11670 inode 1109707 errors 2001, no inode item, link count wrong
        unresolved ref dir 978863 index 4 namelen 7 name apache2 filetype 2 errors 4, no inode ref
root 11670 inode 1109710 errors 2001, no inode item, link count wrong
        unresolved ref dir 1095409 index 2 namelen 11 name 20-json.ini filetype 7 errors 4, no inode ref
root 11670 inode 1109711 errors 2001, no inode item, link count wrong
        unresolved ref dir 978863 index 5 namelen 3 name fpm filetype 2 errors 4, no inode ref
root 11670 inode 1109714 errors 2001, no inode item, link count wrong
        unresolved ref dir 978864 index 30 namelen 4 name json filetype 1 errors 4, no inode ref
root 11670 inode 1109734 errors 2001, no inode item, link count wrong
        unresolved ref dir 45938 index 176 namelen 17 name gschemas.compiled filetype 1 errors 4, no inode ref
root 11670 inode 1109735 errors 2001, no inode item, link count wrong
        unresolved ref dir 6679 index 36 namelen 15 name giomodule.cache filetype 1 errors 4, no inode ref
root 11670 inode 1109771 errors 2001, no inode item, link count wrong
        unresolved ref dir 295871 index 242 namelen 24 name rsyslog.service.dsh-also filetype 1 errors 4, no inode ref
root 11670 inode 1109784 errors 2001, no inode item, link count wrong
        unresolved ref dir 978742 index 31 namelen 12 name readline.ini filetype 1 errors 4, no inode ref
.
.
.
ERROR: errors found in fs roots
Opening filesystem to check...
Checking filesystem on /dev/mmcblk0p2
UUID: ea375ed2-d6e7-49d4-9b19-a624ba09b96c
The following tree block(s) is corrupted in tree 11670:
        tree block bytenr: 6562955264, level: 1, node key: (1109704, 96, 3)
found 19331854402 bytes used, error(s) found
total csum bytes: 14201108
total tree bytes: 1242775552
total fs tree bytes: 1160757248
total extent tree bytes: 61292544
btree space waste bytes: 327420862
file data blocks allocated: 182356692992
 referenced 113920880640


Everything online hints that attempting repair is particularly
dangerous, but what else am I to do?  At the moment the system is pretty
much useless.

All insights appreciated.

- Nate

--
"The optimist proclaims that we live in the best of all
possible worlds.  The pessimist fears this is true."
Web: https://www.n0nb.us
Projects: https://github.com/N0NB
GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819


Reply to: