Boot fails: btrfs errno=-17 Object already exists

On desktop I am running KDE Fedora 38. This issue seems to be similar to this one: Boot fails: btrfs errno=-17 Object already exists @victor-borges can you help me? When I boot the following error is shown:

Boot Error Message
[3.039669] BTRFS: error (device sda3: state A) in _btrfs_run_delayed_items: 1158: errno=-17 Object already exists 
[3.040269] BTRFS: error (device sda3: state EA) in btrfs_replay_log:2322: errno=-17 Object already exists (Failed to recover log tree) 
[FAILED] Failed to mount sysroot.mount - /sysroot. 
[DEPEND] Dependency failed for initrd-root-fs.target - Initrd Root File System. 
[DEPEND] Dependency failed for initrd-parse-etc.service -  Mountpoints Configured in the Real Root.

Generating "/run/initramfs/resosreport.txt"

Entering emergency mode. Exit the shell to continue. Type "Journalctl" to view system logs. You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot after mounting them and attach it to a bug report.

EDIT: Thanks to @chrismurphy I was able to use fedora once again without reinstalling. See solution below.

My understanding is, that there is a problem with the btrfs filesystem on my root partition (/dev/sda3). The error prevents the system from mounting the root partition and booting it up.

What I did:

  • Boot into live usb environment
  • After running btrfs check -p --readonly /dev/sda3 i get no error
  • I get the following error when trying to mount sudo mount /dev/sda3 /mnt:
Summary

ˋˋˋ
mount: /mnt: mount(2) system call failed: File exists.
dmesg(1) may have more information after falied mount system call.
ˋˋˋ

That means I am not able to use btrfs-rescue

Using the command dmesg -H I got this log:

dmesg

ˋˋˋ
[Sep21 12:35] Linux version 6.2.9-300.fc38.x86_64 (mockbuild@38f30b3c0c69453fae61718fc43f33bc) (gcc (GCC) 13.>

[ +0.000000] Command line: BOOT_IMAGE=/images/pxeboot/vmlinuz root=live:CDLABEL=Fedora-KDE-Live-38-1-6 rd.li>

[ +0.000000] x86/fpu: Supporting XSAVE feature 0x001: ‘x87 floating point registers’

[ +0.000000] x86/fpu: Supporting XSAVE feature 0x002: ‘SSE registers’

[ +0.000000] x86/fpu: Supporting XSAVE feature 0x004: ‘AVX registers’

[ +0.000000] x86/fpu: Supporting XSAVE feature 0x200: ‘Protection Keys User registers’

[ +0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256

[ +0.000000] x86/fpu: xstate_offset[9]: 832, xstate_sizes[9]: 8

[ +0.000000] x86/fpu: Enabled xstate features 0x207, context size is 840 bytes, using ‘compacted’ format.

[ +0.000000] signal: max sigframe size: 3376

[ +0.000000] BIOS-provided physical RAM map:

[ +0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009ffff] usable

[ +0.000000] BIOS-e820: [mem 0x00000000000a0000-0x00000000000fffff] reserved

[ +0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000009d81fff] usable

[ +0.000000] BIOS-e820: [mem 0x0000000009d82000-0x0000000009ffffff] reserved

[ +0.000000] BIOS-e820: [mem 0x000000000a000000-0x000000000a1fffff] usable

[ +0.000000] BIOS-e820: [mem 0x000000000a200000-0x000000000a20cfff] ACPI NVS

[ +0.000000] BIOS-e820: [mem 0x000000000a20d000-0x00000000bb0a0fff] usable

[ +0.000000] BIOS-e820: [mem 0x00000000bb0a1000-0x00000000bb0a1fff] reserved

[ +0.000000] BIOS-e820: [mem 0x00000000bb0a2000-0x00000000cad41fff] usable

[ +0.000000] BIOS-e820: [mem 0x00000000cad42000-0x00000000cb0a2fff] reserved

[ +0.000000] BIOS-e820: [mem 0x00000000cb0a3000-0x00000000cb106fff] ACPI data

[ +0.000000] BIOS-e820: [mem 0x00000000cb107000-0x00000000ccc06fff] ACPI NVS

[ +0.000000] BIOS-e820: [mem 0x00000000ccc07000-0x00000000cdbfefff] reserved

[ +0.000000] BIOS-e820: [mem 0x00000000cdbff000-0x00000000ceffffff] usable

[ +0.000000] BIOS-e820: [mem 0x00000000cf000000-0x00000000cfffffff] reserved

[ +0.000000] BIOS-e820: [mem 0x00000000f0000000-0x00000000f7ffffff] reserved

[ +0.000000] BIOS-e820: [mem 0x00000000fd200000-0x00000000fd2fffff] reserved

[ +0.000000] BIOS-e820: [mem 0x00000000fd400000-0x00000000fd4fffff] reserved

[ +0.000000] BIOS-e820: [mem 0x00000000fea00000-0x00000000fea0ffff] reserved

[ +0.000000] BIOS-e820: [mem 0x00000000feb80000-0x00000000fec01fff] reserved

[ +0.000000] BIOS-e820: [mem 0x00000000fec10000-0x00000000fec10fff] reserved

[ +0.000000] BIOS-e820: [mem 0x00000000fed00000-0x00000000fed00fff] reserved

[ +0.000000] BIOS-e820: [mem 0x00000000fed40000-0x00000000fed44fff] reserved

[ +0.000000] BIOS-e820: [mem 0x00000000fed80000-0x00000000fed8ffff] reserved

[ +0.000000] BIOS-e820: [mem 0x00000000fedc2000-0x00000000fedcffff] reserved

[ +0.000000] BIOS-e820: [mem 0x00000000fedd4000-0x00000000fedd5fff] reserved

[ +0.000000] BIOS-e820: [mem 0x00000000ff000000-0x00000000ffffffff] reserved

[ +0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000072e33ffff] usable

[ +0.000000] BIOS-e820: [mem 0x000000072e340000-0x000000082fffffff] reserved

[ +0.000000] NX (Execute Disable) protection: active

[ +0.000000] e820: update [mem 0xc39fc018-0xc3a0a057] usable ==> usable

[ +0.000000] e820: update [mem 0xc39fc018-0xc3a0a057] usable ==> usable

[ +0.000000] e820: update [mem 0xc39ee018-0xc39fb857] usable ==> usable

[ +0.000000] e820: update [mem 0xc39ee018-0xc39fb857] usable ==> usable

[ +0.000000] extended physical RAM map:

[ +0.000000] reserve setup_data: [mem 0x0000000000000000-0x000000000009ffff] usable

[ +0.000000] reserve setup_data: [mem 0x00000000000a0000-0x00000000000fffff] reserved

[ +0.000000] reserve setup_data: [mem 0x0000000000100000-0x0000000009d81fff] usable

[ +0.000000] reserve setup_data: [mem 0x0000000009d82000-0x0000000009ffffff] reserved

[ +0.000000] reserve setup_data: [mem 0x000000000a000000-0x000000000a1fffff] usable

[ +0.000000] reserve setup_data: [mem 0x000000000a200000-0x000000000a20cfff] ACPI NVS

[ +0.000000] reserve setup_data: [mem 0x000000000a20d000-0x00000000bb0a0fff] usable

[ +0.000000] reserve setup_data: [mem 0x00000000bb0a1000-0x00000000bb0a1fff] reserved

[ +0.000000] reserve setup_data: [mem 0x00000000bb0a2000-0x00000000c39ee017] usable

[ +0.000000] reserve setup_data: [mem 0x00000000c39ee018-0x00000000c39fb857] usable

[ +0.000000] reserve setup_data: [mem 0x00000000c39fb858-0x00000000c39fc017] usable

[ +0.000000] reserve setup_data: [mem 0x00000000c39fc018-0x00000000c3a0a057] usable

[ +0.000000] reserve setup_data: [mem 0x00000000c3a0a058-0x00000000cad41fff] usable

[ +0.000000] reserve setup_data: [mem 0x00000000cad42000-0x00000000cb0a2fff] reserved

[ +0.000000] reserve setup_data: [mem 0x00000000cb0a3000-0x00000000cb106fff] ACPI data

[ +0.000000] reserve setup_data: [mem 0x00000000cb107000-0x00000000ccc06fff] ACPI NVS

[ +0.000000] reserve setup_data: [mem 0x00000000ccc07000-0x00000000cdbfefff] reserved

[ +0.000000] reserve setup_data: [mem 0x00000000cdbff000-0x00000000ceffffff] usable

[ +0.000000] reserve setup_data: [mem 0x00000000cf000000-0x00000000cfffffff] reserved

[ +0.000000] reserve setup_data: [mem 0x00000000f0000000-0x00000000f7ffffff] reserved

[ +0.000000] reserve setup_data: [mem 0x00000000fd200000-0x00000000fd2fffff] reserved

[ +0.000000] reserve setup_data: [mem 0x00000000fd400000-0x00000000fd4fffff] reserved

[ +0.000000] reserve setup_data: [mem 0x00000000fea00000-0x00000000fea0ffff] reserved

[ +0.000000] reserve setup_data: [mem 0x00000000feb80000-0x00000000fec01fff] reserved

[ +0.000000] reserve setup_data: [mem 0x00000000fec10000-0x00000000fec10fff] reserved

[ +0.000000] reserve setup_data: [mem 0x00000000fed00000-0x00000000fed00fff] reserved

[ +0.000000] reserve setup_data: [mem 0x00000000fed40000-0x00000000fed44fff] reserved

[ +0.000000] reserve setup_data: [mem 0x00000000fed80000-0x00000000fed8ffff] reserved

[ +0.000000] reserve setup_data: [mem 0x00000000fedc2000-0x00000000fedcffff] reserved

[ +0.000000] reserve setup_data: [mem 0x00000000fedd4000-0x00000000fedd5fff] reserved

[ +0.000000] reserve setup_data: [mem 0x00000000ff000000-0x00000000ffffffff] reserved

[ +0.000000] reserve setup_data: [mem 0x0000000100000000-0x000000072e33ffff] usable

[ +0.000000] reserve setup_data: [mem 0x000000072e340000-0x000000082fffffff] reserved

[ +0.000000] efi: EFI v2.70 by American Megatrends

[ +0.000000] efi: ACPI=0xccbee000 ACPI 2.0=0xccbee014 TPMFinalLog=0xcbbb8000 SMBIOS=0xcda05000 MEMATTR=0xc84>

[ +0.000000] random: crng init done

[ +0.000000] efi: Remove mem331: MMIO range=[0xf0000000-0xf7ffffff] (128MB) from e820 map

[ +0.000000] e820: remove [mem 0xf0000000-0xf7ffffff] reserved

[ +0.000000] efi: Remove mem332: MMIO range=[0xfd200000-0xfd2fffff] (1MB) from e820 map

[ +0.000000] e820: remove [mem 0xfd200000-0xfd2fffff] reserved

[ +0.000000] efi: Remove mem333: MMIO range=[0xfd400000-0xfd4fffff] (1MB) from e820 map

[ +0.000000] e820: remove [mem 0xfd400000-0xfd4fffff] reserved

[ +0.000000] efi: Not removing mem334: MMIO range=[0xfea00000-0xfea0ffff] (64KB) from e820 map

[ +0.000000] efi: Remove mem335: MMIO range=[0xfeb80000-0xfec01fff] (0MB) from e820 map

[ +0.000000] e820: remove [mem 0xfeb80000-0xfec01fff] reserved

[ +0.000000] efi: Not removing mem336: MMIO range=[0xfec10000-0xfec10fff] (4KB) from e820 map

[ +0.000000] efi: Not removing mem337: MMIO range=[0xfed00000-0xfed00fff] (4KB) from e820 map

[ +0.000000] efi: Not removing mem338: MMIO range=[0xfed40000-0xfed44fff] (20KB) from e820 map

[ +0.000000] efi: Not removing mem339: MMIO range=[0xfed80000-0xfed8ffff] (64KB) from e820 map

[ +0.000000] efi: Not removing mem340: MMIO range=[0xfedc2000-0xfedcffff] (56KB) from e820 map

[ +0.000000] efi: Not removing mem341: MMIO range=[0xfedd4000-0xfedd5fff] (8KB) from e820 map

[ +0.000000] efi: Remove mem342: MMIO range=[0xff000000-0xffffffff] (16MB) from e820 map

[ +0.000000] e820: remove [mem 0xff000000-0xffffffff] reserved

[ +0.000000] secureboot: Secure boot disabled

[ +0.000000] SMBIOS 2.8 present.

[ +0.000004] btrfs_mount_root+0x477/0x550

[ +0.000002] legacy_get_tree+0x27/0x50

[ +0.000001] vfs_get_tree+0x25/0xd0

[ +0.000002] vfs_kern_mount.part.0+0x73/0xb0

[ +0.000001] btrfs_mount+0x149/0x430

[ +0.000001] ? cred_has_capability.isra.0+0xbc/0x170

[ +0.000002] legacy_get_tree+0x27/0x50

[ +0.000001] vfs_get_tree+0x25/0xd0

[ +0.000002] path_mount+0x49d/0xad0

[ +0.000001] __x64_sys_mount+0x116/0x150

[ +0.000002] do_syscall_64+0x5b/0x80

[ +0.000001] ? syscall_exit_to_user_mode+0x17/0x40

[ +0.000001] ? do_syscall_64+0x67/0x80

[ +0.000001] ? syscall_exit_to_user_mode+0x17/0x40

[ +0.000002] ? exc_page_fault+0x70/0x170

[ +0.000001] entry_SYSCALL_64_after_hwframe+0x72/0xdc

[ +0.000001] RIP: 0033:0x7f4fa7d17c9e

[ +0.000005] Code: 48 8b 0d 6d 11 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 3a 11 0c 00 f7 d8 64 89 01 48

[ +0.000001] RSP: 002b:00007ffd4a89a558 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5

[ +0.000001] RAX: ffffffffffffffda RBX: 00005635eec61550 RCX: 00007f4fa7d17c9e

[ +0.000001] RDX: 00005635eec68010 RSI: 00005635eec617a0 RDI: 00005635eec61780

[ +0.000000] RBP: 00007ffd4a89a680 R08: 0000000000000000 R09: 0000000000000007

[ +0.000000] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000

[ +0.000001] R13: 00005635eec61780 R14: 00005635eec68010 R15: 00007f4fa7e48076

[ +0.000001]

[ +0.000000] —[ end trace 0000000000000000 ]—

[ +0.000076] BTRFS error (device sda3: state EA): open_ctree failed
ˋˋˋ

In contrast to this issue Boot fails: btrfs errno=-17 Object already exists i only have one error: BTRFS error (device sda3: state EA): open_ctree failed

I then ran sudo btrfs check --check-data-csum -p /dev/sda3 and there are no errors:

btrfs check

ˋˋˋ
[liveuser@localhost-live ~]$ btrfs check --check-data-csum -p /dev/sda3

Opening filesystem to check…

ERROR: mount check: cannot open /dev/sda3: Permission denied

ERROR: could not check mount status: Permission denied

[liveuser@localhost-live ~]$ sudo btrfs check --check-data-csum -p /dev/sda3

Opening filesystem to check…

Checking filesystem on /dev/sda3

UUID: 12cf0bf3-cfd6-4d5e-8aeb-ec68cd2a6a4d

[1/7] checking root items (0:00:02 elapsed, 1588400 items checked)

[2/7] checking extents (0:00:25 elapsed, 259279 items checked)

[3/7] checking free space tree (0:00:00 elapsed, 184 items checked)

[4/7] checking fs roots (0:00:07 elapsed, 237343 items checked)

[5/7] checking csums against data (0:05:35 elapsed, 510628 items checked)

[6/7] checking root refs (0:00:00 elapsed, 346 items checked)

[7/7] checking quota groups skipped (not enabled on this FS)

found 122468433920 bytes used, no error found

total csum bytes: 114260504

total tree bytes: 4242259968

total fs tree bytes: 3908206592

total extent tree bytes: 173965312

btree space waste bytes: 853216110

file data blocks allocated: 2355198095360

referenced 187968995328

ˋˋˋ

After running lsblk -f you can see that partition two is mounted only sda3 is not mountable:

lsblk -f

ˋˋˋ
[liveuser@localhost-live ~]$ lsblk -f

NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS

loop0 squashfs 4.0
loop1 ext4 1.0 Anaconda 7b318fc8-839a-460c-b953-f3c40a7a9394
├─live-rw ext4 1.0 Anaconda 7b318fc8-839a-460c-b953-f3c40a7a9394 1.2G 83% /

└─live-base ext4 1.0 Anaconda 7b318fc8-839a-460c-b953-f3c40a7a9394 1.4G 81% /run/media/liveuser/Anaconda

loop2
└─live-rw ext4 1.0 Anaconda 7b318fc8-839a-460c-b953-f3c40a7a9394 1.2G 83% /

sda
├─sda1 vfat FAT32 C521-9F30
├─sda2 xfs a346b9fb-1913-4e06-992d-6191c9221c55 690.2M 28% /run/media/liveuser/a346b9fb-1913-4e06-992d-6191c9221c55

└─sda3 btrfs fedora_wladefant-pc 12cf0bf3-cfd6-4d5e-8aeb-ec68cd2a6a4d
sdb
└─sdb1 ntfs Personal 541A77671A7744D0
sdc
├─sdc1 exfat 1.0 Ventoy 4E21-0000
└─sdc2 vfat FAT16 VTOYEFI F767-A619
zram0 [SWAP]

nvme1n1
└─nvme1n1p1 ntfs M2 SSD 101C166A101C166A 457.3G 51% /run/media/liveuser/M2 SSD

nvme0n1
└─nvme0n1p1 ntfs A45C93AE5C9379AE 318.3G 32% /run/media/liveuser/A45C93AE5C9379AE

[liveuser@localhost-live ~]$

ˋˋˋ

now i tried to mount sda3 with uuid and got the same error message as before

Summary
[liveuser@localhost-live ~]$ sudo mount -t btrfs -o subvol=root,compress=zstd:1 UUID=12cf0bf3-cfd6-4d5e-8aeb-ec68cd2a6a4d /mnt

mount: /mnt: mount(2) system call failed: File exists.

       dmesg(1) may have more information after failed mount system call.

[liveuser@localhost-live ~]$ 




after doing smartctl i got some error messages, in contrast to @victor-borges :

smartctl full log
[liveuser@localhost-live ~]$ sudo smartctl -a /dev/sda

smartctl 7.3 2022-02-28 r5338 [x86_64-linux-6.2.9-300.fc38.x86_64] (local build)

Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org



=== START OF INFORMATION SECTION ===

Model Family:     Crucial/Micron Client SSDs

Device Model:     CT500MX500SSD1

Serial Number:    2030E2BB08C6

LU WWN Device Id: 5 00a075 1e2bb08c6

Firmware Version: M3CR023

User Capacity:    500,107,862,016 bytes [500 GB]

Sector Sizes:     512 bytes logical, 4096 bytes physical

Rotation Rate:    Solid State Device

Form Factor:      2.5 inches

TRIM Command:     Available

Device is:        In smartctl database 7.3/5417

ATA Version is:   ACS-3 T13/2161-D revision 5

SATA Version is:  SATA 3.3, 6.0 Gb/s (current: 6.0 Gb/s)

Local Time is:    Thu Sep 21 13:34:28 2023 EDT

SMART support is: Available - device has SMART capability.

SMART support is: Enabled



=== START OF READ SMART DATA SECTION ===

SMART overall-health self-assessment test result: PASSED



General SMART Values:

Offline data collection status:  (0x82) Offline data collection activity

                                        was completed without error.

                                        Auto Offline Data Collection: Enabled.

Self-test execution status:      (   0) The previous self-test routine completed

                                        without error or no self-test has ever  
                                        been run.

Total time to complete Offline  
data collection:                (    0) seconds.

Offline data collection

capabilities:                    (0x7b) SMART execute Offline immediate.

                                        Auto Offline data collection on/off support.

                                        Suspend Offline collection upon new

                                        command.

                                        Offline surface scan supported.

                                        Self-test supported.

                                        Conveyance Self-test supported.

                                        Selective Self-test supported.

SMART capabilities:            (0x0003) Saves SMART data before entering

                                        power-saving mode.

                                        Supports SMART auto save timer.

Error logging capability:        (0x01) Error logging supported.

                                        General Purpose Logging supported.

Short self-test routine  
recommended polling time:        (   2) minutes.

Extended self-test routine

recommended polling time:        (  30) minutes.

Conveyance self-test routine

recommended polling time:        (   2) minutes.

SCT capabilities:              (0x0031) SCT Status supported.

                                        SCT Feature Control supported.

                                        SCT Data Table supported.



SMART Attributes Data Structure revision number: 16

Vendor Specific SMART Attributes with Thresholds:

ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE

  1 Raw_Read_Error_Rate     0x002f   100   100   000    Pre-fail  Always       -       0

  5 Reallocate_NAND_Blk_Cnt 0x0032   100   100   010    Old_age   Always       -       0

  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       3702

 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       1613

171 Program_Fail_Count      0x0032   100   100   000    Old_age   Always       -       0

172 Erase_Fail_Count        0x0032   100   100   000    Old_age   Always       -       0

173 Ave_Block-Erase_Count   0x0032   093   093   000    Old_age   Always       -       111

174 Unexpect_Power_Loss_Ct  0x0032   100   100   000    Old_age   Always       -       109

180 Unused_Reserve_NAND_Blk 0x0033   000   000   000    Pre-fail  Always       -       46

183 SATA_Interfac_Downshift 0x0032   100   100   000    Old_age   Always       -       0

184 Error_Correction_Count  0x0032   100   100   000    Old_age   Always       -       0

187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0

194 Temperature_Celsius     0x0022   065   045   000    Old_age   Always       -       35 (Min/Max 0/55)

196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0

197 Current_Pending_ECC_Cnt 0x0032   100   100   000    Old_age   Always       -       0

198 Offline_Uncorrectable   0x0030   100   100   000    Old_age   Offline      -       0

199 UDMA_CRC_Error_Count    0x0032   100   100   000    Old_age   Always       -       0

202 Percent_Lifetime_Remain 0x0030   093   093   001    Old_age   Offline      -       7

206 Write_Error_Rate        0x000e   100   100   000    Old_age   Always       -       0

210 Success_RAIN_Recov_Cnt  0x0032   100   100   000    Old_age   Always       -       0

246 Total_LBAs_Written      0x0032   100   100   000    Old_age   Always       -       30765713089

247 Host_Program_Page_Count 0x0032   100   100   000    Old_age   Always       -       533786267

248 FTL_Program_Page_Count  0x0032   100   100   000    Old_age   Always       -       462395677



SMART Error Log Version: 1

ATA Error Count: 0

        CR = Command Register [HEX]

        FR = Features Register [HEX]

        SC = Sector Count Register [HEX]

        SN = Sector Number Register [HEX]

        CL = Cylinder Low Register [HEX]

        CH = Cylinder High Register [HEX]

        DH = Device/Head Register [HEX]

        DC = Device Command Register [HEX]

        ER = Error register [HEX]

        ST = Status register [HEX]

Powered_Up_Time is measured from power on, and printed as

DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,

SS=sec, and sss=millisec. It "wraps" after 49.710 days.



Error -4 occurred at disk power-on lifetime: 0 hours (0 days + 0 hours)

  When the command that caused the error occurred, the device was in an unknown state.



  After command completion occurred, registers were:

  ER ST SC SN CL CH DH

  -- -- -- -- -- -- --

  00 ec 00 00 00 00 00



  Commands leading to the command that caused the error were:

  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name

  -- -- -- -- -- -- -- --  ----------------  --------------------

  ec 00 00 00 00 00 00 00      00:00:00.000  IDENTIFY DEVICE

  ec 00 00 00 00 00 00 00      00:00:00.000  IDENTIFY DEVICE

  ec 00 00 00 00 00 00 00      00:00:00.000  IDENTIFY DEVICE

  ec 00 00 00 00 00 00 00      00:00:00.000  IDENTIFY DEVICE

  c8 00 00 00 00 00 00 00      00:00:00.000  READ DMA



SMART Self-test log structure revision number 1

Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error

# 1  Short offline       Completed without error       00%       786         -

# 2  Short offline       Completed without error       00%       779         -

# 3  Short offline       Completed without error       00%       718         -

# 4  Short offline       Completed without error       00%       716         -

# 5  Short offline       Completed without error       00%         0         -



SMART Selective self-test log data structure revision number 1

 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS

    1        0        0  Not_testing

    2        0        0  Not_testing

    3        0        0  Not_testing

    4        0        0  Not_testing

    5        0        0  Not_testing

Selective self-test flags (0x0):

  After scanning selected spans, do NOT read-scan remainder of disk.

If Selective self-test is pending on power-up, resume after 0 minute delay.



[liveuser@localhost-live ~]$ 




Error -4 occurred at disk power-on lifetime: 0 hours (0 days + 0 hours)

 When the command that caused the error occurred, the device was in an unknown state.



 After command completion occurred, registers were:

 ER ST SC SN CL CH DH

 -- -- -- -- -- -- --

 00 ec 00 00 00 00 00



 Commands leading to the command that caused the error were:

 CR FR SC SN CL CH DH DC  Powered_Up_Time Command/Feature_Name

 -- -- -- -- -- -- -- -- ---------------- --------------------

 ec 00 00 00 00 00 00 00   00:00:00.000 IDENTIFY DEVICE

 ec 00 00 00 00 00 00 00   00:00:00.000 IDENTIFY DEVICE

 ec 00 00 00 00 00 00 00   00:00:00.000 IDENTIFY DEVICE

 ec 00 00 00 00 00 00 00   00:00:00.000 IDENTIFY DEVICE

 c8 00 00 00 00 00 00 00   00:00:00.000 READ DMA

I am a nooby. Can someone guide me through the process?

2 Likes

You should be able to mount this file system using mount -o ro,rescue=nologreplay and it’s risk free. You can look around for some important files and even copy them out to a healthy alternative file system.

The long term fix issudo btrfs rescue zero-log. The tree log is an fsync optimization, so unlike other file systems, it’s OK to zero out the log although you will lose up to 1 minute of writes at the time the crash happened. You do not need to run btrfs check --readonly (though it doesn’t hurt anything, just be sure to run it on an unmounted file system or the results are invalid).

This is the 2nd time in just a few days I’ve read about log replay problems with kernel 6.2.9. I suggest upgrading the kernel to 6.4 or 6.5 series. There is a tree log bug that has recently been fixed but I’m not sure if it was ever fixed in 6.2 series, and also it’s end of life so you should upgrade.

Thank for that. That solved my problem. And to be clear I am on version 6.4 and always was. I update my system and all apps almost every day :wink: