The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cannot upgrade due to insufficent disk space

Discussion in 'Workarounds and Optimization' started by Legin76, Jul 16, 2013.

  1. Legin76

    Legin76 Well-Known Member

    Joined:
    Dec 11, 2007
    Messages:
    151
    Likes Received:
    1
    Trophy Points:
    18
    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
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,785
    Likes Received:
    665
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  3. thinkbot

    thinkbot Well-Known Member

    Joined:
    Oct 30, 2012
    Messages:
    326
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    read this

    /http://mislanka.blogspot.com/2010/09/disk-space-not-updating-in-linux-df-h.html
     
  4. Legin76

    Legin76 Well-Known Member

    Joined:
    Dec 11, 2007
    Messages:
    151
    Likes Received:
    1
    Trophy Points:
    18
    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.
     
    #4 Legin76, Jul 17, 2013
    Last edited: Jul 17, 2013
  5. thinkbot

    thinkbot Well-Known Member

    Joined:
    Oct 30, 2012
    Messages:
    326
    Likes Received:
    0
    Trophy Points:
    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
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,785
    Likes Received:
    665
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  7. Legin76

    Legin76 Well-Known Member

    Joined:
    Dec 11, 2007
    Messages:
    151
    Likes Received:
    1
    Trophy Points:
    18
    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.
     
Loading...

Share This Page