Need some urgent advice - /tmp is write protected.

AdamDresch

Well-Known Member
Jun 22, 2006
80
0
156
I just started getting loads of database emails from my server, the main content being...

MySQL Error : Can't create/write to file '/tmp/#sql_73c7_1.MYI' (Errcode: 30)

So I logged in as root and it's telling me the /tmp partition is write protected/read only.

I can't for the life of me, figure out why, or how to fix it

Any suggestions are greatly appreciated.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
41
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hello Adam,

Please issue the following command to make /tmp the correct permissions:

Code:
chmod 1777 /tmp
If this does not work, please provide the exact error message you receive when trying to make this change.

Thanks.
 

AdamDresch

Well-Known Member
Jun 22, 2006
80
0
156
Thanks for that
I rebooted the server and it seems to be ok now, not sure why it unmounted/remounted as read only
There were hundreds of files in there with names like "files124242"
 

AdamDresch

Well-Known Member
Jun 22, 2006
80
0
156
Ah wait, it's doing it again
The exact error is

[email protected] [/tmp]# chmod 1777 /tmp
chmod: changing permissions of `/tmp': Read-only file system

The tmp partition is on a seperate harddrive (I believe, from memory, an SSD drive)
 

AdamDresch

Well-Known Member
Jun 22, 2006
80
0
156
Strangely enough, this problem started when I began transfering a large account from the current server (thor, the tmp problem one) to another server.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
41
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hello Adam,

It isn't that /tmp is write protected, it's that the server's file system has gone to read-only mode. That's a big issue and indicates possible file system corruption.

At this time, please contact your datacenter or provider to have them assist with checking this over. Also, before performing any further reboots, please ensure you have full backups. The machine might need to be migrated to a new one.

Finally, it's likely a fsck should be performed after the machine is taken offline. Of note, an fsck cannot be performed while it is online but runs during initial bootup instead and should be done by your datacenter.

Thanks.