Centos: How to fix cPanel update insufficient disk space

cpsizeerror There are certain situations when you can encounter such cPanel update error message.
In order to update cPanel has to download new files and packages to replace outdated. For this it requires about 1.8Gb of free space on /usr partition. What can you do to fix the problem if you get this error message ?

The course of action heavily depends on your server initial disk layout:

  1. You have single partition disk for everything (i.e. /, /home, /usr, and /var are on the same partition) and you suddenly don’t have spare 1.6Gb on it to update cPanel. That actually means bigger problems all together because any spike in disk usage – rapidly growing log file or cPanel upgrade can use all available disk space. The only possible solution apart of reinstallation is to add 1 more disk to the server and evacuate some disk content there. Possible candidates for evacuation /home, /var or /usr whichever is bigger.
  2. If you have multiple filesystems you have an option to transfer cPanel files from /usr/local to another filesystem that has more free space – if none of your server filesystems have 3+Gb free space available you will have to resort to the solution from item 1 – adding another disk.
  3. If you can move cPanel files to another filesystem that has more free space, lets say /home – this is how you do it:
  4. Login to cPanel via your web browser and check if everything works correctly. If you are satisfied you can go back to ssh terminal and safely remove /usr/local/cpanel_old and run software update manually from WHM menu

Important Update:
It seems that symlink method breaks cPanel functionality because some scripts use real path to determine CWD. SO the proper way would be to mount –bind from cpanel new location to default location:

Share Button
  1. your fstab is incorrect. Right one is:
    /home/cpanel /usr/local/cpanel none defaults,bind 0 0

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">