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.

Incorrect Disk Usage on /var

Discussion in 'General Discussion' started by wipl, Apr 15, 2006.

  1. wipl

    wipl Active Member

    Joined:
    Oct 12, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    WHM on one of my server has stopped working and when I do the df on shell it gives me the following results :

    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/hda6 1035660 624392 358660 64% /
    /dev/hdd1 118729904 25542608 87156096 23% /backup
    /dev/hda1 101089 56559 39311 59% /boot
    /dev/hda5 97004176 27930068 64146576 31% /home
    /dev/hda7 1035660 213900 769152 22% /tmp
    /dev/hda2 10317860 6033184 3760556 62% /usr
    /dev/hda3 7224600 6829872 27644 100% /var
    /tmp 1035660 213900 769152 22% /var/tmp
    none 1027468 1432 1026036 1% /dev/shm

    At the same time when I do the du -sh it gives me that the total disk space used by /var is 3.5 GB. While doing du -h --max-depth=1 it shows the same..i.e. 3.5 GB space being used. WHM shows the /var partition as full and hence all the cpanel operations have been suspended. I checked the logs folder and its total 1.1 GB in size hence even the logs are not using up the entire space.

    Any idea what could be causing this...?
     
  2. sumith

    sumith Well-Known Member

    Joined:
    May 9, 2005
    Messages:
    96
    Likes Received:
    2
    Trophy Points:
    8
    Can you restart mysql service and check the same? Let us know the results. :D
     
  3. 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 reason for the discrepancy is that you've deleted files but not restarted the daemons that log to them, so as far as the OS is concerned the space is still occupied. You need to restart all the services whose logs you have cleared down.
     
  4. wipl

    wipl Active Member

    Joined:
    Oct 12, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    0
    Hi Chirpy,

    Thanks again...you've always been so helpful.

    I'd been dumb as I didn't realised this to be the cause and applying your suggestion resolved the problem :)
     
  5. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    Hello,

    I've got this same exact problem, but it does not seem to be resolved with restarting:

    cPanel
    MailScanner
    EXIM
    apache
    MySQL
    cppop
    ftp
    imap

    Is there anything I am missing?
     
  6. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Try restarting syslogd:

    Code:
    /scripts/restartsrv_syslogd
     
  7. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    38
    Thanks, did this, but there was no change.

    I am going to reboot the server tonight to see if this will help. Do you recommend that we also run FSCK?
     
  8. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    I have had this several times, the only thing that fixes it is a reboot. i'm surprised there isn't a command for resetting just the quotas for the server partitions.
     
  9. garrettp

    garrettp Well-Known Member
    PartnerNOC

    Joined:
    Jun 18, 2004
    Messages:
    312
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider
    If you can't seem to find the elusive process that is still marking the space as occupied, try running the following:

    Code:
    lsof|grep '(deleted)'
    This will list all files that have been deleted by currently running processes.
     
Loading...

Share This Page