Tuesday, July 19, 2011

Increase size of tmpDSK cPanel

The default temp partion size in cpanel is 512mb which is usually not enough and creates errors such as "Drive Critical: /usr/tmpDSK (/tmp) is 99% full".

It can be increased as follows using the following commands....


stop services, mysql,apache and cpanel
root@server [~]# /etc/init.d/mysql stop
root@server [~]# /etc/init.d/httpd stop
root@server [~]# /etc/init.d/cpanel stop

backup the /tmp folder
root@server [~]# cp -rfp /tmp /tmp_backup

lazy unmount of /tmp
root@server [~]# umount -l /tmp

remove tmpDSK
root@server [~]# rm -rf /usr/tmpDSK

edit securetmp script, find my $tmpdsksize = 512000; # Must be larger than 250000
increase to necessary for example 2gb my $tmpdsksize = 2072000;
root@server [~]# nano /scripts/securetmp

run securetmp script to recreate /tmp (tmpDSK) partition at size specified
root@server [~]# /scripts/securetmp

No comments: