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.
  1. Stop MySQL, Apache, and cPanel to prevent writing to the /tmp partition.
  2. Copy the contents of /tmp to another location, such as /tmp_backup – cp -rfp /tmp /tmp_backup).
  3. 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.
  4. Now you have to delete /usr/tmpDSK with this command : rm -rf /usr/tmpDSK
  5. Edit /scripts/securetmp : vi /scripts/securetmp
    You have to look for this part :
    my $tmpdsksize = 512000; # Must be larger than 250000
  6. Now increase the “512000″ value and save it!
  7. Run this script to recreate /tmp : /scripts/securetmp
  8. Check the size of /tmp : df -h
Done!