increasing /usr/tmpDSK directory

gadalf

Well-Known Member
Jun 8, 2014
50
0
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?
 

server9host

Well-Known Member
Sep 18, 2013
160
0
16
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. :)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,220
463
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.
 

gadalf

Well-Known Member
Jun 8, 2014
50
0
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
tune2fs -c
to overwrite it and now i keep getting cp: overwrite.
see the attached picture please!Untitled.jpg
 

server9host

Well-Known Member
Sep 18, 2013
160
0
16
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
 

gadalf

Well-Known Member
Jun 8, 2014
50
0
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:
In your particular case we notice around 4 gb of data at /tmp/eaccelerator when you might want to have a look and delete if you think it is not of any use to you.
Can you tell me please how to access /tmp/eaccelerator and see what files are there?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,220
463
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?
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.
 

server9host

Well-Known Member
Sep 18, 2013
160
0
16
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,220
463