I have/home mounted on a btrfs
partition and it regularly (after a few minutes) becomes mounted read only after which I need to reboot for it to become rw
again. journalctl
tell me the following:
$ journalctl -f | grep -i btrfs
Aug 22 07:45:02 DesktopRon kernel: BTRFS error (device sdb1): tree first key mismatch detected, bytenr=874068066304 parent_transid=2042756 key expected=(574193057792,137,0) has=(574193057792,169,0)
Aug 22 07:45:02 DesktopRon kernel: BTRFS: error (device sdb1: state A) in __btrfs_free_extent:3053: errno=-5 IO failure
Aug 22 07:45:02 DesktopRon kernel: BTRFS info (device sdb1: state EA): forced readonly
Aug 22 07:45:02 DesktopRon kernel: BTRFS error (device sdb1: state EA): failed to run delayed ref for logical 574197006336 num_bytes 16384 type 176 action 2 ref_mod 1: -5
Aug 22 07:45:02 DesktopRon kernel: BTRFS: error (device sdb1: state EA) in btrfs_run_delayed_refs:2127: errno=-5 IO failure
I've ran btrfs check
, smartctl -a
but nothing looked suspicous. Any hints how I can address and fix this?
Can I find which file causes this and potentially get rid of (or relocate) it?
errno=-5 IO failure
looks suspicious to me. In general this is the beginning of the end of a drive. Make sure you have backups and start looking for a new drive.smartctl -a
https://www.thomas-krenn.com/en/wiki/SMART_tests_with_smartctl
it shows how to take a test.