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
- 1Check dmesg for disk errors: dmesg | grep -i 'error\|remount\|read-only'
- 2Remount as read-write: mount -o remount,rw /mount/point
- 3Run filesystem check: umount /dev/sdXY && fsck -y /dev/sdXY
- 4Check disk health with smartctl -a /dev/sdX
- 5If hardware failure, replace the disk immediately after backing up data
Tags
linuxerrnoerofsread-onlyfilesystem
More in Errno
linux-errno-1-epermLinux errno 1 (EPERM) — Operation Not Permitted
Warninglinux-errno-2-enoentLinux errno 2 (ENOENT) — No Such File or Directory
Warninglinux-errno-5-eioLinux errno 5 (EIO) — Input/Output Error
Errorlinux-errno-11-eagainLinux errno 11 (EAGAIN) — Resource Temporarily Unavailable
Informationallinux-errno-12-enomemLinux errno 12 (ENOMEM) — Out of Memory
Criticallinux-errno-13-eaccesLinux errno 13 (EACCES) — Permission Denied
WarningFrequently Asked Questions
Most likely the kernel detected I/O errors and remounted read-only to prevent data corruption. Check dmesg for the specific error.