Linksys WRT1900AC v1, OpenWrt snapshot r19033
I use overlay on a USB stick. Luci statistics writes data on it. After some time, the filesystem gets corrupted. With ext2 and f2fs the corruption is detected during fsck after reboot. With btrfs (with checksums option), the problem appears after a few minutes or hours of use and is detectable by running "btrfs scrub". Sometimes btrfs won't even mount a fresh filesystem immediately after mkfs.btrfs.
The router runs very stable if not using USB storage.
I tried:
- changing the stick: 4 sticks, different manufacturers, different sizes, I even tried to use a CompactFlash card in a card reader
- changing the usb port: USB2, USB3, with/without USB hub
- changing filesystems: ext2, f2fs, btrfs
- changing the router and firmware: Asus Merlin on Asus RT-N18U, but it doesn't have btrfs and the other filesystems don't have checksums, so the problem only appears after reboot.
I don't know what else to do. The only thing I didn't try is a SATA HDD. (I don't have one available right now.)
root@GRAPHRT:~# btrfs scrub start /dev/sda
scrub started on /dev/sda, fsid 12f0822d-0c24-4df8-ae90-ba2a376c7e91 (pid=16433)
root@GRAPHRT:~# ERROR: there are uncorrectable errors
root@GRAPHRT:~# btrfs scrub status /dev/sda
UUID: 12f0822d-0c24-4df8-ae90-ba2a376c7e91
Scrub started: Tue Mar 8 10:28:54 2022
Status: finished
Duration: 0:00:07
Total to scrub: 33.14MiB
Rate: 4.73MiB/s
Error summary: csum=65
Corrected: 11
Uncorrectable: 54
Unverified: 0
root@GRAPHRT:~# dmesg | tail
[94111.595852] BTRFS warning (device sda): checksum error at logical 278302720 on dev /dev/sda, physical 336564224, root 5, inode 455, offset 36864, length 4096, links 1 (path: upper/var/db/collectd/GRAPHRT/interface-pppoe-RDS/if_errors.rrd)
[94111.623848] btrfs_dev_stat_print_on_error: 54 callbacks suppressed
[94111.623863] BTRFS error (device sda): bdev /dev/sda errs: wr 0, rd 0, flush 0, corrupt 428, gen 0
[94111.640134] scrub_handle_errored_block: 43 callbacks suppressed
[94111.640222] BTRFS error (device sda): unable to fixup (regular) error at logical 278302720 on dev /dev/sda
[94112.958343] BTRFS info (device sda): scrub: finished on devid 1 with status: 0
[94135.812687] BTRFS warning (device sda): csum failed root 5 ino 425 off 202014720 csum 0x3f500621 expected csum 0x16342cd3 mirror 1
[94135.824567] BTRFS error (device sda): bdev /dev/sda errs: wr 0, rd 0, flush 0, corrupt 429, gen 0
[94135.835457] BTRFS warning (device sda): csum failed root 5 ino 428 off 202035200 csum 0x0efad072 expected csum 0x33666ef0 mirror 1
[94135.847466] BTRFS error (device sda): bdev /dev/sda errs: wr 0, rd 0, flush 0, corrupt 430, gen 0
Do you use overlay on USB? What filesystem? Any corruption detected after reboot?