Symptoms
When attempting to restart a service or write to the system, you encounter a read-only filesystem error. After reviewing the server, you determine /tmp is read-only.
Cause
The /tmp mount has become corrupted and been mounted as read-only to prevent further errors.
Resolution
Warning: Working with file systems can be a dangerous task. An experienced System Administrator should perform the steps below to minimize risk of damage to your server or file systems.
-
Start by disabling
/tmpfrom yourfstab. As root, open the following file with a command line text editor:CONFIG_TEXT: /etc/fstab
-
Search for the entries that match
/tmpand/var/tmp, which should look something like this:CONFIG_TEXT: /usr/tmpDSK /tmp ext4 defaults 0 0
/tmp /var/tmp ext4 defaults,bind 0 0 -
Edit the entries for
/tmpand/var/tmpto add thenoautoflag alongside the other flags, in the column withdefaults:CONFIG_TEXT: /usr/tmpDSK /tmp ext4 defaults,noauto 0 0
/tmp /var/tmp ext4 defaults,bind,noauto 0 0 -
Disable the securetmp service:
# systemctl disable securetmp
- Reboot the server.
-
Once the server comes back up, remove the old tmpDSK file:
# mv -v /usr/tmpDSK{,.$( date +%Y%m%d )}
-
Run securetmp to regenerate the tmpDSK file. Enter
yat the prompts to confirm, enable and configure the boot option:# /scripts/securetmp
- Reboot the server once more to remount the
/tmppartition.
Comments
0 comments
Article is closed for comments.