Scenario:
I
have installed a test machine
Opensuse
Leap 15.3
Motherboard
Asustek M4A89TD
PRO USB3
CPU
AMD Athlon™ II X3 450 Processor
8
GB memory DDR3
Nvidia
GF108 [GeForce GT 630]
“Hard disk” Crucial CT1000P2SSD8 NVMe
M.2 1TB connected
through Mzhou M.2 SSD M-key NVM PCIe 3.0 x1 adapter
USB
3.1 flash drive Magic stealth 32GB
I installed leap 15.2 using the usb 3.1 for /boot and the M.2 for / (everything else).
The use of the usb for boot is because the motherboard is not capable of booting from the PCIe
The installation went fine, everything worked ok, then I left the system unused some weeks and leap 15.3 appeared, so I did a online upgrade, it worked fine to. I have been working with it testing with no error. But in some moment I began to have issues with the system becoming read only. I detected that the system was switching to RO when I was using firefox and I remembered I had changed firefox from the version in opensuse repos to the version in mozilla repo, then I was able to “resolve” the issues desinstalling firefox and installing it again (I switched back to the version in the opensuse repo, but once “solved” the error I switched again to the mozilla repo version with no errors). So it seems that firefox was installed in a trouble maker area of the disk and causing the issues.
So, here I am, the filesystem still has errors, and I’m trying to fix them
Booting the system and running smartctl
***pruebas:~ #**** smartctl --xall /dev/nvme0n1
smartctl 7.0 2019-05-21 r4917 [x86_64-linux-5.3.18-59.13-default] (SUSE RPM)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Number: CT1000P2SSD8
Serial Number: 2051E4DF0793
Firmware Version: P2CR031
PCI Vendor/Subsystem ID: 0xc0a9
IEEE OUI Identifier: 0x6479a7
Total NVM Capacity: 1,000,204,886,016 [1.00 TB]
Unallocated NVM Capacity: 0
Controller ID: 1
Number of Namespaces: 1
Namespace 1 Size/Capacity: 1,000,204,886,016 [1.00 TB]
Namespace 1 Formatted LBA Size: 512
Namespace 1 IEEE EUI-64: 6479a7 fff0000000
Local Time is: Wed Jul 21 20:22:03 2021 CEST
Firmware Updates (0x12): 1 Slot, no Reset required
Optional Admin Commands (0x0017): Security Format Frmw_DL Self_Test
Optional NVM Commands (0x005e): Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat Timestmp
Maximum Data Transfer Size: 64 Pages
Warning Comp. Temp. Threshold: 70 Celsius
Critical Comp. Temp. Threshold: 85 Celsius
Supported Power States
St Op Max Active Idle RL RT WL WT Ent_Lat Ex_Lat
0 + 3.50W - - 0 0 0 0 0 0
1 + 1.90W - - 1 1 1 1 0 0
2 + 1.50W - - 2 2 2 2 0 0
3 - 0.0700W - - 3 3 3 3 5000 1900
4 - 0.0020W - - 4 4 4 4 13000 100000
Supported LBA Sizes (NSID 0x1)
Id Fmt Data Metadt Rel_Perf
0 + 512 0 1
1 - 4096 0 0
=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
SMART/Health Information (NVMe Log 0x02)
Critical Warning: 0x00
Temperature: 45 Celsius
Available Spare: 100%
Available Spare Threshold: 5%
Percentage Used: 0%
Data Units Read: 438,752 [224 GB]
Data Units Written: 421,564 [215 GB]
Host Read Commands: 4,129,572
Host Write Commands: 2,210,069
Controller Busy Time: 75
Power Cycles: 79
Power On Hours: 173
Unsafe Shutdowns: 16
Media and Data Integrity Errors: 0
Error Information Log Entries: 0
Warning Comp. Temperature Time: 0
Critical Comp. Temperature Time: 0
Error Information (NVMe Log 0x01, max 16 entries)
No Errors Logged *
Then* booting the system with a rescue disk, and with btrfs 4.19.1
*
*#btrfs check --readonly --force /dev/nvme0n1p1*
*[1/7] checking root items*
*[2/7] checking extents*
*data backref 227831808 root 263 owner 7983 offset 0 num_refs 0 not found in extent tree*
*incorrect local backref count on 227831808 root 263 owner 7983 offset 0 found 1 wanted 0 back 0x5559e0ab7020*
*incorrect local backref count on 227831808 root 263 owner 140737488363311 offset 0 found 0 wanted 1 back 0x5559dde718d0*
*backref disk bytenr does not match extent record, bytenr=227831808, ref bytenr=0*
*backpointer mismatch on [227831808 4096]*
*ERROR: errors found in extent allocation tree or chunk allocation*
*[3/7] checking free space cache*
*[4/7] checking fs roots*
*[5/7] checking only csums items (without verifying data)*
*[6/7] checking root refs*
*[7/7] checking quota groups*
*Qgroup are marked as inconsistent.*
*Opening filesystem to check...*
*Checking filesystem on /dev/nvme0n1p1*
*UUID: 5b000355-3a1a-49f5-8005-f10668008aa7*
*Rescan hasn't been initialized, a difference in qgroup accounting is expected*
*found 51878920192 bytes used, error(s) found*
*total csum bytes: 48135312*
*total tree bytes: 991313920*
*total fs tree bytes: 885358592*
*total extent tree bytes: 48414720*
*btree space waste bytes: 151592274*
*file data blocks allocated: 239972728832*
*referenced 85539778560*
But I’m not sure what should be the next step. If I were using ext4 I will do a fsck to repair the fs, but reading the btrfs doc it seems the –repair option is dangerous.
I don’t really have important information in the system, I’m using it with a “test” user and I’m mounting my info filesystems from a remote system using sshfs, so worst case scenario I will have to reinstall the system and all the programs I installed.
I will appreciate any piece of advice.