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.

/var going up over 85%

Discussion in 'General Discussion' started by niccell, Apr 25, 2008.

  1. niccell

    niccell Well-Known Member

    Joined:
    Aug 10, 2005
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Hello All,

    Thank you in advance for anybody who can answer/assist?

    My /var on my servers is going up a percent every few days...I've watched it creep from about 68% to 85% and I'm stumped.

    My log files are clear...my email is clear...I've don all of the common things...

    There are no big files....I've checked...just a lot of small ones (less than 20MB).

    I can't for the life of me find where this creeping is coming from....

    Has anybody had the same issue?

    Any help is greatly appreciated. I'm really getting concerned and I'm sure that as I have 4 servers doing the same thing, others have had the same issue?

    Regards!
     
  2. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    Are you familiar with all the regular shell commands to list files, check usage, etc ?. If so then you should be able to figure this out quite easily. If you do not know how to do things like a "du" or other commands then search this forum for things like "drive full" and you will find lots of threads with tips.
     
  3. niccell

    niccell Well-Known Member

    Joined:
    Aug 10, 2005
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Hello!

    Yes, I am familiar with checking drivespaces & such. I do this quite frequently.

    The issue is there is a process or procedure that is 'creeping' up the /var.

    1) There are no large files (nothing over 20MB).
    2) I rotate/clean out the /var/log almost daily now to keep the /var as low as possible.
    3) I don't believe this is a matter of 'cleanup' on my end. Some CPANEL process is putting a bunch of small files somewhere and they are staying under the radar as you can't see them 'grow' (like a logfile).
    4) This is happening on all of my servers, not just a single server. One server is now 85%, and this is why I came here asking for help.. :)

    Any advice? Is anybody else having this issue?

    Regards!
     
  4. DaveUsedToWorkHere

    DaveUsedToWorkHere Well-Known Member

    Joined:
    Dec 28, 2001
    Messages:
    689
    Likes Received:
    1
    Trophy Points:
    18
    I'm not experiencing this on any of my test / production machines. What build are you running?

    Also, what is the size of your /var partition?
     
  5. niccell

    niccell Well-Known Member

    Joined:
    Aug 10, 2005
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Hello CPANELDAVE,

    I have this set to 'stable':

    WHM 11.15.0 cPanel 11.18.3-R21703
    CENTOS Enterprise 4.6 i686 on standard - WHM X v3.1.0

    2 servers have 3GB, 1 server 6GB /var sizes

    Thank you for replying. I look forward to your assistance... :)

    Regards
     
  6. DaveUsedToWorkHere

    DaveUsedToWorkHere Well-Known Member

    Joined:
    Dec 28, 2001
    Messages:
    689
    Likes Received:
    1
    Trophy Points:
    18
    While 3GB isn't a great size, it's not necessarily that small (depending on the other server specs (accounts, hd space, email volume, etc).


    There should be a couple of areas that you can check to see if there's abnormal amount of space used. You've noted that /var/log/ and /var/spool/exim seem ok.


    What's the size fo /var/cpanel? You can find it with: du -ch /var/cpanel


    Are there a lot of databases in /var/lib/mysql or /var/lib/pgsql?


    Typically /var/lib/ or /var/cpanel/ is where you're going to see the usage and then you'll have to pinpoint from there.
     
  7. niccell

    niccell Well-Known Member

    Joined:
    Aug 10, 2005
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    /var/cpanel is 1.7 GB.

    I had the databases redirected when the server was brand new. The databases is not a factor.. :)

    CPANELDAVE, again, thank you.

    Regards,
    Elliot
     
  8. DaveUsedToWorkHere

    DaveUsedToWorkHere Well-Known Member

    Joined:
    Dec 28, 2001
    Messages:
    689
    Likes Received:
    1
    Trophy Points:
    18
    Are you rotating bandwidth logs? There might be a ton of stuff in /var/cpanel/bandwidth. /var/cpanel should be around 100M without user data in it.
     
  9. niccell

    niccell Well-Known Member

    Joined:
    Aug 10, 2005
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Hello!

    May I ask how to check if I am rotating the bandwidth logs? I don't believe I am.

    /var/cache is 721MB if that means anything

    Regards,
    Elliot
     
  10. DaveUsedToWorkHere

    DaveUsedToWorkHere Well-Known Member

    Joined:
    Dec 28, 2001
    Messages:
    689
    Likes Received:
    1
    Trophy Points:
    18
    Check to see what you have for this setting in Tweak Settings -> Stats and Logs in WHM:

    Keep log files at the end of the month (default is off as you can run out of disk space quickly)


    /var/cache/ on a CentOS box holds your local yum repos so I'd be willing to be that /var/cache/yum is a good portion of that space.
     
  11. niccell

    niccell Well-Known Member

    Joined:
    Aug 10, 2005
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Hello CPANELDAVE!

    Keep log files at the end of the month (default is off as you can run out of disk space quickly)


    is OFF.

    Yes, the yum files take quite a bit. Is it necessary to keep them?

    Regards!
     
  12. DaveUsedToWorkHere

    DaveUsedToWorkHere Well-Known Member

    Joined:
    Dec 28, 2001
    Messages:
    689
    Likes Received:
    1
    Trophy Points:
    18
    No, it is not necessary. However, if you remove the cache, yum will have to download each file it needs during any installs. This likely will not cause any issues on systems with fast connections.

    To get rid of your cache, edit /etc/yum.conf and add the following line:

    Code:
    keepcache=0

    Then, backup your yum cache:

    Code:
    cd /var/cache/
    tar -cvf yum.tar yum
    
    Then delete /var/cache/yum and update yum to bring back a limited cache:
    Code:
    rm -rf yum
    yum update
    
    Test to make sure you can install packages:
    Code:
    yum install xml-common
    yum remove xml-common
    
    If the above worked fine, then delete the yum repository archive.
     
  13. niccell

    niccell Well-Known Member

    Joined:
    Aug 10, 2005
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Thank You So Much!!!!

    Hello CPANELDAVE,

    It looks like it worked...load is OK & /var down to 66%.

    I'll give it a few days to make certain and I'll do it on all of my servers.

    You may wish to post this one somewhere as I'm certain I'm not the only one with this issue.

    Thanks AGAIN!

    Regards
     
  14. Hostbox.be

    Hostbox.be Well-Known Member

    Joined:
    Nov 4, 2002
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Ow ow...

    my /var dir was also almost full.... so I deleted the var/cache/yum directory.

    BUT when I do "yum update" or "yum install xml-common" I get following error:


    root@lin02 [/var/cache]# yum update

    Unable to find pid
    Gathering header information file(s) from server(s)
    Server: CentOS-3 - Addons
    Traceback (most recent call last):
    File "/usr/bin/yum", line 30, in ?
    yummain.main(sys.argv[1:])
    File "/usr/share/yum/yummain.py", line 233, in main
    clientStuff.get_package_info_from_servers(serverlist, HeaderInfo)
    File "/usr/share/yum/clientStuff.py", line 838, in get_package_info_from_servers
    os.mkdir(servercache)
    OSError: [Errno 2] No such file or directory: '/var/cache/yum/addons'



    What can I do to get yum back to work ? I didn't made a backup of the cache/yum/ dir first, so restore it is not a solution....

    help wanted ?
     
  15. DaveUsedToWorkHere

    DaveUsedToWorkHere Well-Known Member

    Joined:
    Dec 28, 2001
    Messages:
    689
    Likes Received:
    1
    Trophy Points:
    18
    yum selfupdate might bring back yum. I won't give a full lecture here but it's HIGHLY important to back up before making ANY changes on your server. Even if you are simply editing a configuration file, you could take down a service or make the server unusable with a typo. Making a backup before changing something will take slightly more time but will save you from hours of headaches and service interruptions.
     
  16. Hostbox.be

    Hostbox.be Well-Known Member

    Joined:
    Nov 4, 2002
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    It was solved by recreating the directory structure, that was all ;)

    Thx !
     
  17. niccell

    niccell Well-Known Member

    Joined:
    Aug 10, 2005
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    /var on one server still 81%

    Hello!

    One of my servers only went from 88% to 81%

    Looks like there is a lot of activity in the /var/cpanel (1.8 GB).

    Is there any way to reduce this?

    The server has a lot of room just not much left in /var

    :(

    Thanks in advance.
     
  18. forlinuxsupport

    forlinuxsupport Well-Known Member
    PartnerNOC

    Joined:
    Dec 22, 2004
    Messages:
    386
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    If you didn't use LVM to create partitions then you can symlink directories to other partitions.

    E.g. if the cpanel logs folder is big - move it to say /home/.logs and symlink it back (ln -s /actual-dir /old-dir )

    Restart any services using that directory afterward.

    that way you free up space in /var partition
     
Loading...

Share This Page