/tmp: Read-only file system Error
If you are getting the error "Read-only file system" while editing some files on the server, you can fix the same by running File System Check. Error example: $ crontab -e /tmp/crontab.XXXX1ibTLU: Read-only file system It shows that the /tmp partition is unwriteable. The read-only has been mounted as read-only because file-system facing some error. To fix this, we need to do file system check (fsck) for /tmp partition. Before we do fsck, we need to unmount the directory but following error occurred: $ umount /tmp /tmp: Device or resource busy It seems like /tmp directory is locked to be unmounted due to some files are already in process/being opened/being executed by some other processes. Using lsof, we can list out all the open files: $ lsof | grep /tmp mysqld 2599 mysql 5u REG 7,0 0 6098 /tmp/ibaqFhew (deleted) mysqld 2599 mysql 6u REG 7,0 0 6099 /tmp/ibC7Yfbn (deleted) mysqld 2599 mysql 7u REG 7,0 0 6100 /tmp/ibJ8AFbe (...