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.

increasing /usr/tmpDSK directory

Discussion in 'General Discussion' started by gadalf, Sep 22, 2014.

  1. gadalf

    gadalf Well-Known Member

    Joined:
    Jun 8, 2014
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    My /usr/tmpDSK is getting almost full, and I am getting a warn about that.
    I have followed this tutorial"
    [Removed - Outdated]
    I have increased the $tmpdsksize= to a value around 8 gb everything looks ok, when i check to my WHM disk usage I see that nothing has changed.
    Even if i redo the process to see if the charges were saved, there looks ok,
    What I should do?
     
  2. server9host

    server9host Well-Known Member

    Joined:
    Sep 18, 2013
    Messages:
    160
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    Please follow below steps to increase the /tmp disk space :

    So log into SSH and SU to root so we may being!
    Code:
     cd /dev 
    Create 100MB file for our /tmp partition. If you need more space, make count size larger.
    Code:
     dd if=/dev/zero of=tmpMnt bs=1024 count=100000 
    Make an extended filesystem for our tmpMnt file
    Code:
     /sbin/mke2fs /dev/tmpMnt 
    Backup your /tmp dir- I had mysql.sock file that I needed to recreate the symbolic link for. Other programs may use it to store cache files or whatever.
    Code:
    cd /
    cp -R /tmp /tmp_backup
    Mount the new /tmp filesystem with noexec
    Code:
    mount -o loop,noexec,nosuid,rw /dev/tmpMnt /tmp
    chmod 1777 /tmp 
    Copy everything back to new /tmp and remove backup
    Code:
    cp -R /tmp_backup/* /tmp/
    rm -rf /tmp_backup
    Now we need to add this to fstab so it mounts automatically on reboots.
    Code:
    vi /etc/fstab
    You should see something like this:
    Code:
    /dev/hda3               /                       ext3    defaults,usrquota        1 1
    /dev/hda1               /boot                   ext3    defaults        1 2
    none                    /dev/pts                devpts  gid=5,mode=620  0 0
    none                    /proc                   proc    defaults        0 0
    none                    /dev/shm                tmpfs   defaults        0 0
    /dev/hda2               swap                    swap    defaults        0 0 
    At the bottom add
    Code:
     /dev/tmpMnt             /tmp                    ext2    loop,noexec,nosuid,rw  0 0 
    Save the file

    Now you can check your /tmp disk space is increases. :)
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    The securetmp script will utilize 1% of disksize with a minimum of 500M and a maximum of 4G, based on the available space on the /usr partition (where the tmpDSK file is stored). You are welcome to manually create a /tmp partition if you prefer to use a larger size.

    Thank you.
     
  4. gadalf

    gadalf Well-Known Member

    Joined:
    Jun 8, 2014
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Thank you for your reply,
    I tried to follow the steps and when i reached at:
    Code:
    vi /etc/fstab
    I did not received the end results showed.

    Once it asked me to use
    to overwrite it and now i keep getting cp: overwrite.
    see the attached picture please! Untitled.jpg
     
  5. server9host

    server9host Well-Known Member

    Joined:
    Sep 18, 2013
    Messages:
    160
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    Please perform tune2fs -c for new tmp partition to adjust filesystem parameters.
     
  6. gadalf

    gadalf Well-Known Member

    Joined:
    Jun 8, 2014
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    I failed again :(
    I am not very good in linux plz take a look what i did and explain i details plz 2.jpg
     
  7. server9host

    server9host Well-Known Member

    Joined:
    Sep 18, 2013
    Messages:
    160
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    /tmp writing process running on server that why you face this issue. Please stop all services then try to backup the /tmp file.

    If still face issue then run below command :

    Code:
     lsof |grep /tmp 
    you will see what processes are still writing and you can kill them: kill -9 PID. or do

    Code:
    umount -l /tmp
    umount -l /var/tmp
    Then try to backup the your tmp directory and proceed for further steps.

    Thanks
     
  8. gadalf

    gadalf Well-Known Member

    Joined:
    Jun 8, 2014
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Thank you for your reply but i still have not yet resolved it.
    It keeps increasing, I contacted my compamy where I got the vps and here is their reply:
    Can you tell me please how to access /tmp/eaccelerator and see what files are there?
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You could modify the following line in your /usr/local/lib/php.ini file:

    Code:
    eaccelerator.cache_dir="/tmp/eaccelerator"
    To:

    Code:
    eaccelerator.cache_dir="/home/eaccelerator"
    Then run the following commands:

    Code:
    mv /tmp/eaccelerator /home/
    /scripts/restartsrv_httpd
    Thank you.
     
  10. gadalf

    gadalf Well-Known Member

    Joined:
    Jun 8, 2014
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Thank you very much for you reply,
    Please tell me how to access to this file
    ?
    What comand I should run to access that, or i can access from WHM?
     
  11. server9host

    server9host Well-Known Member

    Joined:
    Sep 18, 2013
    Messages:
    160
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    You can access the php.ini file using below command :

    Code:
     vi /usr/local/lib/php.ini 
    Thanks
     
  12. gadalf

    gadalf Well-Known Member

    Joined:
    Jun 8, 2014
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    thank you!
     
  13. aravindan

    aravindan Registered

    Joined:
    Dec 30, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi ,

    Can I able to increase /tmp partition size to 10 GB or more than that ?

    Thanks
    Aravindan R
     
  14. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page