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.

Increase /tmp directory

Discussion in 'General Discussion' started by Sebastienbo, Jul 15, 2014.

  1. Sebastienbo

    Sebastienbo Member

    Joined:
    Jul 14, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    My temp is 485mb and always running full, I've altered the securetmp script to have 2048 mb

    I've tried all the procedures on this article (but none worked):
    http://forums.cpanel.net/f34/resolved-increase-space-tmp-387211.html

    But even aft'er reboots nothing is working I stay with my small tmp disk

    BTW: I've searched the tmpDSK file but it was nowhere to be found...

    root@vps [/home/logistix]# cd /usr
    root@vps [/usr]# ls -la
    total 144
    drwxr-xr-x. 14 root root 4096 Jun 5 2013 ./
    dr-xr-xr-x. 26 root root 4096 Jul 15 15:41 ../
    dr-xr-xr-x. 2 root root 36864 Jul 15 13:29 bin/
    drwxr-xr-x. 2 root root 4096 Jun 5 2013 etc/
    drwxr-xr-x. 2 root root 4096 Sep 23 2011 games/
    drwxr-xr-x. 67 root root 12288 Jul 14 12:24 include/
    dr-xr-xr-x. 30 root root 4096 Jun 10 16:45 lib/
    drwxr-xr-x. 58 root root 36864 Jul 15 02:02 lib64/
    drwxr-xr-x. 18 root root 4096 Jun 10 15:49 libexec/
    drwxr-xr-x. 21 root root 4096 Jul 15 13:12 local/
    drwxr-xr-x. 4 root root 4096 Jun 5 2013 man/
    dr-xr-xr-x. 2 root root 12288 Jul 15 02:03 sbin/
    drwxr-xr-x. 125 root root 4096 Jun 10 16:19 share/
    drwxr-xr-x. 4 root root 4096 Jul 8 04:40 src/
    lrwxrwxrwx. 1 root root 10 Jun 5 2013 tmp -> ../var/tmp/
    root@vps [/usr]# find / -name tmpDSK
    root@vps [/usr]# cd /


    Can someone help me ?
     
  2. Sebastienbo

    Sebastienbo Member

    Joined:
    Jul 14, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Re: Increase /tmp folder

    I've been able to create it with dd, but it looks like its not beeing utilised

    SO I don't know where tmp is getting those 512mb from...but it's certainly not from the tmpdsk
     
  3. Sebastienbo

    Sebastienbo Member

    Joined:
    Jul 14, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Re: Increase /tmp folder

    I've find a custumised solution, it seems that the mkfs was the problem, it stopped at mkfs and then I had to re-execute it to make it work.
    So my script is now in two parts, to make it work, i now got a 2GB tmp (4 times bigger then initially) offcourse I also edite the securetmp file so that the next reboot doesn't kill my changes


    /etc/init.d/cpanel stop
    /etc/init.d/httpd stop
    /etc/init.d/lsws stop
    /etc/init.d/mysql stop
    cp -af /var/tmp /var/tmp.bak
    umount /var/tmp
    umount /tmp
    rm -f /usr/tmpDSK
    dd if=/dev/zero of=/usr/tmpDSK bs=1024 count=2048576
    mkfs /usr/tmpDSK

    mkfs /usr/tmpDSK
    tune2fs -j /usr/tmpDSK
    mount -t ext3 -o nosuid,noexec,loop /usr/tmpDSK /tmp
    mount -o bind,noexec,nosuid /tmp /var/tmp
    cp -a /var/tmp.bak/* /tmp/
    rm -rf /var/tmp.bak/
    chmod 1777 /tmp
    /etc/init.d/mysql start
    /etc/init.d/httpd start
    /etc/init.d/cpanel start
    /etc/init.d/lsws start

    - - - Updated - - -

    Dohhh, After reboot I got again 512mb tmp!!!

    Can someone help here, please
     
  4. Sebastienbo

    Sebastienbo Member

    Joined:
    Jul 14, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Ok, everything works now with this script (and change the securetmp script value to 4G)


    /etc/init.d/cpanel stop
    /etc/init.d/httpd stop
    /etc/init.d/lsws stop
    /etc/init.d/mysql stop
    cp -af /var/tmp /var/tmp.bak
    umount /var/tmp
    umount /tmp
    rm -f /usr/tmpDSK
    /scripts/securetmp
    /etc/init.d/mysql start
    /etc/init.d/httpd start
    /etc/init.d/cpanel start
    /etc/init.d/lsws start
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

Share This Page