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.

need space on /usr

Discussion in 'General Discussion' started by golden_eyes, Apr 26, 2011.

  1. golden_eyes

    golden_eyes Well-Known Member

    Joined:
    Aug 9, 2010
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    Hey,

    I'm always receiving such as these notifications:

    Drive Warning: /dev/sda3 (/usr) is 81% full
    Drive Warning: /dev/sda3 (/usr) is 93% full

    Each time I login in into /usr/local/apache/domglogs and purging the bigger size, but this is not the professional solution for this problem, if you see below:

    root@web [/usr/local]# du -sh *
    3.1G apache
    41M apache.backup
    81M apache.backup_archive
    108K bandmin
    20M bin
    8.7M burnintest
    8.0K clamav
    1.9G cpanel
    1.6M cpanel-rollback
    12K etc
    31M frontpage
    8.0K games
    2.7M include
    884K IonCube
    106M lib
    8.0K lib64
    8.0K libexec
    28K man
    84K rvsubversion
    1.7M sbin
    38M share
    8.0K src
    0 ssl
    1.7M Zend


    so the biggest folder is the appache:

    root@web [/usr/local/apache]# du -sh *
    1.6M bin
    288K build
    12K cgi-bin
    3.2M conf
    420K conf_pre_ea3
    1.8G domlogs
    208K error
    0 etc
    60K htdocs
    944K icons
    1.4M include
    1.2M lib
    1.3G logs
    96K man
    16M manual
    20M modules

    so with the above result I can prove that the domlogs and logs are the biggest folder and they took space from the total of /usr, so I need your suggestion with the following commands before I apply them:

    for cpanel
    = = = = = = = = = = =
    Code:
    rm -rf /usr/local/cpanel/src/3rdparty/gpl/*.gz
    rm -rf /usr/local/apache.backup_archive
    rm -rf /usr/local/cpanel-rollback
    for logs
    = = = = = = = = = = =
    Code:
    cd /usr/local/apache/logs
    rm -rf suexec_log
    touch suexec_log
    chown root:nobody suexec_log
    chmod 600 suexec_log
    rm -rf suphp_log
    touch suphp_log
    chown root:nobody suphp_log
    chmod 600 suphp_log
    for domlogs
    = = = = = = = = = = =
    Code:
    service httpd stop
    ps ax | grep httpd (Verify that no httpd process still running)
    cd /usr/local/apache
    mkdir /home2/apache ( Considering /home2 as your new drive)
    mv domlogs /home2/apache/
    ln -s /home2/apache/domlogs /usr/local/apache/domlogs
    ls -la /usr/local/apache/ (Verify the link)
    service httpd start
    so with the above changes is my server will goes down?
     
  2. LinuxTechie

    LinuxTechie Well-Known Member

    Joined:
    Jan 22, 2011
    Messages:
    502
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hello,

    You will find a solution for /usr filling in the below given URL.

    -link removed-
    Please do post if you have any other doubts.
     
    #2 LinuxTechie, Apr 26, 2011
    Last edited by a moderator: Apr 26, 2011
  3. golden_eyes

    golden_eyes Well-Known Member

    Joined:
    Aug 9, 2010
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    the link gives

    The board requires you to be registered and logged in to view this forum.
     
  4. LinuxTechie

    LinuxTechie Well-Known Member

    Joined:
    Jan 22, 2011
    Messages:
    502
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hello,

    Yes, it seems a registration is required to view the content. If you wish, do register and view the content.
     
  5. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,482
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    I'd be more interested in whats filling up those logs and what I could do to slim them down a bit, instead of moving them to let them continue to grow.
     
  6. golden_eyes

    golden_eyes Well-Known Member

    Joined:
    Aug 9, 2010
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    Actually they focused to the mailman, although I don't have any problem with it, my problem with domlogs and logs
     
  7. LinuxTechie

    LinuxTechie Well-Known Member

    Joined:
    Jan 22, 2011
    Messages:
    502
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hello,

    Oh ! Okay. So are you sure that mailman is not taking up the space and only domlogs.

    I found some info on domlogs also. Thats why posted the link here.
     
  8. golden_eyes

    golden_eyes Well-Known Member

    Joined:
    Aug 9, 2010
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    yes I'm sure that I'm facing the problem with the domlogs and logs

    any help please?
     
  9. astopy

    astopy Well-Known Member

    Joined:
    Apr 3, 2003
    Messages:
    165
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Your /usr/local/apache/logs directory seems pretty big, what do you get if you run "ls -lhS /usr/local/apache/logs"? Have you made sure that the logs in that directory are being rotated?

    If you click Statistics Software Configuration in WHM, does it say that it's currently able to keep up with the processing? Have you tried having it process the logs more often? (And make sure it's set to remove logs after processing the stats.)
     
  10. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    The proposed method to move the domlogs in your initial post would work, although you'd want to ensure you have /home2 as your larger partition. I'm not certain if you edited it to cover your existing /home partition or not for what you'd provided.

    Next, you could follow these steps for large mailman archives if you have those:

    http://forums.cpanel.net/f189/full-usr-partition-167918.html#post699642

    Finally, I do not suggest removing the /usr/local/apache/logs contents. You should rotate those logs as astopy is indicating. Removing the logs will mean you no longer have the logging data if it might be needed.
     
  11. golden_eyes

    golden_eyes Well-Known Member

    Joined:
    Aug 9, 2010
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    No problem with the partitions, I can move them to the /backup < it's 1000GB or to the /home < 1000GB but what I need to know is once I finished the the following steps is this is the best solution? although I have another servers its /usr didn't exceed the 53% while all servers having the same partitioning tables.

    Code:
    service httpd stop
    ps ax | grep httpd (Verify that no httpd process still running)
    cd /usr/local/apache
    mkdir /home2/apache ( Considering /home2 as your new drive)
    mv domlogs /home2/apache/
    ln -s /home2/apache/domlogs /usr/local/apache/domlogs
    ls -la /usr/local/apache/ (Verify the link)
    service httpd start
    and the some for logs or you don't suggest to do the same to the logs?
     
  12. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I already mentioned not to remove the /usr/local/apache/logs and you shouldn't move them either. Those logs should be rotating as was already suggested by astopy.

    The steps for moving the domlogs would need revised to be /home if you aren't using /home2, so either replace /home2 with /home for each command indicating /home2 or replace /home2 with /backup instead, whichever you prefer.

    As for the best solution, most people usually do move /usr/local/apache/domlogs as one of the first measures to reduce space for /usr

    As for why another server isn't exceeding /usr and the other happens to be with the same size partition, no two servers are the same. If one has higher site activity for the domlogs, those are going to be larger on that machine.
     
  13. golden_eyes

    golden_eyes Well-Known Member

    Joined:
    Aug 9, 2010
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    Thank you man for your explanation really appreciated so let me move the domlogs to the /home and will see what will happen :)
     
Loading...

Share This Page