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.
What you'll need
- SSH or console access with sudo
Step-by-step diagnostic
Quick triage — pick your path
Get started
Choose the option that matches what you see. You can jump straight to that section.
- Follow this guide Work through the full procedure from mount check to remount or fsck.
- Check mount and dmesg You want to confirm the read-only state and cause.
- Remount read-write dmesg shows no I/O errors and you want to remount.
- When to escalate Remount fails, I/O errors persist, or disk health is poor.
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.
- Confirm mount state Run mount and touch to confirm read-only.
- Check dmesg Look for I/O errors or filesystem messages.
- Remount mount -o remount,rw when no I/O errors.
- fsck Boot to recovery and run fsck if remount fails.
- 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.
You can change your answer later.
Does dmesg show I/O errors?
I/O errors indicate failing hardware. Do not remount.
You can change your answer later.
Remount read-write
mount -o remount,rw when no I/O errors.
Did remount succeed?
You can change your answer later.
Run fsck from recovery
Check disk health and escalate
Permission issue, not read-only
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.