How to increase the disk space on tmp?

Status
Not open for further replies.

Divvy

Active Member
806
2009
18
0
Hi guys,

Can someone help me?
How can I increase the disk space on tmp?
I have only 500MB and is not enough when the system tries to make the backups...
What value do you recommend?

Can someone give me the exactly ssh commands to do that? Thanks :-)

V4a5RyU.png


I tried this tutorials:
http://forums.cpanel.net/f5/drive-critical-dev-loop0-var-tmp-97-full-190772.html
http://blog.shineservers.com/how-to-increase-size-of-vartmp-and-tmp-centos/

But without luck...

My /usr/local/cpanel/scripts/securetmp content:

Code:
root@server [~]# vi /usr/local/cpanel/scripts/securetmp
#!/usr/local/cpanel/3rdparty/bin/perl
# cpanel - scripts/securetmp Copyright(c) 2012 cPanel, Inc.
# All rights Reserved.
# copyright@cpanel.net http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

use strict;
use Cpanel::SafeFile ();
use Cpanel::OSSys ();
use Cpanel::Filesys ();
use Cpanel::DiskLib ();
use Getopt::Long;
use Cpanel::Logger ();
use Cpanel::SafeRun::Errors ();
use Cpanel::SafeRun::Simple ();

my $logger = Cpanel::Logger->new();

$| = 1;

if ( -e '/var/cpanel/version/securetmp_disabled' ) {
print "[securetmp] Disabled per /var/cpanel/version/securetmp_disabled\n";
exit;
"/usr/local/cpanel/scripts/securetmp" 681L, 21312C
 
Last edited:
5 comments
Hi,


Someone told me to try this command:
Code:
nano +148 /usr/local/cpanel/scripts/securetmp


But "trying" is a strong word... don't want to "try" ssh commands, I need to have sure that really works.


Can someone tell me if this command is safe?


The problem is that I cant find the line to edit:
$tmpdsksize = 512000;


Using the command:
Code:
# nano /usr/local/cpanel/scripts/securetmp
Or
Code:
# pico /scripts/securetmp


Where could this line be hidden!? Any ideas?


Thanks!
 
The problem was me... I forgot to scroll down the file lol :-)
Btw, I changed to 10GB but only appears 4GB. Is 4GB the maximum size that $tmpdsksize can handle?

I need a bigger value because tmp partition goes full when the scheduled backup runs. I think that is because Im using the remote ftp. Is there any alternative solution for me?

Thanks!
 
Thank you for your reply :-)
But as you can see above, this was fixed already.

But I made a new question:
I need a bigger value because tmp partition goes full when the scheduled backup runs. I think that is because Im using the remote ftp. Is there any alternative solution for me?


Thanks!
 
Thank you for your reply :-)
But as you can see above, this was fixed already.

But I made a new question:
I need a bigger value because tmp partition goes full when the scheduled backup runs. I think that is because Im using the remote ftp. Is there any alternative solution for me?


Thanks!

Name this (for instruction purpose) to extend.sh (anywhere)
Code:
/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=10240 count=1048576
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

Now do this
Code:
chmod +x extend.sh
sh extend.sh

Thats it ;)
 
Status
Not open for further replies.
Back
Top