Published on: July 17, 2009 by George K.
Usually big hosting firms, who have a proper sys-admin department in house, will have a proper cPanel partitioning scheme as well. But some players in the industry goes with the default partitioning scheme, diskdruid presents i.e /, /boot, and swap. While installing cPanel it uses a script to provide a loopback device to make /tmp, nosuid and noexec set . But the script never asks for the size of /tmp partition and instead creates a default 512MB /tmp partition.
Situations may arise which asks for increasing the /tmp partition in such cases and this is how it is done.
If you get the error “ioctl: LOOP_CLR_FD: Device or resource busy” while doing umount, do the umount /tmp again. If it still says resource busy, it’s time to approach your sysadmin. Or else system may stop responding on further actions.
replace “512000″ “2048000″ — /scripts/securetmp
If you don’t want to edit /scripts/securetmp directly, you can use the below script. Create a file, paste the small script below, and then run “sh file_name_you_created”
echo -n "How many GB you want the /tmp to be ? "
echo "Editing /scripts/securetmp file to have tmp size to $GB GB"
replace "512000" "$((GB*1024000))" -- /scripts/securetmp
/usr/bin/chattr +i /scripts/securetmp
A df -h after that should show the increased size. If for any reason your machine hangs, we are not responsible 🙂
Category : cPanel, General, Howtos