Corrupt BTRFS, or bad SSD?

Sis brought me brother-in-law’s 15.1 to fix, which was originally default 42.2 installation. That means BTRFS, which I’ve never touched before, much less fixed. I wanted to try to free some space. btrfs filesystem df / and /home indicate somewhere around 70% used each. I want to get rid of old snapshots anyway. Oldest is Nov 2016, newest 3 months ago, oldest 3 #s 0 1 74, newest 3 #s 91 92 93. mount -o remount,ro / doesn’t work. GUI won’t run due to RO, cannot load some theme.

dmesg says:

...10]...
systemd-journald[392]: File ... /system.journal: Journal file corrupted, rotating
EXT4-fs (sda1): mounting ext2 file system using the ext4 subsystem
EXT4-fs (sda1): mounted filesystem without journal. Opts: acl,user_attr
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
ata1.00: irq_stat 0x40000001
ata1.00: failed command: READ DMA
ata1.00: cmd c8/00:20:00:8a:08:00:00:00:00:00:e1 tag 25 dma 16384 in
         res 51:40:00:00:8a:08:00:00:00:00:00:e1 Emask 0x9 (media error)
ata1.00: status: { DRDY ERR }
ata1.00: error: { UNC }
ata1.00: configured for UDMA/100
sd 0:0:0:0: [sda] tag#25 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
sd 0:0:0:0: [sda] tag#25 Sense Key : Medium Error [current]
sd 0:0:0:0: [sda] tag#25 Add. Sense: Unrecovered read error - auto reallocate failed
sd 0:0:0:0: [sda] tag#25 Read(10) 28 00 01 08 8a 00 00 00 20 00
print_req_error: I/O error, dev sda, sector 17336832
BTRFS error (device sda2): bdev /dev/sda2 errs: wr 0, rd 822, flush 0, corrupt 6, gen 0
...
32]
systemd-journald[392]: File ... /user-1000.journal: corrupted or uncleanly shut down, renaming and replacing
BTRFS: warning  (device sda2): sda2 checksum verify failed on 12409634816 wanted 919E40F6 found BE01878F level 0
BTRFS: error (device sda2)in btrfs_run_delayed_refs:3088: errno=-5 IO failure
BTRFS: info (device sda2): forced readonly
BTRFS: warning (device sda2) sda2 checksum verify failed on 12393906176 wanted 87BA857 found 1AB5B5E level 0
nf_conntrack: default automatic helper assignment has been turned off for security reasons and CT-based firewall rule not found. Use the iptables CT target to attach helpers instead.
...
2714] BTRFS: info (device sda2): disk space caching is enabled

smartctl -x excerpts:

5 reallocated sector 0
9 power on hours 23161
175 bad cluster table count 30
192 unexpected power cycle 0
197 current pending sector 0
170 bad block count 51 231 57

Wow, lots of errors, log contains only most recent 256 included.

I hoped to be able to just install 15.1 fresh, but 15.1 first USB rescue boot wouldn’t let me mount BTRFS sda2 to recover files from /home. Neither would any 15.1 USB rescue boot assign an IP to the Realtek 8111/8168/8411NIC. I shutdown and replaced old blue Dell SATA cable with known SATA 3.0/6Gbps cable. blkid output seems normal. sda2 mounted without messages, but chrooted to it ‘snapper ls’ produces “Failure (dbus fatal exception).”

Now another reboot to SSD gave me RW /:

  # | Type   | Pre # | Date                     | User | Cleanup | Description           | Userdata     
----+--------+-------+--------------------------+------+---------+-----------------------+--------------
 0  | single |       |                          | root |         | current               |              
 1* | single |       | Sat Nov 12 00:31:11 2016 | root |         | first root filesystem |              
77  | pre    |       | Wed Feb  6 10:23:06 2019 | root | number  | zypp(packagekitd)     | important=yes
78  | post   |    77 | Wed Feb  6 10:51:47 2019 | root | number  |                       | important=yes
79  | pre    |       | Mon Nov 11 09:02:17 2019 | root | number  | zypp(packagekitd)     | important=yes
82  | pre    |       | Wed Nov 13 09:03:13 2019 | root | number  | yast repositories     |              
83  | pre    |       | Wed Nov 13 09:04:25 2019 | root | number  | yast online_update    |              
84  | post   |    83 | Wed Nov 13 09:04:48 2019 | root | number  |                       |              
85  | post   |    82 | Wed Nov 13 09:04:52 2019 | root | number  |                       |              
86  | pre    |       | Wed Nov 13 09:04:53 2019 | root | number  | yast online_update    |              
87  | pre    |       | Wed Nov 13 09:05:38 2019 | root | number  | zypp(ruby)            | important=yes
88  | post   |    87 | Wed Nov 13 09:23:23 2019 | root | number  |                       | important=yes
89  | post   |    86 | Wed Nov 13 10:38:36 2019 | root | number  |                       |              
90  | pre    |       | Wed Nov 13 10:56:35 2019 | root | number  | zypp(zypper)          | important=yes
91  | post   |    90 | Wed Nov 13 15:21:05 2019 | root | number  |                       | important=yes
92  | pre    |       | Thu Nov 14 20:13:32 2019 | root | number  | zypp(zypper)          | important=yes
93  | post   |    92 | Thu Nov 14 22:25:56 2019 | root | number  |                       | important=yes

Attempt to delete 77 fails. So does zypper ref, due to bad media attach point.

Current dmesg.

Now / has returned to RO, so can no longer redirect command output to nfs filesystem.

Is this Kingston 128GB SNV425S just trash? Did a bad(?) SATA cable result in corruption a fresh installation would fix? Is this candidate for rollback? If so, to which snapshot?

OT:
What’s it take to make dmesg output use only visible colors? Red on black is not visible without undue magnification.

You have unreadable sectors on your disk (I do not know if it is SSD) which can lead to filesystem corruption. Just how corrupted depends on exact sectors. I cannot comment on last dmesg because our proxy blocks dynamic IP.

Here is the dmesg:

https://paste.opensuse.org/23359365

…and here the SMART for the SSD:

https://paste.opensuse.org/16716640

:wink:

I posted links to the best BTRFS info I could find

https://en.opensuse.org/User:Tsu2

But,
To me your problem is that for some reason you’re trying to mount the fs as ext2.
General recommendation is that if you can’t find your answer in the links I provided (not likely), you should contact the BTRFS maintainers using one of the recommended channels .

TSU