Error Codes Wiki

Linux errno 30 EROFS — Read-Only File System

Errorerrno

Overview

Linux errno 30 (EROFS) occurs when attempting to write to a filesystem mounted as read-only, often due to disk errors triggering auto-remount.

Key Details

  • EROFS is errno 30 on Linux
  • The filesystem has been mounted or remounted as read-only
  • Linux automatically remounts filesystems read-only when disk errors are detected
  • Check mount status with mount | grep /partition or findmnt
  • dmesg log will show the reason for the remount

Common Causes

  • Filesystem errors triggered automatic read-only remount
  • Disk hardware failure causing I/O errors
  • Filesystem mounted read-only intentionally in /etc/fstab
  • Snap or container filesystem that is inherently read-only
  • System in recovery mode with root mounted read-only

Steps

  1. 1Check dmesg for disk errors: dmesg | grep -i 'error\|remount\|read-only'
  2. 2Remount as read-write: mount -o remount,rw /mount/point
  3. 3Run filesystem check: umount /dev/sdXY && fsck -y /dev/sdXY
  4. 4Check disk health with smartctl -a /dev/sdX
  5. 5If hardware failure, replace the disk immediately after backing up data

Tags

linuxerrnoerofsread-onlyfilesystem

More in Errno

Frequently Asked Questions

Most likely the kernel detected I/O errors and remounted read-only to prevent data corruption. Check dmesg for the specific error.