I upgraded my kernel from 6.11.10 to 6.12.8. Now I’m getting “corrupt leaf” errors from btrfs and the filesystem boots in read-only mode. Booting back into kernel 6.11.10 still works fine.
I already did the following troubleshooting steps:
Try running kernel 6.13.0-rc7
Boot kernel 6.12.8 with nvidia drivers disabled
The issue is 100% reproducible the 6.13 and 6.12 kernels and never happened on 6.11. I’m afraid to install another kernel, since my computer only keeps the last 3 kernels and 6.11 will be kicked out. But I want to be able to upgrade my system again.
Attached are journal logs for the different boots that I’ve tried. Let me know if any other information is needed or if you know any troubleshooting steps that I can take.
Edit: I couldn’t figure out how to upload text files, so uploaded the logs here.
Thank you for the pointer. Now dnf doesn’t want to remove the kernel anymore. While I’m trying to update I discovered another problem that might be related. Dnf pointed out that there were some packages with broken dependencies. I recently uninstalled the nvidia cuda drivers following the instructions from nvidia’s website. Maybe that could be related. How can I fix this version conflict?
dnf update
Problem 1: package xorg-x11-drv-nvidia-xorg-libs-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates requires xorg-x11-drv-nvidia(x86-64) = 3:565.77, but none of the providers can be installed
cannot install the best update candidate for package xorg-x11-drv-nvidia-xorg-libs-3:560.35.03-5.fc40.x86_64
package xorg-x11-drv-nvidia-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
Problem 2: package xorg-x11-drv-nvidia-power-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates requires xorg-x11-drv-nvidia(x86-64) = 3:565.77, but none of the providers can be installed
cannot install the best update candidate for package xorg-x11-drv-nvidia-power-3:560.35.03-5.fc40.x86_64
package xorg-x11-drv-nvidia-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
Problem 3: package akmod-nvidia-3:565.77-1.fc40.x86_64 from rpmfusion-nonfree-updates requires nvidia-kmod-common >= 3:565.77, but none of the providers can be installed
cannot install the best update candidate for package akmod-nvidia-3:560.35.03-1.fc40.x86_64
package xorg-x11-drv-nvidia-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
Problem 4: package nvidia-settings-3:560.35.05-1.fc39.x86_64 from cuda-fedora39-x86_64 requires nvidia-driver(x86-64) = 3:560.35.05, but none of the providers can be installed
package nvidia-driver-3:560.35.05-1.fc39.x86_64 from cuda-fedora39-x86_64 conflicts with xorg-x11-drv-nvidia provided by xorg-x11-drv-nvidia-3:560.35.03-5.fc40.x86_64 from @System
cannot install the best update candidate for package nvidia-settings-3:560.35.03-1.fc40.x86_64
problem with installed package xorg-x11-drv-nvidia-3:560.35.03-5.fc40.x86_64
Problem 5: package qgnomeplatform-qt5-0.9.2-18.fc40.x86_64 from @System requires qgnomeplatform-common = 0.9.2-18.fc40, but none of the providers can be installed
package qt6-qtbase-common-6.8.1-11.fc40.noarch from updates obsoletes qgnomeplatform-common <= 0.9.3 provided by qgnomeplatform-common-0.9.2-18.fc40.noarch from @System
package qt6-qtbase-common-6.8.1-11.fc40.noarch from updates obsoletes qgnomeplatform-common <= 0.9.3 provided by qgnomeplatform-common-0.9.2-18.fc40.noarch from updates
cannot install the best update candidate for package qgnomeplatform-qt5-0.9.2-18.fc40.x86_64
cannot install the best update candidate for package qgnomeplatform-common-0.9.2-18.fc40.noarch
Problem 6: package akmod-nvidia-3:560.35.03-1.fc40.x86_64 from @System requires xorg-x11-drv-nvidia-kmodsrc = 3:560.35.03, but none of the providers can be installed
problem with installed package akmod-nvidia-3:560.35.03-1.fc40.x86_64
cannot install both xorg-x11-drv-nvidia-kmodsrc-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates and xorg-x11-drv-nvidia-kmodsrc-3:560.35.03-5.fc40.x86_64 from @System
package akmod-nvidia-3:565.77-1.fc40.x86_64 from rpmfusion-nonfree-updates requires nvidia-kmod-common >= 3:565.77, but none of the providers can be installed
cannot install the best update candidate for package xorg-x11-drv-nvidia-kmodsrc-3:560.35.03-5.fc40.x86_64
package xorg-x11-drv-nvidia-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
Problem 7: package xorg-x11-drv-nvidia-xorg-libs-3:560.35.03-5.fc40.x86_64 from @System requires libnvidia-glcore.so.560.35.03()(64bit), but none of the providers can be installed
package xorg-x11-drv-nvidia-xorg-libs-3:560.35.03-5.fc40.x86_64 from @System requires libnvidia-tls.so.560.35.03()(64bit), but none of the providers can be installed
problem with installed package xorg-x11-drv-nvidia-xorg-libs-3:560.35.03-5.fc40.x86_64
cannot install both xorg-x11-drv-nvidia-libs-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates and xorg-x11-drv-nvidia-libs-3:560.35.03-5.fc40.x86_64 from @System
package nvidia-driver-libs-3:560.35.03-1.fc39.x86_64 from cuda-fedora39-x86_64 conflicts with xorg-x11-drv-nvidia-libs provided by xorg-x11-drv-nvidia-libs-3:565.77-3.fc40.i686 from rpmfusion-nonfree-updates
package xorg-x11-drv-nvidia-xorg-libs-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates requires xorg-x11-drv-nvidia(x86-64) = 3:565.77, but none of the providers can be installed
cannot install the best update candidate for package xorg-x11-drv-nvidia-libs-3:560.35.03-5.fc40.x86_64
cannot install the best update candidate for package xorg-x11-drv-nvidia-libs-3:560.35.03-5.fc40.i686
package xorg-x11-drv-nvidia-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
Problem 8: package xorg-x11-drv-nvidia-power-3:560.35.03-5.fc40.x86_64 from @System requires xorg-x11-drv-nvidia(x86-64) = 3:560.35.03, but none of the providers can be installed
package xorg-x11-drv-nvidia-3:560.35.03-5.fc40.x86_64 from @System requires nvidia-modprobe(x86-64) = 3:560.35.03, but none of the providers can be installed
problem with installed package xorg-x11-drv-nvidia-power-3:560.35.03-5.fc40.x86_64
cannot install both nvidia-modprobe-3:560.35.05-1.fc39.x86_64 from cuda-fedora39-x86_64 and nvidia-modprobe-3:560.35.03-1.fc40.x86_64 from @System
cannot install both nvidia-modprobe-3:560.35.05-1.fc39.x86_64 from cuda-fedora39-x86_64 and nvidia-modprobe-3:560.35.03-1.fc39.x86_64 from cuda-fedora39-x86_64
package xorg-x11-drv-nvidia-power-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates requires xorg-x11-drv-nvidia(x86-64) = 3:565.77, but none of the providers can be installed
cannot install the best update candidate for package nvidia-modprobe-3:560.35.03-1.fc40.x86_64
package xorg-x11-drv-nvidia-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
Problem 9: problem with installed package qgnomeplatform-qt5-0.9.2-18.fc40.x86_64
package qgnomeplatform-qt5-0.9.2-18.fc40.x86_64 from @System requires qgnomeplatform-common = 0.9.2-18.fc40, but none of the providers can be installed
package qgnomeplatform-qt5-0.9.2-18.fc40.x86_64 from updates requires qgnomeplatform-common = 0.9.2-18.fc40, but none of the providers can be installed
package qt6-qtbase-common-6.8.1-11.fc40.noarch from updates obsoletes qgnomeplatform-common <= 0.9.3 provided by qgnomeplatform-common-0.9.2-18.fc40.noarch from @System
package qt6-qtbase-common-6.8.1-11.fc40.noarch from updates obsoletes qgnomeplatform-common <= 0.9.3 provided by qgnomeplatform-common-0.9.2-18.fc40.noarch from updates
cannot install the best update candidate for package qt6-qtbase-common-6.7.2-6.fc40.noarch
(…)
Skipping packages with conflicts:
(add ‘–best --allowerasing’ to command line to force their upgrade):
nvidia-driver x86_64 3:560.35.05-1.fc39 cuda-fedora39-x86_64 6.1 M
nvidia-driver-libs x86_64 3:560.35.03-1.fc39 cuda-fedora39-x86_64 150 M
nvidia-modprobe x86_64 3:560.35.03-1.fc39 cuda-fedora39-x86_64 29 k
nvidia-modprobe x86_64 3:560.35.05-1.fc39 cuda-fedora39-x86_64 29 k
xorg-x11-drv-nvidia-kmodsrc x86_64 3:565.77-3.fc40 rpmfusion-nonfree-updates 57 M
xorg-x11-drv-nvidia-libs i686 3:565.77-3.fc40 rpmfusion-nonfree-updates 36 M
xorg-x11-drv-nvidia-libs x86_64 3:565.77-3.fc40 rpmfusion-nonfree-updates 67 M
Skipping packages with broken dependencies:
akmod-nvidia x86_64 3:565.77-1.fc40 rpmfusion-nonfree-updates 40 k
nvidia-settings x86_64 3:560.35.05-1.fc39 cuda-fedora39-x86_64 816 k
xorg-x11-drv-nvidia-power x86_64 3:565.77-3.fc40 rpmfusion-nonfree-updates 104 k
xorg-x11-drv-nvidia-xorg-libs x86_64 3:565.77-3.fc40 rpmfusion-nonfree-updates 2.3 M
Error:
Problem 1: cannot install the best update candidate for package xorg-x11-drv-nvidia-xorg-libs-3:560.35.03-5.fc40.x86_64
problem with installed package xorg-x11-drv-nvidia-xorg-libs-3:560.35.03-5.fc40.x86_64
package xorg-x11-drv-nvidia-xorg-libs-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates requires xorg-x11-drv-nvidia(x86-64) = 3:565.77, but none of the providers can be installed
package xorg-x11-drv-nvidia-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
Problem 2: cannot install the best update candidate for package xorg-x11-drv-nvidia-power-3:560.35.03-5.fc40.x86_64
problem with installed package xorg-x11-drv-nvidia-power-3:560.35.03-5.fc40.x86_64
package xorg-x11-drv-nvidia-power-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates requires xorg-x11-drv-nvidia(x86-64) = 3:565.77, but none of the providers can be installed
package xorg-x11-drv-nvidia-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
Problem 3: cannot install the best update candidate for package akmod-nvidia-3:560.35.03-1.fc40.x86_64
problem with installed package akmod-nvidia-3:560.35.03-1.fc40.x86_64
package akmod-nvidia-3:565.77-1.fc40.x86_64 from rpmfusion-nonfree-updates requires nvidia-kmod-common >= 3:565.77, but none of the providers can be installed
package xorg-x11-drv-nvidia-3:565.77-3.fc40.x86_64 from rpmfusion-nonfree-updates is filtered out by modular filtering
(try to add ‘–skip-broken’ to skip uninstallable packages)
I’m not really sure, I see you have repo
“cuda-fedora39-x86_64”
installed, when you are on F40, so surely that is wrong. Did you delete the repos as it says on the Nvidia page you linked?
There was a change in btrfs to better detect file system corruption in 6.12.
What you are seeing is that the 6.12, correctly, detected that cortiption.
When you boot to 6.11 the problem is still present, but no detected.
You will need to run the tools to fix the issues in your file system.
I’m not an expert on fixing btrfs. Maybe raise a new topic asking for that help?
As an aside, DNF will never remove a kernel that you boot with.
So if you boot with the 6.11 kernel dnf will not remove it.
The nvidia.com drivers have lead to issues as they are not built for Fedora.
We recommend using the rpmfusion nvidia drivers that are a very good fix for Fedora.
You seem stuck on the nvidia 560 driver, probably because you installed it from the cuda-fedora39-x86_64 repo.
While I am unsure why that would affect the btrfs file system and cause read-only boots, I an say with reasonable certainty that drivers installed from that repo may not properly work on fedora (particularly the older drivers with the newer kernels).
It has always been my suggestion to remove all drivers installed from nvidia (the cuda-fedora39 repo) and to reinstall the nvidia drivers (including cuda ) from the rpmfusion repo.
You can see exactly what was installed from that repo with sudo dnf list --installed \*nvidia\*. If there are any packages installed from cuda-fedora39 they can be removed with sudo dnf remove \*nvidia\* --exclude nvidia-gpu-firmware then the packages from rpmfusion can be installed with sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda --disablerepo=cuda-fedora39*
Thank you for all the answers. There was indeed something weird with my nvidia driver installation. I’ve managed to fix this. I removed the nvidia drivers with sudo dnf remove \*nvidia\* --exclude nvidia-gpu-firmware and removed the cuda-fedora39 repo. Then when I wanted to install dnf told me that it was filtering out some of the nvidia packages, so I had to disable nvidia-driver dnf module, sudo dnf module disable nvidia-driver. Then I reinstalled the drivers.
I didn’t dare to do the autoremove as there seemed to be some important packages in there (I’m running fedora kde version)
dnf autoremove
Last metadata expiration check: 0:10:57 ago on di 04 feb 2025 10:44:40 CET.
Dependencies resolved.
================================================================================================================================
Package Architecture Version Repository Size
================================================================================================================================
Removing:
SDL2_ttf x86_64 2.22.0-2.fc40 @fedora 90 k
akonadi-notes x86_64 24.08.3-1.fc40 @updates 125 k
anaconda-user-help noarch 26.2-6.fc39 @fedora 577 k
bcache-tools x86_64 1.1-7.fc40 @fedora 156 k
clang13-libs x86_64 13.0.1-6.fc40 @fedora 96 M
clang13-resource-filesystem x86_64 13.0.1-6.fc40 @fedora 0
clang15-libs x86_64 15.0.7-7.fc40 @fedora 96 M
clang15-resource-filesystem x86_64 15.0.7-7.fc40 @fedora 0
clang16-libs x86_64 16.0.6-8.fc40 @updates 102 M
compat-ffmpeg4 x86_64 4.4.5-1.fc40 @rpmfusion-free-updates 19 M
createrepo_c x86_64 1.2.0-2.fc40 @updates 195 k
createrepo_c-libs x86_64 1.2.0-2.fc40 @updates 274 k
dbus-glib x86_64 0.112-8.fc40 @fedora 367 k
dejavu-sans-mono-fonts noarch 2.37-23.fc40 @fedora 1.2 M
dejavu-serif-fonts noarch 2.37-23.fc40 @fedora 3.3 M
drpm x86_64 0.5.2-5.fc40 @fedora 132 k
enchant x86_64 1:1.6.0-35.fc40 @updates 152 k
f36-backgrounds-base noarch 36.1.1-4.fc39 @fedora 7.4 M
f36-backgrounds-kde noarch 36.1.1-4.fc39 @fedora 2.8 k
f37-backgrounds-base noarch 37.0.5-2.fc39 @fedora 6.9 M
f37-backgrounds-kde noarch 37.0.5-2.fc39 @fedora 4.6 k
f38-backgrounds-base noarch 38.1.1-2.fc39 @fedora 11 M
f38-backgrounds-kde noarch 38.1.1-2.fc39 @fedora 4.7 k
f39-backgrounds-base noarch 39.0.5-3.fc40 @fedora 15 M
f39-backgrounds-kde noarch 39.0.5-3.fc40 @fedora 5.0 k
fontawesome-fonts-web noarch 1:6.7.2-1.fc40 @updates 22 M
fontawesome4-fonts noarch 1:4.7.0-22.fc40 @fedora 297 k
fontawesome4-fonts-web noarch 1:4.7.0-22.fc40 @fedora 989 k
foot-terminfo x86_64 1.20.2-1.fc40 @updates 9.1 k
freerdp x86_64 2:3.10.3-2.fc40 @updates 1.5 M
gcc-gdb-plugin x86_64 14.2.1-3.fc40 @updates 325 k
gdisk x86_64 1.0.10-1.fc40 @fedora 772 k
grantlee-qt5 x86_64 5.3.1-4.fc40 @fedora 1.0 M
gtk2-immodule-xim x86_64 2.24.33-18.fc40 @fedora 40 k
gtk3-immodule-xim x86_64 3.24.43-1.fc40 @updates 40 k
guile22 x86_64 2.2.7-11.fc40 @fedora 44 M
gvisor-tap-vsock x86_64 6:0.8.2-1.fc40 @updates 11 M
gvisor-tap-vsock-gvforwarder x86_64 6:0.8.2-1.fc40 @updates 5.0 M
ibus-gtk4 x86_64 1.5.30-7.fc40 @updates 44 k
iceauth x86_64 1.0.9-7.fc40 @fedora 43 k
info x86_64 7.1-2.fc40 @fedora 358 k
intel-media-driver x86_64 24.2.5-1.fc40 @rpmfusion-nonfree-updates 34 M
isl x86_64 0.16.1-20.fc40 @fedora 3.0 M
javascriptcoregtk4.0 x86_64 2.46.5-1.fc40 @updates 28 M
js-backbone noarch 1.3.3-18.fc40 @fedora 134 k
js-jquery noarch 3.7.1-3.fc40 @fedora 532 k
js-marked noarch 2.0.0-8.fc40 @fedora 144 k
js-underscore noarch 1.13.1-8.fc40 @fedora 129 k
kalarm x86_64 24.12.1-1.fc40 @updates 14 M
kcolorpicker x86_64 0.3.0-2.fc40 @fedora 85 k
kde4-filesystem x86_64 5-3.fc40 @fedora 1.7 k
kdsoap x86_64 2.2.0-4.fc40 @fedora 377 k
keybinder3 x86_64 0.3.2-18.fc40 @fedora 32 k
kf5-akonadi-calendar-libs x86_64 23.08.5-1.fc40 @fedora 2.6 M
kf5-akonadi-contacts-libs x86_64 23.08.5-1.fc40 @fedora 2.3 M
kf5-akonadi-mime-libs x86_64 23.08.5-1.fc40 @fedora 927 k
kf5-akonadi-notes x86_64 23.08.5-1.fc40 @fedora 123 k
kf5-akonadi-search-libs x86_64 23.08.5-1.fc40 @fedora 496 k
kf5-baloo x86_64 5.116.0-1.fc40 @updates 963 k
kf5-calendarsupport x86_64 23.08.5-1.fc40 @fedora 3.3 M
kf5-eventviews x86_64 23.08.5-1.fc40 @fedora 3.0 M
kf5-grantleetheme x86_64 23.08.5-2.fc40 @updates 269 k
kf5-incidenceeditor x86_64 23.08.5-1.fc40 @fedora 2.8 M
kf5-kcalendarcore x86_64 1:5.116.0-1.fc40 @updates 830 k
kf5-kcalendarutils x86_64 23.08.5-1.fc40 @fedora 1.8 M
kf5-kdav x86_64 1:5.116.0-1.fc40 @updates 410 k
kf5-kdnssd x86_64 5.116.0-1.fc40 @updates 221 k
kf5-kimageformats x86_64 5.116.0-1.fc40 @updates 958 k
kf5-kimap x86_64 23.08.5-1.fc40 @fedora 759 k
kf5-kirigami2-addons x86_64 1:0.11.0-4.fc40 @fedora 1.0 M
kf5-kitinerary x86_64 23.08.5-1.fc40 @fedora 3.3 M
kf5-kldap x86_64 23.08.5-1.fc40 @fedora 766 k
kf5-kmailtransport x86_64 23.08.5-5.fc40 @updates 1.0 M
kf5-kmbox x86_64 23.08.5-1.fc40 @fedora 121 k
kf5-kmime x86_64 23.08.5-1.fc40 @fedora 593 k
kf5-kontactinterface x86_64 23.08.5-1.fc40 @fedora 247 k
kf5-kpkpass x86_64 23.08.5-1.fc40 @fedora 130 k
kf5-kross-core x86_64 5.116.0-1.fc40 @updates 1.0 M
kf5-ksmtp x86_64 23.08.5-1.fc40 @fedora 240 k
kf5-ktnef x86_64 23.08.5-1.fc40 @fedora 645 k
kf5-libgravatar x86_64 23.08.5-1.fc40 @fedora 181 k
kf5-libkcddb x86_64 23.08.5-1.fc40 @fedora 284 k
kf5-libkdcraw x86_64 23.08.5-1.fc40 @fedora 115 k
kf5-libkdepim x86_64 23.08.5-1.fc40 @fedora 346 k
kf5-libkgapi x86_64 23.08.5-1.fc40 @fedora 2.7 M
kf5-libkleo-libs x86_64 23.08.5-1.fc40 @fedora 1.4 M
kf5-mailcommon x86_64 23.08.5-1.fc40 @fedora 3.8 M
kf5-mailimporter x86_64 23.08.5-1.fc40 @fedora 1.6 M
kf5-mailimporter-akonadi x86_64 23.08.5-1.fc40 @fedora 57 k
kf5-messagelib-libs x86_64 23.08.5-1.fc40 @fedora 12 M
kf5-modemmanager-qt x86_64 5.116.0-1.fc40 @updates 591 k
kf5-pimcommon x86_64 23.08.5-1.fc40 @fedora 1.8 M
kf5-pimcommon-akonadi x86_64 23.08.5-1.fc40 @fedora 28 k
kimageannotator x86_64 0.7.0-3.fc40 @fedora 1.3 M
konsole5-part x86_64 23.08.5-1.fc40 @fedora 2.5 M
kwayland-integration x86_64 6.2.5-1.fc40 @updates 211 k
kwayland-server x86_64 5.24.5-6.fc40 @fedora 1.5 M
libXISF x86_64 0.2.12-1.fc40 @updates 437 k
libappstream-glib x86_64 0.8.3-1.fc40 @updates 1.4 M
(....)
wlroots x86_64 0.18.2-1.fc40 @updates 1.1 M
wlroots0.15 x86_64 0.15.1-3.fc39 @fedora 881 k
wlroots0.16 x86_64 0.16.2-2.fc40 @fedora 1.0 M
wpebackend-fdo x86_64 1.14.2-3.fc40 @fedora 93 k
xorg-x11-fonts-ISO8859-1-100dpi noarch 7.5-38.fc40 @fedora 1.0 M
xsetroot x86_64 1.1.2-10.fc40 @fedora 27 k
yelp x86_64 2:42.2-5.fc40 @fedora 2.2 M
yelp-libs x86_64 2:42.2-5.fc40 @fedora 311 k
yelp-xsl noarch 42.1-4.fc40 @fedora 1.4 M
Transaction Summary
================================================================================================================================
Remove 239 Packages
Freed space: 1.3 G
Is this ok [y/N]:
However, when I boot into the latest kernel, it still has a read-only filesystem. I don’t see anything in journalctl -b that tell me why. If it helps I can extract another journalctl log.
It seems reasonable to assume that btrfs found some corruption in my filesystem that it only finds in a newer version. But when I run a btrfs scrub on the working kernel it does not find any erorrs.
Does anyone know how I can see what turned the filesystem into read-only?
Sorry that I failed to note that possibility and I should have since the packages from cuda-fedora often seem to leave a modular package enabled. I am glad you were able to identify and remove that hindrance.
Very good progress in getting the drivers fixed
Now is the time for someone with experience who may be able to assist with the read-only problem.
At this point you need to get the attention of a btrfs expert. Best chance is to start a new topic that mentions the error and kernel version. You should also search other forums as the issue is likely to affect other distros that move to newer kernels.
I could try a new forum post, but I’m not very confident that will get more attention from btrfs experts. I did try to make a recovery USB stick with fedora 41 on it. It mounted the filesystem just fine without any errors. So I’m trying to do a system upgrade to fedora 41 now to see if that helps
EDIT: the system upgrade didn’t seem to succeed. I’m still on fedora 40 even after dnf system-upgrade reboot
After using [btrfs-progs] v6.11 to fully clear inode cache, your fs should be totally
fine.
and
It’s not corrupted, but us deprecating that feature quite some time ago.
And then a recently enhanced sanity check just treat such long
deprecated feature as an error, thus rejecting those tree blocks.
Thank you for pointing me toward the kernel mail thread. I’ve tried to rescue the filesystem with btrfs-progs 6.11, as this was the version that was available on the live USB. I’ve tried a couple of the rescue options, but when I check the filesystem with btrfs check it stil gives the same error in the step “checking extents”. Which rescue command should I use to clean up the filesystem?
You should mention the specific options you tried.
The lack of posts from others seeing the same issue suggests you have reached an unusual configuration. It may not be possible to repair the filesystem so you should backup important files before attempting repairs and be prepared to do a fresh install.
The section on Deprecated Mount Options in BTRFS Administration has an inode_cache discussion that mentions using btrfs rescue ....
It may help others if you can provide details of the history so we can determine how you ended up with a broken configuration – have you been upgrading your system from a much older Fedora version or used “non-standard” mount options at some point?
This will be slower than the usual btrfs check. It uses a different implementation that will hopefully get a better idea what’s going on.
In the meantime I suggest refreshing backups by booting from a USB stick, and mounting the file system with:
mount -o ro,usebackuproot,nologreplay,ibadroots /dev/mapper/mydata /mnt
This should permit skipping over the damaged extent tree, still checking metadata and data csums, and you can copy (cp or rsync) any important data off the drive. It’s important to check dmesg or journalctl -fk to see if there are any kernel messages produced during the copy.
So what’s going on with the read-only is anytime btrfs gets confused it goes read-only to prevent more problems being written to disk. Since btrfs checksums everything, it’s immediately aware if there’s been some kind of change.
In this case it seems possible that the corruption happened in memory and maybe some of it managed to get to disk (?) But I don’t see any previous dmesg posted for the original problem so it’s hard to tell. Ordinarily the write-time tree checker will catch in-memory corruption (software or hardware corruption) and trigger read-only to prevent the problem from getting to disk. But since you’re seeing errors with btrfs check that means there’s a problem on disk, though it’s not possible to say what caused it.
I cannot rule out the corruption happened in memory, but I’m certain it has been written on disk because of how consistent it gets detected bt btrfs check v6.11. I did do a memtest and it didnt find any errors.
If there are no other suggestions i can try a btrfs repair (of course i will first back up my data)
Hi all, I finally did it. I backed up all my data and did btrfs check --repair from a fedora 41 live USB. Even though everyone warns about it, it seems my system is now working correctly again. Thanks everyone for the help!
For those curious, here is the output of the repair: