Skip to content

Troubleshoot a Linux Filesystem Mounted Read-Only

Admin
November 18, 2026
5 min read
Intermediate
💻 Target OS: Ubuntu 24.04+ / Debian 12+ / RHEL 9+

Before you begin

  • Applies to:Ubuntu 26.04 LTS and Red Hat Enterprise Linux (RHEL) 10 with systemd and local ext4 or XFS. NFS, overlay filesystems, managed cloud disks, and cluster storage use separate recovery procedures.
  • Where to start:Start in a shell on the affected host. Use the affected application's mount context if it differs from the host.
  • What you need:Record the exact path from the error. Have approved sudo access, console access, and a verified backup before repair. Keep the same shell for commands that share variables.
Guide tools
Guide tools
0/0 Steps (0%)

Use this guide for Read-only file system errors. Distinguish a read-only mount from an ACL issue or a full filesystem. Linux can expose one path as read-only through a bind mount or service namespace even while the backing volume is writable.

Troubleshooting Steps

01

Identify the exact affected mount

Triage

Replace the example with the path the application reports. Check the source, filesystem type and options. The ro option indicates a read-only mount in the namespace of the command. If the host shows rw and only a service is affected, inspect sandboxing, bind mounts, or container volume settings in the affected context.

What you should see · The output identifies the exact source, mount, filesystem type, and whether it is read-only in this shell.

If you see something else · If the shell reports read-write but only the application gets a read-only error, check the application’s container or service mount namespace. If the affected mount reports read-only, continue to Step 2 and look for matching kernel errors before any attempt to change it.

Terminal window
findmnt -T /srv/data -o TARGET,SOURCE,FSTYPE,OPTIONS
lsblk -o NAME,TYPE,FSTYPE,RO,MOUNTPOINTS
df -hT /srv/data
02

Check kernel events and mount policy

Evidence

Match device names and timestamps to the filesystem source. Inspect for I/O errors, ext4 errors, or an XFS shutdown. Check whether an intended read-only option appears in the configured mount table. If the kernel journal is unavailable after reboot, use retained system logs or storage-monitoring history.

Terminal window
sudo journalctl -k -b --since '2 hours ago' --no-pager
findmnt --fstab -o TARGET,SOURCE,FSTYPE,OPTIONS
03

Select the recovery path

Decision

For an intentional read-only policy, correct the approved mount or service configuration and keep its previous version for rollback. For I/O errors, resolve the block device or storage path first. For suspected corruption, confirm the logical device and filesystem type, establish a backup or recovery image, and take the volume offline. On the root filesystem this usually means booting recovery media. Follow the vendor’s ext4 or XFS procedure for the installed release.

Terminal window
# Compare the selected device and check for any remaining mounts.
# Replace both example paths with the volume and mount under investigation.
lsblk -o NAME,TYPE,FSTYPE,RO,MOUNTPOINTS /dev/mapper/vg-data
findmnt -S /dev/mapper/vg-data
04

Run the applicable offline check

Offline assessment

Only after verifying the target is unmounted in the recovery environment and the storage is stable, run the matching read-only check. Use the filesystem volume, never the whole disk unless the filesystem is actually on it. Errors or an unreplayed journal need the vendor’s recovery procedure. Escalate an XFS dirty log before considering any operation that discards it.

Terminal window
# ext4 only
sudo e2fsck -n /dev/mapper/vg-data
# XFS only
sudo xfs_repair -n /dev/mapper/vg-data
05

Verify mount state and application recovery

Verification

After approved recovery, repeat the mount and kernel checks. Expect rw only where the volume is intended to accept writes. Confirm the application can perform its normal operation in an approved scratch location using its own service identity. If fresh I/O or filesystem errors recur, stop writes and escalate.

Terminal window
findmnt -T /srv/data -o TARGET,SOURCE,FSTYPE,OPTIONS
sudo journalctl -k -b --since '10 minutes ago' --no-pager

References

Comments