The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need some urgent advice - /tmp is write protected.

Discussion in 'General Discussion' started by AdamDresch, Feb 11, 2011.

  1. AdamDresch

    AdamDresch Well-Known Member

    Joined:
    Jun 22, 2006
    Messages:
    80
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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.
     
  3. AdamDresch

    AdamDresch Well-Known Member

    Joined:
    Jun 22, 2006
    Messages:
    80
    Likes Received:
    0
    Trophy Points:
    6
    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"
     
  4. AdamDresch

    AdamDresch Well-Known Member

    Joined:
    Jun 22, 2006
    Messages:
    80
    Likes Received:
    0
    Trophy Points:
    6
    Ah wait, it's doing it again
    The exact error is

    root@thor [/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)
     
  5. AdamDresch

    AdamDresch Well-Known Member

    Joined:
    Jun 22, 2006
    Messages:
    80
    Likes Received:
    0
    Trophy Points:
    6
    Strangely enough, this problem started when I began transfering a large account from the current server (thor, the tmp problem one) to another server.
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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.
     
  7. AdamDresch

    AdamDresch Well-Known Member

    Joined:
    Jun 22, 2006
    Messages:
    80
    Likes Received:
    0
    Trophy Points:
    6
    Thanks Tristan, i'll do just that :)
     
Loading...

Share This Page