OpenVZ Forum


Home » General » Support » Strange behaviour in disk space. How to diagnose sudden rise in file space used?
Strange behaviour in disk space. How to diagnose sudden rise in file space used? [message #40177] Mon, 26 July 2010 15:24 Go to next message
mcarreira is currently offline  mcarreira
Messages: 30
Registered: February 2007
Member
My server is a centos-4 openvz hardware node and root file system is a 50GB partition.
Until last week, df -h command showed 46GB Size, 17GB used, 28GB Available (38% used).
Suddenly the disk became full, and messages in /var/log/message stopped because no space available. So I was unable to see what was wrong with it.
I tried to see which directories were "guilty" about this problem. But, using "du" command was not very informative, because it showed me only 13 GB used (?). There was a different result between "du" and "df" commands I cannot understand.
I deleted some unuseful files to get some disk space available, and now I have 4.8GB available with "df" command, and /var/log/messages started to be written again.

This is the result of "df -h"

[root@hn ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md1 46G 39G 4.8G 89% /
/dev/md0 84M 47M 33M 60% /boot
/dev/md5 92G 46G 42G 53% /vz
/dev/md2 917G 340G 532G 39% /shares
/dev/sde1 917G 508G 363G 59% /disco2
/dev/sdf1 113G 188M 107G 1% /tempdisk
none 2.0G 0 2.0G 0% /dev/shm

This is the result of du -hs /*

[root@hn ~]# du -sh /*
284K /baksystem
6.7M /bin
44M /boot
1.5M /copia
616K /dev
508G /disco2
55M /etc
458M /home
8.0K /initrd
179M /lib
21M /lib64
16K /lost+found
12K /media
8.0K /misc
20K /mnt
8.0K /opt
4.6G /proc
2.6G /root
21M /sbin
8.0K /selinux
339G /shares
8.0K /srv
0 /sys
20K /tempdisk
864K /teste
72K /tftpboot
188K /tmp
4.6G /usr
913M /var
470M /vmachines
421G /vz

If I sum all space used in every directory (except /disco2 /shares and /vz directories, which are mounted points of other disks) I only get aproximately 13GB.
So, why "df" tells me that my disk is almost full, when some days before it was showing me 17GB used?
Also those impossible 421GB in /vz are not corresponding to 46GB used in a 92GB partition when using "df" command.

Someone has a clue?
Re: Strange behaviour in disk space. How to diagnose sudden rise in file space used? [message #40178 is a reply to message #40177] Tue, 27 July 2010 06:50 Go to previous messageGo to next message
olojoh1977 is currently offline  olojoh1977
Messages: 6
Registered: July 2010
Location: Sthlm Sweden
Junior Member
Just a newbie trying to help...

Perhaps there are "zombie"-processes with open files?
Try lsof.

Kind regards Olof
Re: Strange behaviour in disk space. How to diagnose sudden rise in file space used? [message #40181 is a reply to message #40178] Tue, 27 July 2010 17:19 Go to previous message
mcarreira is currently offline  mcarreira
Messages: 30
Registered: February 2007
Member
Thanks, but I did it already.
I also tried to reboot in single mode (init 1), but the result is the same. There are no zombie processes. Something happened suddenly(??) I looked to all logs, I didn't made any update or download anything...
I will move everything to a new larger disk briefly, but I'm not happy without knowing what happened (this server is running since 2007 without any problem until now).
The attachment has an image from my MRTG graph showing the size used in the partition, where it can be seen the sudden rise in the space used.
index.php?t=getfile&id=837&private=0
Previous Topic: No longer setting hostname in container ?
Next Topic: OpenVZ in mainline Linux kernel?
Goto Forum:
  


Current Time: Sat Aug 24 23:12:17 GMT 2024

Total time taken to generate the page: 0.03259 seconds