Troubleshoot a Linux Filesystem Mounted Read-Only
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
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
Identify the exact affected mount
TriageReplace 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.
findmnt -T /srv/data -o TARGET,SOURCE,FSTYPE,OPTIONSlsblk -o NAME,TYPE,FSTYPE,RO,MOUNTPOINTSdf -hT /srv/dataCheck kernel events and mount policy
EvidenceMatch 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.
sudo journalctl -k -b --since '2 hours ago' --no-pagerfindmnt --fstab -o TARGET,SOURCE,FSTYPE,OPTIONSSelect the recovery path
DecisionFor 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.
# 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-datafindmnt -S /dev/mapper/vg-dataRun the applicable offline check
Offline assessmentOnly 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.
# ext4 onlysudo e2fsck -n /dev/mapper/vg-data
# XFS onlysudo xfs_repair -n /dev/mapper/vg-dataVerify mount state and application recovery
VerificationAfter 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.
findmnt -T /srv/data -o TARGET,SOURCE,FSTYPE,OPTIONSsudo journalctl -k -b --since '10 minutes ago' --no-pagerReferences
Your feedback keeps these production procedures accurate and battle-tested.