Btrfs corruption

Hello!

my btrfs nvme drive won’t mount by default.

I am able to mount -o ro,rescue=all and am copying files to external HD.

any way to save the filesystem? or is this a reinstall?

Or should I get a new nvme?

Thanks.

mount: /var/mnt: can't read superblock on /dev/nvme0n1p3.
       dmesg(1) may have more information after failed mount system call.

log:

[Sun Dec 17 12:06:01 2023] BTRFS: device label zen devid 1 transid 1417953 /dev/nvme0n1p3 scanned by mount (8215)
[Sun Dec 17 12:06:01 2023] BTRFS info (device nvme0n1p3): first mount of filesystem 5151b9c4-ab4b-4cfe-9199-0d753af5674b
[Sun Dec 17 12:06:01 2023] BTRFS info (device nvme0n1p3): using crc32c (crc32c-intel) checksum algorithm
[Sun Dec 17 12:06:01 2023] BTRFS info (device nvme0n1p3): enabling all of the rescue options
[Sun Dec 17 12:06:01 2023] BTRFS info (device nvme0n1p3): ignoring data csums
[Sun Dec 17 12:06:01 2023] BTRFS info (device nvme0n1p3): ignoring bad roots
[Sun Dec 17 12:06:01 2023] BTRFS info (device nvme0n1p3): disabling log replay at mount time
[Sun Dec 17 12:06:01 2023] BTRFS info (device nvme0n1p3): disk space caching is enabled
[Sun Dec 17 12:06:01 2023] BTRFS error (device nvme0n1p3: state C): parent transid verify failed on logical 2153008971776 mirror 1 wanted 1417917 found 1417954
[Sun Dec 17 12:06:01 2023] BTRFS info (device nvme0n1p3: state C): enabling ssd optimizations
[Sun Dec 17 12:06:01 2023] BTRFS info (device nvme0n1p3: state C): auto enabling async discard
                                                                                                                                                                                                                                                                                                            98,1          Bot

I tried a btrfs check:

sudo btrfs check /dev/nvme0n1p3
Opening filesystem to check...
parent transid verify failed on 2153008971776 wanted 1417917 found 1417954
parent transid verify failed on 2153008971776 wanted 1417917 found 1417954
Ignoring transid failure
parent transid verify failed on 2153009004544 wanted 1417917 found 1417954
parent transid verify failed on 2153009004544 wanted 1417917 found 1417954
Ignoring transid failure
ERROR: child eb corrupted: parent bytenr=1803075436544 item=313 parent level=1 child bytenr=2153009004544 child level=1
ERROR: failed to read block groups: Input/output error
ERROR: cannot open file system

I think the nvme is ok:

do smartctl -x /dev/nvme0n1
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.6.6-200.fc39.x86_64] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Number:                       WDS100T2X0C-00L350
Serial Number:                      184153801253
Firmware Version:                   101140WD
PCI Vendor/Subsystem ID:            0x15b7
IEEE OUI Identifier:                0x001b44
Total NVM Capacity:                 1,000,204,886,016 [1.00 TB]
Unallocated NVM Capacity:           0
Controller ID:                      8215
NVMe Version:                       1.3
Number of Namespaces:               1
Namespace 1 Size/Capacity:          1,000,204,886,016 [1.00 TB]
Namespace 1 Formatted LBA Size:     4096
Namespace 1 IEEE EUI-64:            001b44 8b4462da3a
Local Time is:                      Sun Dec 17 11:50:44 2023 MST
Firmware Updates (0x14):            2 Slots, no Reset required
Optional Admin Commands (0x0017):   Security Format Frmw_DL Self_Test
Optional NVM Commands (0x001f):     Comp Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat
Log Page Attributes (0x02):         Cmd_Eff_Lg
Maximum Data Transfer Size:         128 Pages
Warning  Comp. Temp. Threshold:     80 Celsius
Critical Comp. Temp. Threshold:     85 Celsius
Namespace 1 Features (0x02):        NA_Fields

Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     6.00W       -        -    0  0  0  0        0       0
 1 +     3.50W       -        -    1  1  1  1        0       0
 2 +     3.00W       -        -    2  2  2  2        0       0
 3 -   0.1000W       -        -    3  3  3  3     4000   10000
 4 -   0.0025W       -        -    4  4  4  4     4000   45000

Supported LBA Sizes (NSID 0x1)
Id Fmt  Data  Metadt  Rel_Perf
 0 -     512       0         2
 1 +    4096       0         1

=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

SMART/Health Information (NVMe Log 0x02)
Critical Warning:                   0x00
Temperature:                        31 Celsius
Available Spare:                    100%
Available Spare Threshold:          10%
Percentage Used:                    0%
Data Units Read:                    841,598,189 [430 TB]
Data Units Written:                 142,948,893 [73.1 TB]
Host Read Commands:                 3,865,050,909
Host Write Commands:                1,807,775,333
Controller Busy Time:               11,822
Power Cycles:                       377
Power On Hours:                     42,361
Unsafe Shutdowns:                   74
Media and Data Integrity Errors:    0
Error Information Log Entries:      2,861

Can you post btrfs insp dump-s -fa /dev/nvme0n1p3 to help see the feature flags and the backup roots. The file system transid is pretty high so this file system has been working for a while up to this point. This file system hasn’t been converted to/from bg tree has it?

Thanks for the offer, but I re-installed Kinoite 39 and re-formatted the nvme’s btrfs using defaults.

From memory, the original was not converted.