Cannot upgrade due to insufficent disk space

Legin76

Well-Known Member
Dec 11, 2007
178
4
68
The latest upgrade to cpanel has failed due to insufficient space on the /usr partition. "Please correct these issues and rerun updates. •fatal: Cannot upgrade due to insufficent disk space. Detected 1.56G. You will need atleast 1.6G to install a new version of cPanel".

The partition sizes were the default / recommended option from softlayer at the time of setting up the server which is why the partitions are so small.

Previously I've moved the log files to free up space but now I have no idea what's left that I can safely move or delete. Below is the info on directory sizes etc.

Interestingly the /usr/local/src directory has 552mbs of content that I'm unable to view.

Code:
root@srv04 [/usr/local/src]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda5             7.8G  784M  6.6G  11% /
/dev/sda8             198G   27G  162G  14% /home
/dev/sda6             996M  721M  224M  77% /tmp
/dev/sda3             7.8G  5.8G  1.6G  79% /usr
/dev/sda2             9.7G  6.4G  2.9G  70% /var
/dev/sda1             122M   17M  100M  14% /boot
tmpfs                1014M     0 1014M   0% /dev/shm

root@srv04 [/usr]# du -sm * | sort -n
321     bin
831     lib
1213    share
3002    local

root@srv04 [/usr/share]# du -sm * | sort -n
31      icons
34      selinux
38      gtk-doc
41      frysk
44      foomatic
88      man
113     mysql-test
163     clamav
170     locale
260     doc

root@srv04 [/usr/share/doc]# du -sm * | sort -n
5       bash-3.2
5       libstdc++-devel-4.1.2
5       systemtap-client-1.8
6       swig-1.3.29
7       db4-devel-4.3.29
7       libxml2-devel-2.6.26
8       libstdc++44-devel-4.4.7
9       alsa-lib-devel-1.0.17
9       ghostscript-8.70
9       selinux-policy-2.4.6
14      Deployment_Guide-en-US-5.8
19      python-docs-2.4.3
25      ImageMagick-6.7.8
25      samba-3.0.33

root@srv04 [/usr/local]# du -sm * | sort -n
31      frontpage
41      apache.backup
45      apache
77      apache.backup_archive
274     cpanel-rollback
2474    cpanel

root@srv04 [/usr/local]# du -sm * | sort -n
26      cpaddons
30      Cpanel
184     modules-install
245     logs
267     whostmgr
299     bin
353     base
374     3rdparty
552     src

root@srv04 [/usr/local/src]# du -sm * | sort -n
du: cannot access `*': No such file or directory
root@srv04 [/usr/local/src]# ls
./  ../

root@srv04 [/usr/local/src]# du | sort -n
8   

root@srv04 [/usr/local/cpanel/3rdparty]# du -sm * | sort -n
35      php
42      mailman
46      lib
52      share
173     perl

root@srv04 [/usr/local/cpanel/3rdparty/perl/514/lib/perl5/cpanel_lib]# du -sm * | sort -n
5       Net
7       DBIx
10      DateTime
17      Locales
37      i386-linux-64int
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

It's likely a good idea to backup the accounts to a remote destination or drive, and then reinstall the Operating System/cPanel with sufficient space for the /usr directory. You can review the recommended partition setup at:

Recommended Partitions

Thank you.
 

Legin76

Well-Known Member
Dec 11, 2007
178
4
68
Is there no other way to increase the size of that partition by a small amount or something that can be moved / removed to make more? I'm only chasing 50kb of additional space for the moment.
 
Last edited:

thinkbot

Well-Known Member
Oct 30, 2012
326
1
16
cPanel Access Level
Root Administrator
in /usr/local
you should have some folders like apache.backup*
you can delete them

only apache folder is necessary to work

and this command
ls -ld /proc/*/fd/* 2>&1 | fgrep '(deleted)' | grep '/usr'

will give you some info about what files are used on /usr but their size not presented on df -h

edit. btw. you can always move files to other partition if you are not certain if its ok to delete or not
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Is there no other way to increase the size of that partition by a small amount or something that can be moved / removed to make more? I'm only chasing 50kb of additional space for the moment.
Yes, you could remove a directory such as:

/usr/local/cpanel-rollback

This feature is no longer implemented with cPanel as of version 11.30, so the directory is not required.

Thank you.
 

Legin76

Well-Known Member
Dec 11, 2007
178
4
68
That's great.. Thanks.. As I'm sure you realised I meant that I needed 50mb not kb.. I've deleted /usr/local/cpanel-rollback and /usr/local/apache.backup_archive directories and it has given me plenty for now.