Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    2

    Default How to reduce space in /usr partition?

    Hi,

    There is similar thread, but I can`t find any useful information in it, so I've opened another one.
    My /usr partition is filling up about 5% per day.

    Filesystem Size Used Avail Use% Mounted on
    /dev/sda3 9.7G 6.6G 2.7G 72% /usr

    The problem is that I have no idea where/which files are filling up.
    I've deleted ALL logs in /usr/local/apache/domlogs but it caused like 1% of space.

    Here are all files which exceed 20MB on /usr

    /usr/lib/locale/locale-archive: 54M
    /usr/bin/php: 20M
    /usr/lib64/xulrunner-1.9/libxul.so: 23M
    /usr/local/apache/modules/libphp5.so: 21M
    /usr/local/apache/logs/error_log: 26M
    /usr/local/apache/logs/access_log: 31M
    /usr/local/cpanel/cgi-sys/php5: 20M
    /usr/local/cpanel/cpanel: 31M
    /usr/local/cpanel/whostmgr/bin/whostmgr5: 28M
    /usr/local/cpanel/whostmgr/bin/whostmgr: 34M
    /usr/local/cpanel/whostmgr/bin/whostmgr2: 35M
    /usr/local/cpanel/whostmgr/bin/xml-api: 27M
    /usr/local/cpanel/bin/wwwacct: 21M
    /usr/local/bin/php: 20M

    As you can see, there is no any big file like log or something.

    I've also tried to set logs in rotation(WHM) but it didn`t help either.
    Last edited by tedy; 10-25-2009 at 09:00 PM.

  2. #2
    Registered User
    Join Date
    Oct 2009
    Posts
    2

    Default

    I've just found out another strange think:

    # du -sh /usr
    3.3G /usr

    # df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda3 9.7G 6.6G 2.7G 72% /usr


    Any replies appriciated

  3. #3
    Member
    Join Date
    Jul 2008
    Location
    localhost
    Posts
    101

    Default

    Hi..

    Please try the command below. It will find for the files consuming much disk space.
    find /usr -size +1000000000c
    Note :: find command might increase the load on server.

  4. #4
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,555
    cPanel/Enkompass Access Level

    DataCenter Provider

    Lightbulb

    I suggest using "du" to gradually search deeper levels of directories within the "/usr" partition.

    The following command could be used as a starting point:
    Code:
    # du -ahx --max-depth=1 /usr
    To check levels deeper, simply append more directory structure to the path, such as the following examples:
    Code:
    # du -ahx --max-depth=1 /usr/local
    # du -ahx --max-depth=1 /usr/local/apache
    # du -ahx --max-depth=1 /usr/local/apache/logs
    # du -ahx --max-depth=1 /usr/local/cpanel/logs
    I recommend reviewing the manual "man" page for "du" to become more familiar other options and usage examples:
    Code:
    # man du

  5. #5
    Member
    Join Date
    Apr 2009
    Posts
    230

    Default

    Hope this helps :

    1. Restart the httpd service. This might free a little space some times.

    2. Check for apache logs like error_log, access_log , suexec_log in /usr/local/apache/logs . These can either be cleared off or if you need the logs then you can take a zipped copy and keep it aside.

    3. Same can be done for the files in cPanel logs (/usr/local/cpanel/logs) as well .

    4. Domlogs – Get into the /usr/local/apache/domlogs/ directory. Run the following command :-

    # ls -al -SR | head -10 —> It will list 10 files in the decreasing order according to their size

    If the domlog file is too large for a domain then it is possible that awstats is not running . Check whether cpanellogd is running on the server using pstree . If not, restart it .
    Else, it is possible that awstats for only that particular domain is not updating. Get into the directory /usr/local/cpanel/base and check if any file as ‘awstats.domainname.com.conf’ exists. If yes , delete that file.

    Now, run /scripts/runweblogs for that user. It will update the awstats and automatically clear the domlogs file thereafter. Do not delete the domlogs file itself.

    5. Remove old and unwanted backups of ‘apache’ that might have been taken long ago. Also, check for any other duplicate folders that can be removed safely.

    6. Remove core files, if any . Normally, some core files (like core.1234) might be present in /usr/local/cpanel/whostmgr/docroot . Check for these and remove them.

Similar Threads & Tags
Similar threads

  1. Reduce disc space / mysql query
    By oldlock in forum New User Questions
    Replies: 1
    Last Post: 06-05-2009, 10:41 PM
  2. Replies: 5
    Last Post: 05-15-2009, 08:47 AM
  3. How to reduce space in usr partition : killall -9 httpd
    By sebans in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 05-15-2009, 08:47 AM
  4. /usr partition full
    By danielco in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 07-26-2008, 08:17 AM
  5. resize partition /usr
    By powerflash in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 07-07-2005, 03:45 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube