❯ sudo journalctl -xb | tail -1000 | ai are there any issues that would explain why i get the 'read only filesystem' everythere now Error: error returned from database: (code: 8) attempt to write a readonly database
Caused by: (code: 8) attempt to write a readonly database
Location: crates/atuin/src/command/client/history.rs:321:9
Let's break down your logs and why everything is read-only:
- You have dozens of errors like
EROFS: read-only file system, open '/home/jumski/.config/discord/logs/renderer_js.log'
- Every desktop app (Firefox, Slack, Discord, Wireplumber, Klipper and more) is unable to write their normal files in your home directory.
- You tried
sudo mount -o remount,rw /
and it made no difference. - The first mention of real trouble is around:
cze 11 16:43:03 pc kernel: page: refcount:4 mapcount:0 mapping:000000001216a813 ... ... cze 11 16:43:06 pc discord[7883]: ... EROFS: read-only file system ...
- Everything goes read-only after that.
When Linux (actually, the kernel) detects a serious disk or filesystem error, especially on btrfs, ext4, or similar filesystems, it will remount the affected partition as read-only to protect data/stop further corruption.
- The log line at 16:43:03 is from the kernel and is not a user application. (The kernel itself is reporting a bad memory/disk page.)
- All write failures start right after this event.
EROFS
("Error Read-Only File System") is being returned by your kernel to all applications trying to write.- Attempts to remount as rw without fixing the underlying problem won't work (
mount -o remount,rw /
after kernel error does nothing until reboot + fsck).
- The log snippet shows
aops:btree_aops [btrfs] ino:1
-- so your root is running on BTRFS. - Btrfs is more likely to remount root as read-only on corruption than, say, ext4.
- Bad sectors, power loss, dying SSD/HDD, or BTRFS bugs can cause this.
- When the kernel can't successfully write/read parts of its filesystems, or encounters a critical error, it protects itself by remounting all or part of the FS as ro.
- Especially common with BTRFS on older kernels or on physically failing disks.
First, check if your disk is failing!
For SSD/HDD (substitute sda
for your actual disk):
sudo smartctl -a /dev/sda
Look for Reallocated_Sector_Ct, Current_Pending_Sector, Uncorrectable_Error_Cnt, etc.
Check for further BTRFS or I/O (Input/Output) errors:
sudo dmesg | egrep -i 'error|fail|btrfs|io'
For BTRFS, you need to check the filesystem from a rescue system, or at least a root shell after reboot.
VERY IMPORTANT: Do NOT run btrfs check --repair
on a mounted read-write (or even read-only) root.
Best is to boot from a live USB system, then:
sudo btrfs check /dev/sdaX
# If it returns errors, then only if you understand the risks:
# sudo btrfs check --repair /dev/sdaX
Be sure /dev/sdaX
is the partition your root BTRFS is on.
If the disk is failing, copying files (even in read-only mode!) is your best chance at saving irreplaceable data.
- You encountered a disk or filesystem error.
- The kernel, to prevent data loss or further damage, remounted your root (btrfs) filesystem as read-only.
- This instantly breaks anything that needs to write to disk, including application logs, browser caches, settings, etc.
- Situation will only fix after you (1) fix the underlying issue (disk/FS) and (2) reboot the system.
- Immediately back up anything valuable while you still can!
- Check your disk health (
smartctl
etc.) - Review dmesg/journalctl for hardware/BTRFS errors.
- Reboot into a recovery/live USB (if needed) and run
btrfs check
. - Replace the disk if hardware is failing. (Often the root cause.)
- Restore from backups if necessary.
- Update your kernel/BTRFS tools. Some BTRFS issues are fixed in recent updates.
Run:
sudo smartctl -a /dev/sda
sudo dmesg | tail -100 | egrep -i 'btrfs|error|fail'
sudo btrfs check /dev/sdaX
And paste the relevant output (replace device names with your actual disk/partition).
In summary: Your root filesystem (BTRFS on Manjaro) encountered a serious error/hardware failure and was automatically remounted read-only for your safety. Investigate and fix the hardware/filesystem; only then will normal operations resume. Back up your stuff right now!