You are not logged in.
Hello everyone,
Today I encountered an issue with my Arch Linux system running on Btrfs. While working (specifically during an exam), my system suddenly remounted the filesystem in read-only mode due to a corruption error. However, after running diagnostics, I couldn’t find any actual issues with the filesystem, nor the disk.
System Information:
Distro: Arch Linux (fully updated)
Kernel: 6.13.1-zen
Filesystem: Btrfs (on a single NVMe SSD, no RAID)
What Happened:
The system became read-only without any apparent cause.
Checking dmesg I found the following log:
[Fri Feb 7 19:02:58 2025] BTRFS info (device nvme0n1p3): bdev /dev/nvme0n1p3 errs: wr 0, rd 0, flush 0, corrupt 1, gen 0
Running
btrfs device stats /
also reported:
bdev /dev/nvme0n1p3 errs: wr 0, rd 0, flush 0, corrupt 1, gen 0
However, a full
btrfs scrub
completed successfully with no error reported.
Running
btrfs check --readonly --force /dev/nvme0n1p3
found no corruption.
smartctl
also reports no issues with the drive.
It seems also that the filesystem tree was regenerated at the next boot.
Possible Theories:
A transient issue with the Btrfs log tree that caused a false positive corruption report.
A kernel bug affecting Btrfs.
An inconsistency that was resolved by the log replay at mount time.
A temporary problem with the SSD firmware or cache that did not persist.
Questions:
Has anyone else experienced similar behavior?
Could this be a known issue with the kernel / Btrfs?
Are there any additional checks I should run to further diagnose the cause?
I’d appreciate any insights! Thanks in advance.
Last edited by fofe1123 (2025-02-07 20:49:14)
Offline
Trimming (discard mount option) or APST caused?
Are there any errors pertaining the nvme in the journal?
Online
I've had this problem for a long time (over a year). Over time I've tried very many different solution candidates: so far nothing has worked. What makes this very hard for me to debug is the fact that my system is btrfs-only. So, when it happens: no logs...
Edit: I often see this upon resume.
Last edited by okram (2025-02-18 15:42:46)
Offline
It seems like stats never gets cleaned unless you run
btrfs device stats --reset /mnt/your-array
I got the information from here https://unix.stackexchange.com/question … trfs-devic
Edit: The system suddenly remounting as read-only when using btrfs is a sign that the hardware disk is failing according to a lot of people claiming to know about this issue.
Last edited by Mahtan (2025-08-18 17:53:34)
Offline
I have similar issue with my faulty dell inspiron laptop, where the hard drive will some time disconnect and the filesystem will become readonly and some command will show "input/output error", I have never able to run the scrub command in the senario due to the error above, but running scrub after give no error either
Offline
In btrfs, due to normal operations, some extents can become unreachable (e.g., bookend extents). If there is a corruption detected in this, then scrub won't show it because it only scans reachable data. The corruption is real (but has not yet affected reachable data), however, and points to either a disk or memory problem.
Last edited by topcat01 (2025-09-14 18:32:29)
Offline