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.

too many files in /var partition

Discussion in 'General Discussion' started by upsforum, Feb 16, 2007.

  1. upsforum

    upsforum Well-Known Member

    Joined:
    Jul 27, 2005
    Messages:
    446
    Likes Received:
    0
    Trophy Points:
    16
    in /var/lib/mysql I have too many files, I can delete this files?
     
  2. BianchiDude

    BianchiDude Well-Known Member
    PartnerNOC

    Joined:
    Jul 2, 2005
    Messages:
    619
    Likes Received:
    0
    Trophy Points:
    16
    rm -rf /var/spool/exim/input/*
     
  3. makersky

    makersky Member

    Joined:
    Nov 26, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    why you think you have to many files and what do you mean by 'too many files' ? are you short of free inodes or space left on device ?
     
    #3 makersky, Feb 16, 2007
    Last edited: Feb 16, 2007
  4. upsforum

    upsforum Well-Known Member

    Joined:
    Jul 27, 2005
    Messages:
    446
    Likes Received:
    0
    Trophy Points:
    16
    I have this status HD space used

    partition /usr 92%
    partition /var 65%



    what I can make?
     
  5. makersky

    makersky Member

    Joined:
    Nov 26, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    So you have 35% of space free in /var and only 8% in /usr. If you want to find directories that takes most space do this:

    du -sk * | sort -n

    Still I dont understand why you want to remove files ? /usr is rather still partition (except log files of programs installed in /usr/local/ - ie: apache - /usr/local/apache/{logs,domlogs}). /var is not full in your case.

    /var/lib/mysql contains mysql databases, so it's not a good idea to delete it. also removing /var/spool/exim/input/ is not a good idea (you will loose all emails that are in queue and are waiting for delivery).
     
  6. upsforum

    upsforum Well-Known Member

    Joined:
    Jul 27, 2005
    Messages:
    446
    Likes Received:
    0
    Trophy Points:
    16
    OK,

    for /usr/local/apache/domlogs i created a simbolic link to /home/domlogs, in this partition i have 135Gbyte free


    for /var from 2 days ago the space status is 62% used, I can remove /var/spool/exim/input/* but for long period? what I can do?
     
    #6 upsforum, Feb 17, 2007
    Last edited: Feb 17, 2007
  7. upsforum

    upsforum Well-Known Member

    Joined:
    Jul 27, 2005
    Messages:
    446
    Likes Received:
    0
    Trophy Points:
    16
    in /var/lib/mysql I have 8GByte of files, this is normal??
     
  8. upsforum

    upsforum Well-Known Member

    Joined:
    Jul 27, 2005
    Messages:
    446
    Likes Received:
    0
    Trophy Points:
    16
    I have this files in /var/lib/mysql


    -rw-rw---- 1 mysql mysql 104360290 May 31 2006 server3-bin.000018
    -rw-rw---- 1 mysql mysql 79 May 31 2006 server3-bin.000019
    -rw-rw---- 1 mysql mysql 370840 May 31 2006 server3-bin.000020
    -rw-rw---- 1 mysql mysql 569 May 31 2006 server3-bin.000021
    -rw-rw---- 1 mysql mysql 9953 May 31 2006 server3-bin.000022
    -rw-rw---- 1 mysql mysql 272952203 Jun 18 2006 server3-bin.000023
    -rw-rw---- 1 mysql mysql 394416789 Jul 13 2006 server3-bin.000024
    -rw-rw---- 1 mysql mysql 345098614 Jul 27 2006 server3-bin.000025
    -rw-rw---- 1 mysql mysql 20439751 Jul 28 2006 server3-bin.000026
    -rw-rw---- 1 mysql mysql 2696582 Jul 28 2006 server3-bin.000027
    -rw-rw---- 1 mysql mysql 34663 Jul 29 2006 server3-bin.000028
    -rw-rw---- 1 mysql mysql 153501308 Aug 2 2006 server3-bin.000029

    This is very very large, to what to used?
     
  9. makersky

    makersky Member

    Joined:
    Nov 26, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    it seems that you had bin log turned on few months ago. check if those files are in use
    # fuser -v server3-bin*
    and if not delete all.
    also you can check if you have other mysql log files, rotated or not. (log directive in /etc/my.cnf)

    go to /var/lib/mysql and submit
    df -sk * | sort -n
    you will see who has biggest databases. maybe you would like to charge your clients for extra large db or you have databases which belongs to deleted accounts ?
     
  10. brendanrtg

    brendanrtg Well-Known Member

    Joined:
    Oct 4, 2006
    Messages:
    311
    Likes Received:
    0
    Trophy Points:
    16
    This is what we normally remove without any problems.

    1. /var/cpanel/logs/*
    2. /tmp/sess*
    3. /usr/local/apache/logs/*_log
     
  11. upsforum

    upsforum Well-Known Member

    Joined:
    Jul 27, 2005
    Messages:
    446
    Likes Received:
    0
    Trophy Points:
    16
    with fuser command this is result

    -bash: /sbin/fuser: Argument list too long

    the directory is very full
     
  12. makersky

    makersky Member

    Joined:
    Nov 26, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    if you use bash shell then try:

    for f in server3-bin*; do fuser -v $f; done

    If there is a lot of server3-bin files then you still have bin logging turned on. Consider if you need this and if you need previous logs.
     
  13. upsforum

    upsforum Well-Known Member

    Joined:
    Jul 27, 2005
    Messages:
    446
    Likes Received:
    0
    Trophy Points:
    16
    this is correct result?

    No process references; use -v for the complete list
    server3-bin.000021:
    No process references; use -v for the complete list
    server3-bin.000022:
    No process references; use -v for the complete list
    server3-bin.000023:
    No process references; use -v for the complete list
    server3-bin.000024:
    No process references; use -v for the complete list
    server3-bin.000025:
    No process references; use -v for the complete list
    server3-bin.000026:
    No process references; use -v for the complete list
    server3-bin.000027:
    No process references; use -v for the complete list
    server3-bin.000028:
    No process references; use -v for the complete list
    server3-bin.000029:
    No process references; use -v for the complete list
     
  14. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Don't make stupid recommendations like that again or you'll find yourself banned. Recommending someone delete all their email files is reckless, especially when it has nothing to do with the OP.
     
Loading...

Share This Page