Linux Storage

Fix read-only filesystem errors

Practical Linux guide: fix read-only filesystem errors without the usual guesswork.

10 min read Beginner Updated 9 Jun 2026

Step-by-step guide

Work through each section in order. Stop when your issue is resolved — you do not need every step for every situation.

Warning

Filesystem and fstab errors can prevent boot or cause data loss. Always run findmnt --verify and keep a rescue environment available.

What you will achieve

Recover from read-only root remounts after I/O errors or full disks — remount rw safely and fix underlying cause.

1) Confirm read-only state

mount | grep ' / '
touch /tmp/test 2>&1

2) Check kernel log for I/O errors

sudo dmesg | tail -30
journalctl -k -b | grep -i error

3) Remount read-write (if disk is healthy)

sudo mount -o remount,rw /

If this fails, boot single-user or live USB and run fsck.

4) Filesystem check offline

sudo systemctl emergency
sudo umount /
sudo fsck -f /dev/sda1

Replace device with your root partition from findmnt /.

5) Disk full cause

df -h
sudo du -xh --max-depth=1 /var | sort -h

Verify

mount | grep ' / '
sudo touch /etc/ro-test && sudo rm /etc/ro-test

5) ext4 errors in dmesg

sudo dmesg | grep -i ext4

ABORT or I/O error messages mean hardware or cable — replace disk after backup.

6) Read-only bind mounts

findmnt -o TARGET,OPTIONS /

Look for ro flag — intentional ro mount differs from emergency remount.

7) Live USB fsck when root cannot remount rw

sudo fsck.ext4 -f /dev/sda2

Prevent recurrence

Monitor disk health, keep 15% free space, use UPS on servers — most ro remounts are the kernel protecting data on sick disks.

8) OverlayFS live USB false positive

Live sessions mount squashfs ro by design — do not fsck the ISO stick thinking it is a broken HDD.

Prerequisites

Root access or single-user mode. Know root device (findmnt /). Backup if disk failing. Maintenance window — remount and fsck may require downtime.

Emergency read-only root cause log

journalctl -k -b | grep -i 'read-only\|I/O error\|EXT4'

smartctl long test

sudo smartctl -t long /dev/sda
sudo smartctl -a /dev/sda

Schedule long SMART test when intermittent ro remounts suggest failing sectors.

Network filesystem ro

NFS server export disappeared mid-write — client mounts ro and apps crash. mount -o remount,rw fails until server returns — fix server not local fsck. Same for stale SSHFS when remote host down.

Container overlay ro

Docker overlay2 ro often means underlying host disk full — fix host df not container restart loop. kubectl evicting pods when node filesystem read-only — drain node and fix disk on host.

Related guides

filesystem fix linux only read