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/ getting full

Discussion in 'General Discussion' started by GoWilkes, Nov 8, 2013.

  1. GoWilkes

    GoWilkes Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    My /usr/ directory keeps getting above 90%, but the regular log directories don't seem all that large to me. According to du, here are my directory sizes:

    /domlogs/ = 232MB
    /logs/ = 16MB

    The partition is 7.75G, so 248MB in logs doesn't seem like a very large percentage.

    I know that I can move /domlogs/ to /home/ and set up a symlink, but I really don't want to waste space on /home/ if I don't have to. I've never actually looked at /domlogs/ for anything relevant; can this directory just be killed? If so, how?

    Also, I see /usr/local/apache.backup/ and /usr/local/apache.backup_archive/. These aren't huge (36M and 8k, respectively), but am I correct in understanding that they can be removed entirely?

    What else can I do to permanently free up space?
     
  2. MikeDVB

    MikeDVB Well-Known Member
    PartnerNOC

    Joined:
    Jun 4, 2008
    Messages:
    212
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Indiana, USA
    Code:
    du | sort -n | awk '{if($1>50) printf("%s     %s\n",$1,$2);}'
    Run that from within /usr and it will give you an idea of where all of your usage is.
     
  3. GoWilkes

    GoWilkes Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Am I right in understanding that this sorts with the largest files at the bottom? If so, here are the last ones listed from /usr/:

    Code:
    202936     ./local/cpanel/modules-install/clamavconnector-Linux-x86_64/clamav-0.97.8
    216992     ./bin
    217436     ./local/cpanel/modules-install/clamavconnector-Linux-x86_64
    217532     ./local/cpanel/modules-install
    219608     ./share/doc
    332472     ./local/cpanel/whostmgr/bin
    360764     ./local/cpanel/src/3rdparty/gpl
    366568     ./local/apache/domlogs
    368080     ./local/cpanel/whostmgr
    375628     ./lib
    400616     ./local/cpanel/3rdparty
    408512     ./local/cpanel/src/3rdparty
    412552     ./local/cpanel/src
    424772     ./local/apache
    463460     ./local/cpanel/bin
    490336     ./local/cpanel/base
    494616     ./lib64
    1137816     ./share
    2622332     ./local/cpanel
    3163508     ./local
    5799680     .
    

    The big directory is /usr/local, and when I go there I get:

    Code:
    178832     ./cpanel/base/frontend
    187028     ./cpanel/bin/admin/Cpanel
    187032     ./cpanel/bin/admin
    187964     ./cpanel/3rdparty/perl/514/lib64/perl5
    187968     ./cpanel/3rdparty/perl/514/lib64
    190332     ./cpanel/3rdparty/perl/514
    190336     ./cpanel/3rdparty/perl
    202936     ./cpanel/modules-install/clamavconnector-Linux-x86_64/clamav-0.97.8
    217436     ./cpanel/modules-install/clamavconnector-Linux-x86_64
    217532     ./cpanel/modules-install
    332472     ./cpanel/whostmgr/bin
    360764     ./cpanel/src/3rdparty/gpl
    368064     ./cpanel/whostmgr
    370308     ./apache/domlogs
    400616     ./cpanel/3rdparty
    408512     ./cpanel/src/3rdparty
    412552     ./cpanel/src
    428564     ./apache
    463460     ./cpanel/bin
    490336     ./cpanel/base
    2622316     ./cpanel
    3167284     .
    
    Those are just the last screen, of course; I didn't want to paste the whole list filled with small files. But none of these seem particularly large, do they?
     
  4. GoWilkes

    GoWilkes Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Even though /domlogs/ isn't really the problem, it's the only larger files that I know I can deal with. I'm guessing there's really nothing under /usr/local/cpanel that I can delete.

    If I want to move /domlog/ to /home/, can someone confirm this is correct before I run it?

    mv /usr/local/apache/domlogs /home/domlogs (do I need to create /home/domlogs first?)

    cd /usr/local/apache
    ln -s /home/domlogs domlogs
     
  5. GoWilkes

    GoWilkes Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Since no one replied, I threw a dart at the board and just pasted what I had (my /usr/ was at 100%, so I didn't have much of a choice).

    For anyone reading this, know that something's wrong with the "mv" command. I created /home/domlogs/, then when I ran:

    mv /usr/local/apache/domlogs /home/domlogs

    it created /home/domlogs/domlogs/. I tried running this to move everything up a directory:

    mv /home/domlogs/domlogs ..

    and now all of the log files are gone.

    After that, though, the next two commands seemed to work correctly:

    cd /usr/local/apache
    ln -s /home/domlogs domlogs
     
  6. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    In what directory were you when you did that?
    Because you moved everything one step up from the "currecnt working directory".
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,787
    Likes Received:
    665
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    If you need to complete this action again in the future, you could simply run the following commands:

    Code:
    cd /usr/local/apache
    mv domlogs /home/domlogs
    ln -s /home/domlogs domlogs
    /scripts/restartsrv_httpd
    
    Thank you.
     
  8. GoWilkes

    GoWilkes Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Ahh, didn't think about that! I was in /usr/local/apache/, and you're right, they're now in /usr/local/domlogs/.

    I guess they've all been recreated now, though, so all I can really do is delete these.
     
Loading...

Share This Page