Opensuse 15.3 installed in a SSD
After a update the system reboots with errors (no X login…) I reboot again… grub error.
I plug the SSD in another computer, to make a backup of /home before trying to repair the fs
mount /dev/sdb2 /mnt
# btrfs subvolume list /mnt
ID 256 gen 33 top level 5 path @
ID 257 gen 63174 top level 256 path @/var
ID 258 gen 63171 top level 256 path @/usr/local
ID 259 gen 63158 top level 256 path @/tmp
ID 260 gen 56993 top level 256 path @/srv
ID 261 gen 58028 top level 256 path @/root
ID 262 gen 56993 top level 256 path @/opt
ID 263 gen 63171 top level 256 path @/home
ID 264 gen 26 top level 256 path @/boot/grub2/x86_64-efi
ID 265 gen 37476 top level 256 path @/boot/grub2/i386-pc
ID 266 gen 32 top level 256 path @/.snapshots
ID 267 gen 63172 top level 266 path @/.snapshots/1/snapshot
I mount root and home
# mount /dev/sdb2 -o subvol=@ /mnt
# mount /dev/sdb2 -o subvol=@/home /mnt/home
Then I do a compressed backup
tar -cv -I 'xz -2 -T0' -f /somewhere/home.tar.xz /mnt/home/*
It finish with errors although it creates the compressed file.
Then I check the fs
**andromeda:~ #** btrfs scrub start /mnt
scrub started on /mnt, fsid 2294e96a-9ccc-4e81-910b-002305654a08 (pid=2548)
**andromeda:~ #** btrfs scrub status /mnt
scrub status for 2294e96a-9ccc-4e81-910b-002305654a08
scrub started at Sat Jul 2 00:42:29 2022 and finished after 00:01:35
total bytes scrubbed: 25.84GiB with 21 errors
error details: verify=2 csum=19
corrected errors: 0, uncorrectable errors: 21, unverified errors: 0
Then I unmount the fs and
**andromeda:~ #** btrfs check /dev/sdb2
Opening filesystem to check...
Checking filesystem on /dev/sdb2
UUID: 2294e96a-9ccc-4e81-910b-002305654a08
[1/7] checking root items
[2/7] checking extents
ref mismatch on [1619607552 16384] extent item 95, found 1
ref mismatch on [1619623936 16384] extent item 24577, found 1
tree backref 1619623936 parent 267 root 267 not found in extent tree
backref 1619623936 root 351 not referenced back 0x5628bd13d780
incorrect global backref count on 1619623936 found 2 wanted 1
backpointer mismatch on [1619623936 16384]
tree backref 1619640320 parent 267 root 267 not found in extent tree
backref 1619640320 root 24843 not referenced back 0x5628bd13d880
incorrect global backref count on 1619640320 found 2 wanted 1
backpointer mismatch on [1619640320 16384]
ref mismatch on [17392717824 69632] extent item 816043786241, found 1
data backref 17392717824 root 267 owner 671118 offset 0 num_refs 0 not found in extent tree
incorrect local backref count on 17392717824 root 267 owner 671118 offset 0 found 1 wanted 0 back 0x5628bffb48e0
...... a lot of .......
backref disk bytenr does not match extent record, bytenr=17773072384, ref bytenr=0
backpointer mismatch on [17773072384 4096]
data backref 17773076480 parent 1619623936 owner 0 offset 0 num_refs 0 not found in extent tree
incorrect local backref count on 17773076480 parent 1619623936 owner 0 offset 0 found 1 wanted 0 back 0x5628c0a52500
incorrect local backref count on 17773076480 root 267 owner 317827 offset 0 found 0 wanted 1 back 0x5628bb6fe550
backref disk bytenr does not match extent record, bytenr=17773076480, ref bytenr=0
backpointer mismatch on [17773076480 8192]
data backref 17773084672 parent 1619623936 owner 0 offset 0 num_refs 0 not found in extent tree
incorrect local backref count on 17773084672 parent 1619623936 owner 0 offset 0 found 1 wanted 0 back 0x5628bfd2ef30
incorrect local backref count on 17773084672 root 267 owner 317828 offset 0 found 0 wanted 1 back 0x5628bb6fe680
backref disk bytenr does not match extent record, bytenr=17773084672, ref bytenr=0
backpointer mismatch on [17773084672 12288]
data backref 17773096960 parent 1619623936 owner 0 offset 0 num_refs 0 not found in extent tree
incorrect local backref count on 17773096960 parent 1619623936 owner 0 offset 0 found 1 wanted 0 back 0x5628b9580e90
incorrect local backref count on 17773096960 root 267 owner 317829 offset 0 found 0 wanted 1 back 0x5628bb6fe7b0
backref disk bytenr does not match extent record, bytenr=17773096960, ref bytenr=0
backpointer mismatch on [17773096960 4096]
ERROR: errors found in extent allocation tree or chunk allocation
[3/7] checking free space cache
[4/7] checking fs roots
warning line 3495
[5/7] checking only csums items (without verifying data)
[6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS)
found 27741847552 bytes used, error(s) found
total csum bytes: 22551584
total tree bytes: 619544576
total fs tree bytes: 543129600
total extent tree bytes: 44253184
btree space waste bytes: 114922539
file data blocks allocated: 34178977792
referenced 26964791296
**andromeda:~ #**
What next?