Incorrect Disk Usage on /var

wipl

Active Member
Oct 12, 2003
37
0
156
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...?
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
32
473
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.
 

wipl

Active Member
Oct 12, 2003
37
0
156
chirpy said:
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.
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 :)
 

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
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?
 

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
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?
 

garrettp

Well-Known Member
PartnerNOC
Jun 18, 2004
312
1
166
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.