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.

/usr disk space problem

Discussion in 'General Discussion' started by flashweb, Jun 12, 2003.

  1. flashweb

    flashweb Well-Known Member

    Joined:
    Mar 13, 2003
    Messages:
    243
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hi,

    I just upgraded Apache

    /scripts/easyapahe

    After that i could not created new accounts.

    WHM says

    File System usage is

    /dev/hda1 1.4G 262M 1.1G 19% /
    /dev/hda3 60G 3.6G 53G 7% /home
    none 248M 0 247M 0% /dev/shm
    /dev/hda2 7.7G 7.7G 0 100% /usr
    /dev/hda5 3.8G 1.2G 2.5G 31% /var


    /usr is almost used up.

    This i noticed after upgrading apache for SSL bug.

    This time easyapache won't run smoothly, it says

    httpd failed to start.

    I tryed killing the process and "service httpd start" worked.

    Now i can't create any more accounts.

    How i correct it.

    Regards,

    Yujin

    cPanel.net Support Ticket Number:
     
  2. md201

    md201 Active Member

    Joined:
    Aug 13, 2001
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    SSH as root to you service and run following command to find out what is using so much space in /usr partition

    cd /usr

    du -h -max-depth=1

    this will show you list of directories and space used, then check those directories which are consuming high disk space and delete unnecessary files from that directory,

    usually

    these are some directories consume high disk space

    /usr/local/apache/domlogs
    /usr/local/apache/logs << apache log files

    in this you can delete apache log files and restart apache.
    you can also delete domlogs files (caution these are user access files) or shift these directories to other partitions and then create symbolic link to get some breathing space /usr

    also cpanel creates its own log

    i guess in

    /usr/local/cpanel/<some where here i guess its logs directory - i am toooo lazy to check it on my server :D )

    hope this helps.

    cPanel.net Support Ticket Number:
     
  3. flashweb

    flashweb Well-Known Member

    Joined:
    Mar 13, 2003
    Messages:
    243
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
  4. rhood

    rhood Well-Known Member

    Joined:
    Feb 15, 2003
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    The easyapache script is a little buggy and will sometimes not start Apache properly, resulting in lots of core files. To remove these, use the following commands (below), without the quotes of course.

    1. "cd /usr/local/apache"
    2. "ls alh" (to check whether this is the problem... if yo usee lots of "core.542" or similar files use the following command to delete them)
    3. "rm -f core*"

    All done! Your /usr partition usage should be back to normal.

    cPanel.net Support Ticket Number:
     
  5. rhood

    rhood Well-Known Member

    Joined:
    Feb 15, 2003
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    Basically "rm -f core*" will automatically delete all files beginning with core in the directory you are in (make sure to change to /usr/local/apache first before using it). Be VERY careful with this command.

    If you are unsure, you can delete them manually using "rm core.XXX", where XXX represents the full file name.

    cPanel.net Support Ticket Number:
     
  6. HollyRidge

    HollyRidge Well-Known Member

    Joined:
    Feb 25, 2003
    Messages:
    138
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Garner NC USA
    cPanel Access Level:
    Root Administrator
    Thank you!!! You saved me a major headache!! :)

    cPanel.net Support Ticket Number:
     
  7. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    900
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Norfolk, VA
    cPanel Access Level:
    DataCenter Provider
    27 gigs later!!! Eesh!!!

    cPanel.net Support Ticket Number:
     
  8. Curt

    Curt Well-Known Member

    Joined:
    Oct 16, 2001
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    You are lucky the core files did not totally fill up your /usr.

    I have had this happen in the past and it wiped my httpd.conf file clean because it had no space to write the updated file to.

    The cpanel staff advised us to stop httpd in the future while running easyapache. The core files seem to be produced when httpd is not stopped while running easyapache. You will also need to stop chkservd so it does not restart apache.

    Before running easyapache it might be a good idea to do this first:

    /etc/rc.d/init.d/chkservd stop
    /etc/rc.d/init.d/httpd stop
    run easyapache

    After httpd restarts do this:

    /etc/rc.d/init.d/chkservd start

    Ever since I have followed this process I never see the core file issue.

    cPanel.net Support Ticket Number:
     
  9. Solokron

    Solokron Well-Known Member

    Joined:
    Aug 8, 2003
    Messages:
    849
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle
    cPanel Access Level:
    DataCenter Provider
    I hate to renew old threads but someone is going to run into this and run into a headache. When deleting core files I don't recommend using core.* to delete as the PHP Smarty library which is used by many scripts has a directory full of core. files often called internals.

    If you are going to erase across a directory such as /home use

    find /home -name core.[0-9]* | xargs rm -f {} \;

    or something along those lines.
     
  10. jack01

    jack01 Well-Known Member

    Joined:
    Jul 21, 2004
    Messages:
    200
    Likes Received:
    0
    Trophy Points:
    16
    Solokron, Nice one!

    After upgrading to Zend Optimizer 3.00 all users using PHP were inundated with core.<number> dump files in their directories. The command you provided was ideal for clearing ONLY those and not generally core.*

    (Of course I had to downgrade Zend Optimizer back to 2.6.2!!! What a mess Zend has caused this time ...)
     
Loading...

Share This Page