0

I have a centos 5.5 VM (6GB) just for php development, recently i've noticed about space lost:

df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      5.7G  5.3G  187M  97% /
/dev/sda1              99M   18M   76M  20% /boot
tmpfs                 252M     0  252M   0% /dev/shm

du -h / | grep ^[0-9.]*G
1.2G    /www
1.6G    /usr
3.5G    /

I don't have any file in / just .autofsck (0 bytes) where is these space?

Edit: any new idea?

3
  • No, 1.2+1.6+3.5=6.3...
    – Steven Schlansker
    Aug 25, 2010 at 16:02
  • D'oh, oops, yes - sorry.
    – Rup
    Aug 25, 2010 at 16:03
  • yes, the last 3.5G fits all HD. What is that? how i can delete? Aug 25, 2010 at 16:07

5 Answers 5

0

probably in /tmp, but use the following to find directories by size, execute from /:

du -sk */ | sort -nr
1
  • i got this: du -sk / | sort -nr 3627120 / Aug 25, 2010 at 16:06
0

If a file has been deleted from the filesystem but not closed by all applications then it will remain on the filesystem taking up space but not be detectable by tools such as du. Terminating the application in question (the easiest way to do this is to reboot) will cause the space to be released.

1
  • that is the problem, i've rebooted the server and still remains there! Aug 25, 2010 at 16:13
0

Have you checked for hidden files/directories? The very simplest command to do that is

du -h * | less
0

You're heading in the right direction, try adding the a switch to your du command and possibly decreasing the size requirement from G to M granted it will kick back more results but remember you're looking at totals without the -a switch.

du -ah / | grep ^[0-9.]*M

It's probably a log somewhere, but check the sizes of your yum caches too

0

man tune2fs:

   -m reserved-blocks-percentage
          Set the percentage of the filesystem which may only be allocated
          by privileged processes.   Reserving some number  of  filesystem
          blocks for use by privileged processes is done to avoid filesys-
          tem fragmentation, and to allow system  daemons,  such  as  sys-
          logd(8),  to continue to function correctly after non-privileged
          processes are prevented from writing to  the  filesystem.   Nor-
          mally, the default percentage of reserved blocks is 5%.

So:

tune2fs -m0 /dev/mapper/VolGroup00-LogVol00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .