You may have noticed that CPanel’s default partition size for /tmp is 512 MB, which in some cases can be way small.
sometime you may get this report email:
Drive Critical: /usr/tmpDSK (/tmp) is 100% full
Also cPanel automatically deletes the unused files, the /tmp would be getting full very quickly on a busy server.
if you want to increase the size of tmpdsk read the following.
Done!
- Stop MySQL, Apache, and cPanel to prevent writing to the /tmp partition.
- Copy the contents of /tmp to another location, such as /tmp_backup – cp -rfp /tmp /tmp_backup).
- Unmount /tmp. If you’re unable to do this you can run this command : lsof |grep /tmp – you will see what processes are still writing and you can kill them : kill -9 %PID. Or do a lazy unmount : umount -l /tmp.
- Now you have to delete /usr/tmpDSK with this command : rm -rf /usr/tmpDSK
- Edit /scripts/securetmp : vi /scripts/securetmp
You have to look for this part :
my $tmpdsksize = 512000; # Must be larger than 250000- Now increase the “512000″ value and save it!
- Run this script to recreate /tmp : /scripts/securetmp
- Check the size of /tmp : df -h