Linux may automatically switch a filesystem to read-only mode when it detects serious filesystem or storage errors. This is a protective mechanism designed to prevent further damage.
Possible causes include filesystem corruption, underlying virtual disk problems, or storage I/O errors.
Follow these steps:
Check whether the filesystem is mounted as read-only:
findmnt -o TARGET,SOURCE,FSTYPE,OPTIONS
Check recent kernel errors:
sudo dmesg -T | grep -iE "I/O error|EXT4-fs error|read-only|filesystem"
Identify the affected partition:
lsblk -f
Check whether the provider has reported any storage problems.
Take a backup of accessible data if possible.
Arrange filesystem checks from rescue mode or another unmounted environment.
Important: Do not force-remount a potentially corrupted filesystem as read-write. Identify the underlying problem and repair the filesystem safely first.