disk space mistery
I ran out of disk space: this the output of df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda 20G 19G 0 100% /
tmpfs 502M 0 502M 0% /lib/init/rw
udev 10M 116K 9.9M 2% /dev
tmpfs 502M 0 502M 0% /dev/shm
Then I ran ncdu to analyse which folders are taking all the space. But when I run it from the root folder /, it says that I'm using only 7.7GB in total (and the sum of the sizes of folders seems to be that).
Any idea where the other 12GB used could be hiding?
Is there any other tool I could use to locate the big folders?
Thanks
Bruno
3 Replies
du -d 1 -c -h -x / | sort -h
If -d doesn't work you might need to specify the literal –max-depth.
You can check for this with "lsof | grep deleted". If you see a line similar to
tin 21208 sweh 6u REG 253,0 1768 851996 /tmp/tmpfMXfjFg (deleted)
then you need to check the "size". In this case the size is 1768 bytes, so this is a small file and not a problem (it just happens to be how "tin" works). If you find a program with a large deleted file then you need to stop that program. That should free up the file and let the OS reclaim the disk space.