Fix a filesystem that is read-only

We'll confirm the mount state, check dmesg for errors, remount read-write when safe, and isolate hardware or fsck causes—or tell you when to escalate.

Category
Troubleshooting · Servers & Linux
Time
10–30 min
Last reviewed
What you'll need
  • SSH or console access with sudo

Step-by-step diagnostic

Step 1 of 6
Show full guide

Steps

Goal: Confirm the read-only state, check dmesg, remount when safe, or escalate.

  • Run mount and check for (ro) in the options. Run touch /path/test to confirm writes fail.
  • Good: (ro) present—proceed to Check dmesg.
  • Bad: (rw) present—permission issue; see fix-linux-has-permission-denied.

Check dmesg

Goal: Determine if I/O errors caused the read-only state.

  • Run dmesg | tail -50 or journalctl -k -n 50. Look for I/O error, EXT4-fs error, or read-only messages.
  • Good: No I/O errors—proceed to Remount.
  • Bad: I/O errors—do not remount; back up, check disk health, escalate.

Remount

Goal: Switch the filesystem to read-write when safe.

  • Run sudo mount -o remount,rw /path (use the mount point, e.g. / or /var).
  • Good: Remount succeeds—filesystem accepts writes.
  • Bad: Remount fails—boot to recovery and run fsck.

Verify disk health

Goal: Check SMART status when I/O errors appear.

  • Run smartctl -a /dev/sdX. Check Reallocated_Sector_Ct, Current_Pending_Sector, Offline_Uncorrectable.
  • When values are high, the disk is failing—back up and replace. Escalate with mount, dmesg, and smartctl output.

When to escalate

Escalate if:

  • Remount fails after fsck.
  • dmesg shows repeated I/O errors.
  • SMART status indicates disk failure.

Provide mount output, dmesg, fsck output, and smartctl results.

Verification

  • mount shows (rw) for the filesystem.
  • touch /path/test succeeds.
  • No new I/O errors in dmesg after remount.

Escalation ladder

Work from the device outward. Stop when the problem is fixed.

  1. Confirm mount state Run mount and touch to confirm read-only.
  2. Check dmesg Look for I/O errors or filesystem messages.
  3. Remount mount -o remount,rw when no I/O errors.
  4. fsck Boot to recovery and run fsck if remount fails.
  5. Escalate Provide mount, dmesg, fsck, smartctl output.

What to capture if you need help

Before calling support or posting for help, have these ready. It speeds everything up.

  • mount output
  • dmesg or journalctl -k output
  • fsck results (if run)
  • smartctl output (if I/O errors)

Does mount show (ro) for the filesystem?

Run mount and check the options. (ro) means read-only.

Run mount and look for (ro) in the options for the affected path. Run touch /path/test to confirm writes fail. Good: (ro) present and touch fails—read-only confirmed. Bad: (rw) present—different problem (permissions); see fix-linux-has-permission-denied.

You can change your answer later.

Does dmesg show I/O errors?

I/O errors indicate failing hardware. Do not remount.

Run dmesg | tail -50 or journalctl -k -n 50. Look for I/O error, EXT4-fs error, or read-only. I/O errors: do not remount—back up, check SMART, replace disk. No I/O errors: proceed to remount.

You can change your answer later.

Remount read-write

mount -o remount,rw when no I/O errors.

Run sudo mount -o remount,rw /path (use the mount point). Good: remount succeeds—filesystem accepts writes. Bad: remount fails—boot to recovery and run fsck.
Question

Did remount succeed?

You can change your answer later.

Run fsck from recovery

Boot to single-user or recovery. Run fsck -n /dev/sdX first, then fsck -y if errors. Remount after fsck. If fsck cannot repair, escalate.

Check disk health and escalate

Run smartctl -a /dev/sdX. If SMART shows failure, back up data and replace the disk. Escalate with mount, dmesg, and smartctl output.

Permission issue, not read-only

The filesystem is read-write. The problem is permissions. See fix-linux-has-permission-denied.

Reviewed by Blackbox Atlas

Frequently asked questions

Why would a filesystem become read-only?
Kernel protection after I/O errors, filesystem corruption, or explicit mount options. The kernel remounts read-only to prevent further damage when it detects serious errors.
Can I remount a read-only filesystem?
Yes, if the cause is not hardware. Run mount -o remount,rw /path. If dmesg shows I/O errors, do not remount—back up and replace the disk.
When should I escalate a read-only filesystem?
If remount fails, dmesg shows repeated I/O errors, or fsck reports uncorrectable errors. Provide mount output, dmesg, and fsck results.

Rate this guide

Was this helpful?

Thanks for your feedback.

Continue to