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 keeps filling up. Have to rm domlogs contents every 3 d

Discussion in 'General Discussion' started by fog, Oct 13, 2002.

  1. fog

    fog Well-Known Member

    Joined:
    Jun 22, 2002
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    16
    Could someone tell me another way to fix this? Having to rm the contents of domlogs every 3 days is getting aggrevating. Thanks in advance :)

    Please give me the step by step as I am fairly new to this control panel.
     
  2. dandanfireman

    dandanfireman Well-Known Member
    PartnerNOC

    Joined:
    May 31, 2002
    Messages:
    117
    Likes Received:
    0
    Trophy Points:
    16
    It sounds like the main problem is that your /usr partition is not large enough. The last server I had built, I specified that /usr be 10G just for this reason. For the previous one, I specified 6G thinking it would be enough...but its not.

    First I would look around at your logs and try to get an idea of who is filling up your logs. For me, I had about 3 users who were the main offenders. The way I resolved this was to move the log file to the user's /home directory then symlink back to domlogs. Something like the following. Lets say domain.com is our problem and their username is domain.

    mv /usr/local/apache/domlogs/domain.com /home/domain
    ln -s /home/domain/domain.com /usr/local/apache/domlogs/domain.com
    /etc/init.d/httpd restart
     
  3. fog

    fog Well-Known Member

    Joined:
    Jun 22, 2002
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    16
    Would these exact commands (minus the domain.com portion) work if I also wanted to move the entire domlogs dir to /home/domlogs?
     
  4. fog

    fog Well-Known Member

    Joined:
    Jun 22, 2002
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    16
  5. dandanfireman

    dandanfireman Well-Known Member
    PartnerNOC

    Joined:
    May 31, 2002
    Messages:
    117
    Likes Received:
    0
    Trophy Points:
    16
    I would be hesitant to give you a by the numbers approach to doing this. I wouldn't want to leave you in a situation where things are broken with no way to fix them. Please contact me via

    MSN: imsupport@alphaomegahosting.com
    AIM: alphhos
    YIM: alphhos
    ICQ: 295434

    And we can talk more about it.
     
  6. jsteel

    jsteel Well-Known Member

    Joined:
    Jul 4, 2002
    Messages:
    646
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Atlanta, GA
    If you have a partition that is larger you could simply create the domlogs directory on that partition (copy all the data over), delete it from the apache directory and then create a symbolic link in the apache directory called domlogs that points to the new location.

    I had to do something similar on Tomcat logs on one of my boxes because the provider didn't make partitions large enough. I personally don't think Nick should let a provider become a CPanel distributor if they don't build out servers properly.

    Jaz
     
  7. fog

    fog Well-Known Member

    Joined:
    Jun 22, 2002
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    16
    Could ya post a step by step to link the domlogs to /home2/domlogs? It would be appreciated :)
     
  8. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    [quote:65ab3057c3][i:65ab3057c3]Originally posted by fog[/i:65ab3057c3]

    Could ya post a step by step to link the domlogs to /home2/domlogs? It would be appreciated :)[/quote:65ab3057c3]

    its exactly the way dandanfireman has explained, neways...

    mv /usr/local/apache/domlogs /home2/domlogs
    ln -s /home2/domlogs /usr/local/apache/domlogs
    /etc/rc.d/init.d/httpd restart

    still have a probs give me a buzz at anand@iwp.biz, i would help. I just did this on my server, 1.7gb of domlogs phew! my usr was almost full.

    regards,

    Anand
     
  9. moronhead

    moronhead Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    706
    Likes Received:
    0
    Trophy Points:
    16
    This is a tad more secure:

    * Stop Apache from WHM or SSH
    * Move content and create new directory:
    cp -a /usr/local/apache/domlogs /home2
    * Make sure /home2/domlogs is created
    * Remove /usr/local/apache/domlogs directory:
    rm -fR /usr/local/apache/domlogs
    * add symbolic link to the new directory:
    ln -s /home2/domlogs /usr/local/apache/domlogs
    * Start Apache in WHM or SSH
     
  10. Drake

    Drake Well-Known Member

    Joined:
    Nov 9, 2001
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Do you want to keep all the old logs?? not me...

    Why not think of adding those dom logs into the logrotate routine, this way they will be rotated daily .1, .2, and finally .gone ?
     
  11. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    38
    [quote:d4c7f4ad3f][i:d4c7f4ad3f]Originally posted by moronhead[/i:d4c7f4ad3f]

    This is a tad more secure:

    * Stop Apache from WHM or SSH
    * Make the new log directory:
    mkdir /home2/domlogs
    * Move content:
    mv /usr/local/apache/domlogs /home2/domlogs
    * Make sure /home2/domlogs is created
    * Remove /usr/local/apache/domlogs directory:
    rm -fR /usr/local/apache/domlogs
    * add symbolic link to the new directory:
    ln -s /home2/domlogs /usr/local/apache/domlogs
    * Start Apache in WHM or SSH[/quote:d4c7f4ad3f]


    Hello ,

    this suggestion of course will work also on my /home dir ( I have 27 GB free there ) ?

    Thanks
     
  12. fog

    fog Well-Known Member

    Joined:
    Jun 22, 2002
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    16
    I did just what was posted here in the step by step, but when I look in /usr/local/apache/domlogs I still see the files.
     
Loading...

Share This Page