yamaharr1

Well-Known Member
Jun 22, 2007
94
2
58
I have read and read and read so many posts but the posts are very out dated and many of the commands I see in them do not work. An example is if I use the command "lsof /tmp | grep deleted" to see why my tmp is getting filled up it is not recognized.

Can anyone give an up to date list of commands and instructions on how to resizing the tmp partition?

I am using a Linux system and need to go from 485M to 1G
 

yamaharr1

Well-Known Member
Jun 22, 2007
94
2
58
Looks interesting is there any information on how to use it? Or where to place the script?
 

thewebhosting

Well-Known Member
May 9, 2008
1,199
1
68
You must be root to run this script. You can place this script inside /root.
 

Infopro

Well-Known Member
May 20, 2003
17,090
518
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
You might do better to use cPanels securetmp script. Searching the forums for securetmp brings back several posts, including this one with chirpy's details on how to remove and recreate tmp.
http://forums.cpanel.net/showthread.php?t=76122&highlight=securetmp

If you followed that after editing /scripts/securetmp with the size you want tmp to be you should be gold.
 

yamaharr1

Well-Known Member
Jun 22, 2007
94
2
58
I have had to use one of these guides already to repair tmpDSK but I didn't think about editing the /scripts/securetmp to create a larger area but would that really work?
 

yamaharr1

Well-Known Member
Jun 22, 2007
94
2
58
As I mentioned in my first post I have "read and read and read" I guess I should have said I have search and read, search and read, search and read but there just comes a time when enough is enough and you must post hoping for others to point you in the right direction.

Now off to the search functions again to see if I can find some guides on using the / scripts/securetmp to also resize not my ideal way of doing things but hopefully it will be acceptable.
 

h4f

Well-Known Member
Jun 5, 2007
67
1
156
Can we modify the script to resize the /var partition?
Increase the size in the /scripts/securetmp directory and then copy paste the commands below, have just done it on 5 servers worked good.

service mysql stop
service httpd stop
umount /var/tmp
umount /tmp
rm -rf /usr/tmpDSK
/scripts/securetmp --auto
service mysql start
service httpd start
df -h
 

innsites

Well-Known Member
Nov 30, 2005
57
0
156
cannot resize /tmp -- WHY?

I edited /scripts/securetmp:
my $tmpdsksize = 15360000; # Must be larger than 250000

Then
[email protected] [~]# /usr/sbin/lsof /tmp

Then went through steps described in post. Got this response:
umount: /tmp: device is busy
umount: /tmp: device is busy
Proceeded:
[email protected] [~]# /scripts/securetmp --auto
Securing /tmp & /var/tmp
/tmp is already secure
Setting up /var/tmp... Done
Checking fstab for entries ...Done
Logrotate TMPDIR already configured
Process Complete

BUT no change in size?
[email protected] [~]# df -h
Filesystem Size Used Avail Use% Mounted on
/usr/tmpDSK 485M 460M 0 100% /tmp
 

charliesxia

Member
Aug 3, 2006
18
1
153
I changed the tmp dir 1G to 4G successfully
but after the reboot it turn back to 1G
anyone can help ??
Thank you
service mysql stop
service httpd stop
umount /var/tmp
umount /tmp
rm -rf /usr/tmpDSK
/scripts/securetmp --auto
service mysql start
service httpd start
df -h
 

ModServ

Well-Known Member
Oct 17, 2006
337
5
168
Egypt
cPanel Access Level
Root Administrator
Do that step by step:

pico /scripts/securetmp
Modify "my $tmpdsksize"

service mysql stop
service httpd stop
pstree -p | grep tailwatchd
then kill the processes
umount /var/tmp
fuser -cu /tmp
then kill all processes appears to you
umount /tmp
rm -rf /usr/tmpDSK
/scripts/securetmp --auto
service mysql start
service httpd start

reboot -n

Done