r/linux4noobs • • Oct 31 '26

BTRFS Errors

I've use BTRFS on every distro I've tried that supports it. I keep getting error I don't really understand and would appreciate any help in figuring out what is going on. Currently, the system is stable, however, I have had to change my m.2 drive about 3 times (one was a user error for sure though). I don't know if I'm going about this the right way and I'm getting tired of having to re-setup my system every few weeks.

dmesg output:

[ 3899.306868] BTRFS warning (device nvme0n1p3): csum failed root 256 ino 177531 off 16744448 csum 0x5ace33a5 expected csum 0x049bda20 mirror 1
[ 3899.306876] BTRFS error (device nvme0n1p3): bdev /dev/nvme0n1p3 errs: wr 0, rd 0, flush 0, corrupt 48, gen 0
[ 3899.306881] BTRFS warning (device nvme0n1p3): csum failed root 256 ino 177531 off 16748544 csum 0x83c91fb5 expected csum 0x868c4535 mirror 1
[ 3899.306884] BTRFS error (device nvme0n1p3): bdev /dev/nvme0n1p3 errs: wr 0, rd 0, flush 0, corrupt 49, gen 0
[ 3899.306887] BTRFS warning (device nvme0n1p3): csum failed root 256 ino 177531 off 16752640 csum 0x3f735c3b expected csum 0x9584a6ba mirror 1
[ 3899.306888] BTRFS error (device nvme0n1p3): bdev /dev/nvme0n1p3 errs: wr 0, rd 0, flush 0, corrupt 50, gen 0
[ 3899.306891] BTRFS warning (device nvme0n1p3): csum failed root 256 ino 177531 off 16756736 csum 0xc859a12c expected csum 0x5b6dd0f5 mirror 1
[ 3899.306893] BTRFS error (device nvme0n1p3): bdev /dev/nvme0n1p3 errs: wr 0, rd 0, flush 0, corrupt 51, gen 0
[ 3899.306895] BTRFS warning (device nvme0n1p3): csum failed root 256 ino 177531 off 16760832 csum 0x441bd95b expected csum 0x7a75c63e mirror 1
[ 3899.306897] BTRFS error (device nvme0n1p3): bdev /dev/nvme0n1p3 errs: wr 0, rd 0, flush 0, corrupt 52, gen 0
[ 3899.306900] BTRFS warning (device nvme0n1p3): csum failed root 256 ino 177531 off 16764928 csum 0x3572b948 expected csum 0x01a40ad9 mirror 1
[ 3899.306902] BTRFS error (device nvme0n1p3): bdev /dev/nvme0n1p3 errs: wr 0, rd 0, flush 0, corrupt 53, gen 0
[ 3899.306905] BTRFS warning (device nvme0n1p3): csum failed root 256 ino 177531 off 16769024 csum 0x6c675839 expected csum 0x3c1c4048 mirror 1
[ 3899.306906] BTRFS error (device nvme0n1p3): bdev /dev/nvme0n1p3 errs: wr 0, rd 0, flush 0, corrupt 54, gen 0
[ 3899.306909] BTRFS warning (device nvme0n1p3): csum failed root 256 ino 177531 off 16773120 csum 0xb988fd9d expected csum 0xb73df8de mirror 1
[ 3899.306911] BTRFS error (device nvme0n1p3): bdev /dev/nvme0n1p3 errs: wr 0, rd 0, flush 0, corrupt 55, gen 0
[ 3899.322579] BTRFS warning (device nvme0n1p3): csum failed root 256 ino 177531 off 16744448 csum 0xb35f496c expected csum 0x049bda20 mirror 1
[ 3899.322588] BTRFS error (device nvme0n1p3): bdev /dev/nvme0n1p3 errs: wr 0, rd 0, flush 0, corrupt 56, gen 0
[ 3899.322592] BTRFS warning (device nvme0n1p3): csum failed root 256 ino 177531 off 16748544 csum 0x611eebec expected csum 0x868c4535 mirror 1
[ 3899.322595] BTRFS error (device nvme0n1p3): bdev /dev/nvme0n1p3 errs: wr 0, rd 0, flush 0, corrupt 57, gen 0
[ 4028.633504] evm: overlay not supported
9 Upvotes

23 comments sorted by

4

u/Classic-Rate-5104 Oct 31 '26

If different distributions result into te same result, it's most likely a hardware problem

2

u/ConceptFalse Oct 31 '26

could it be something besides the drive itself? 3 or so hard drives with the same issue is some crazy bad luck

1

u/Classic-Rate-5104 Oct 31 '26

Of course it can. Motherboard problem? Bad connector? There's not much you can do, except trying another computer or another (sata) ssd

2

u/dkopgerpgdolfg Oct 31 '26

I did read that you changed the drives, but could you still post smart data? (comm. errors can be interesting).

Ie: "sudo smartcl -ax /dev/nvme0n1"

2

u/ConceptFalse Nov 01 '26

Here is the output:

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

SMART/Health Information (NVMe Log 0x02, NSID 0x1)
Critical Warning:                   0x00
Temperature:                        36 Celsius
Available Spare:                    100%
Available Spare Threshold:          10%
Percentage Used:                    3%
Data Units Read:                    164,450,223 [84.1 TB]
Data Units Written:                 74,725,798 [38.2 TB]
Host Read Commands:                 531,803,538
Host Write Commands:                690,929,630
Controller Busy Time:               4,623
Power Cycles:                       856
Power On Hours:                     4,934
Unsafe Shutdowns:                   241
Media and Data Integrity Errors:    0
Error Information Log Entries:      0
Warning  Comp. Temperature Time:    0
Critical Comp. Temperature Time:    0
Temperature Sensor 1:               36 Celsius
Temperature Sensor 2:               40 Celsius

Error Information (NVMe Log 0x01, 16 of 64 entries)
No Errors Logged

Self-test Log (NVMe Log 0x06, NSID 0xffffffff)
Self-test status: No self-test in progress
No Self-tests Logged

1

u/dkopgerpgdolfg Nov 01 '26

Didn't you say you changed your SSD? What you show here is an old drive that already starts degrading.

(And the output isn't complete in any way)

1

u/oshunluvr 25d ago

One of my NVME drives shows this:

Host Write Commands:                600,680,339
Controller Busy Time:               29
Power Cycles:                       153
Power On Hours:                     23,819
Unsafe Shutdowns:                   2

Close to same # of writes but your controller busy time is 2000x more and insafe shutdowns are 120x more.

Could be a controller problem.

12

u/oshunluvr Oct 31 '26

If you changed the drive 3 times, it's probably not the drives. Bad checksums could be bad RAM, power issues, or bad drive controller.

Run scrub on the drive and test your RAM for starters.

4

u/maokaby Oct 31 '26

Or bad cable. I had it before.

1

u/uzlonewolf Nov 01 '26

On SATA sure, but an NVMe drive?

2

u/Netblock Nov 01 '26

U.2 or U.3 SSDs; tho if OP had such hardware, they wouldn't be asking such questions.

1

u/Netblock Nov 01 '26

Disable the XMP/EXPO/DOCP profile for RAM.

-4

u/E5-4650_v2_RX570 Oct 31 '26

btrfs check --repair /dev/nvme0n1p3

7

u/dkopgerpgdolfg Oct 31 '26

OP, do not do this. Not only it doesn't make sense here, but it also warns you when running it and in any documentation (for a reason).

-1

u/E5-4650_v2_RX570 Nov 01 '26

yes op would see warning et 10 seconds countdown , he might cancel by Ctrl + C , or he want to continue the process

-5

u/Xia_L Oct 31 '26

> re-setup my system every few weeks
This is a whole point to use btrfs outside it's specific use case. This has not changed in the years since its emergence, and it is unlikely to change.
If this is not too much fun for you, then it is worth considering other FS.

6

u/dkopgerpgdolfg Oct 31 '26

outside it's specific use case

Not sure if I understand your comment. But in any case:

OP made three tries with completely new installs of different distributions, and got checksum problems three times, and ... you tell them to use another fs? Probably one that doesn't complain until the data is so corrupt that it can't boot anymore? Terrible advice.

(No, this is not a btrfs bug, especially not when failing on all three fresh file systems.)

-6

u/Xia_L Oct 31 '26

In my experience, btrfs is extremely unstable. Absolutely anything can lead to errors. You can blame wrong controller, wrong disk, too much I/O. But in reality, you should blame whoever came up with the idea of ​​proposing this as the default FS for certain distributions.
I’ve tried working with it 7 or 8 times, starting from the time of its release, with the last attempt being a couple of years ago. At least 3 completely different laptops, 2 different desktops. Not a single time did it end well.
That’s why I still hold the view that switching the file system is the best choice for the OP.

4

u/dkopgerpgdolfg Nov 01 '26

Are you one of these people getting paid for discrediting btrfs?

You can blame wrong controller, wrong disk

"Shooting the messenger" was already known to be bad millenias ago...

On bad hardware, no fs will run reliably. The only difference is if it tells you immediately, or just corrupts the data.

But in reality, you should blame whoever came up with the idea of ​​proposing this as the default FS for certain distributions.

They did this exactly because it's fine, and because people care about their data not getting corrupted.

1

u/Linguistic-mystic 23d ago

BTRFS shills can't handle the truth without resorting to conspiracy theories. Yes, They are out to destroy BTRFS and establish XFS hegemony. Or was it ZFS. Yes, I think it's the deep-pocketed FreeBSD moguls who are discrediting BTRFS all day every day...

1

u/dkopgerpgdolfg 23d ago

Oh hi, I remember you. In a bad way. Good bye again.

-2

u/Xia_L Nov 01 '26

>Are you one of these people getting paid for discrediting btrfs?
It is impossible to somehow discredit something that is already in such a state.

2

u/uzlonewolf Nov 01 '26

Sounds like user error to me. I have never lost a btrfs filesystem in a system with ECC memory, and even without ECC memory it's rare.

Switching to a filesystem that will not tell you your shit's corrupt is not the answer.