Strange behaviour in disk space. How to diagnose sudden rise in file space used? [message #40177] |
Mon, 26 July 2010 15:24  |
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?
|
|
|
|
|