If you find issues with the /tmp partition showing fs error, this would require recreation of /tmp partition. Also, there may problem with the partition /tmp is too small while linux server setup. Sometimes this is very annoying because if there is a service that requires /tmp and found the partition /tmp is full so the service can not run normally. Follow the steps to increase the size of /tmp partition.
/etc/init.d/cpanel stop
/etc/init.d/httpd stop
/etc/init.d/lsws stop
/etc/init.d/mysql stop
Umount /tmp and /var/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. Then do
umount -l /tmp
umount -l /var/tmp
If you get the error as "Device busy, open the fstab and hash (#) the entries associated with /tmp, and reboot the server. Once reboot , type the command
df -h, you could see that the tmp partition has vanished.
Now, move /usr/tmpDSK file to another location
mv /usr/tmpDSK /usr/tmpDSK_back
Modify /scripts/securetmp to set tmpdsksize to desired size:
vi /scripts/securetmp
$tmpdsksize = 2048000(This is 2GB)
Run this script to recreate /tmp
/scripts/securetmp
Start cpanel, apache (litespeed), mysql services:
/etc/init.d/cpanel start
/etc/init.d/httpd start
/etc/init.d/lsws start
/etc/init.d/mysql start
Now, type df -h, you could find /tmp partition with 2GB size.
Done
/etc/init.d/cpanel stop
/etc/init.d/httpd stop
/etc/init.d/lsws stop
/etc/init.d/mysql stop
Umount /tmp and /var/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. Then do
umount -l /tmp
umount -l /var/tmp
If you get the error as "Device busy, open the fstab and hash (#) the entries associated with /tmp, and reboot the server. Once reboot , type the command
df -h, you could see that the tmp partition has vanished.
Now, move /usr/tmpDSK file to another location
mv /usr/tmpDSK /usr/tmpDSK_back
Modify /scripts/securetmp to set tmpdsksize to desired size:
vi /scripts/securetmp
$tmpdsksize = 2048000(This is 2GB)
Run this script to recreate /tmp
/scripts/securetmp
Start cpanel, apache (litespeed), mysql services:
/etc/init.d/cpanel start
/etc/init.d/httpd start
/etc/init.d/lsws start
/etc/init.d/mysql start
Now, type df -h, you could find /tmp partition with 2GB size.
Done