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.

Drive Critical Error

Discussion in 'General Discussion' started by Vatu, Jul 8, 2008.

  1. Vatu

    Vatu Member

    Joined:
    Mar 31, 2008
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Hi Form last 10 days am getting this error daily

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

    And daily i have to remove log from domlogs


    is there any permanent solution to get rid from this error
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    First, make sure that the apache logs in /usr/local/apache/logs/ are being rotated by logrotated. If not, you should create a file for them in /etc/logrotate.d/

    Second, you can move the domlogs to a more spacious partition if you have one, e.g. /home/ and symlink back to the original location:

    cp -avf /usr/local/apache/domlogs /home/
    rm -Rfv /usr/local/apache/domlogs
    ln -s /home/domlogs /usr/local/apache/
    /scripts/restartsrv_httpd


    Check the new location is being used:

    lsof | grep domlogs
     
  3. Vatu

    Vatu Member

    Joined:
    Mar 31, 2008
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Thanks Chirpy


    Kindly let me know which file i have to create in /etc/logrotate.d/ and what should write there.

    Coz ThePlanet support tema told me to make some changes in etc/logrotate.conf file

    here is the copy of that file

    Code:
    # see "man logrotate" for details
    # rotate log files weekly
    weekly
    
    # keep 4 weeks worth of backlogs
    rotate 4
    
    # create new (empty) log files after rotating old ones
    create
    
    # uncomment this if you want your log files compressed
    #compress
    
    # RPM packages drop log rotation information into this directory
    include /etc/logrotate.d
    
    # no packages own wtmp -- we'll rotate them here
    /var/log/wtmp {
        monthly
        minsize 1M
        create 0664 root utmp
        rotate 1
    }
    
    /usr/local/apache/domlogs/*.log {
    missingok
    rotate 3
    notifempty
    daily
    compress
    sharedscripts
    postrotate
    /bin/kill -HUP httpd
    endscript
    
    }
    
    /usr/local/apache/logs/*_log {
    missingok
    notifempty
    compress
    sharedscripts
    postrotate
    /bin/kill -HUP httpd
    endscript
    }
    # system-specific logs may be also be configured here.
    
     
  4. Vatu

    Vatu Member

    Joined:
    Mar 31, 2008
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    So Kindly Help Me What to do

    Am the Newbie to dedicated
     
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    The second half of that is fine, however you should not rotate the domlogs using logrotate otherwise it will likely break your cPanel client stats (i.e, bandwidth, awstats, analog, webalizer, etc).
     
  6. Vatu

    Vatu Member

    Joined:
    Mar 31, 2008
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    So Kindly Help Me What to do

    Am the Newbie to dedicated
     
  7. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Use your favourite search engine on how to use logrotate. There's plenty of information in the man page that explains how it works:

    man logrotate
     
  8. Vatu

    Vatu Member

    Joined:
    Mar 31, 2008
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    I already done so many serach but don,t which files i have to change and what are the changes i have to made
     
    #8 Vatu, Jul 8, 2008
    Last edited: Jul 9, 2008
  9. Vatu

    Vatu Member

    Joined:
    Mar 31, 2008
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Any Help guys
     
Loading...

Share This Page