1

i have gentoo linux x64 kernel 2.6.32-gentoo-r1 using ext4

i have a 260GB drive and it seems that 99% is taken.

(ufk is my home directory)

du -hl --max-depth=1 ufk

the output shows alot of directories and their sizes and in the end:

231G    ufk

i summed all the size of the directories that it shows and it doesn't go up to 20GB

df -i ufk

Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/root            18317312  759944 17557368    5% /

du -hsl ufk  

231G    ufk

any ideas what's the cause of the

4 Answers 4

4

"-i" returns the inode numbers (the number of "entries" in the "catalog of files"), not the block size (the space used by the files).

This is confirmed by the header of "df": Inodes IUsed IFree IUse% Note the "I" in front of each number.

Remove the "-i" and it should give you correct numbers. Use "-hk" for human-readable numbers and block-size expressed in kilobytes.

2

OK, this question is ancient, but on the other hand I'm missing the Necromancer badge ... :-)

I've encountered this kind of phantom disk usage several times. Almost every time this has been because some process was still using -- or having a file handle open to -- some deleted, huge file. If a process still keeps its hands on some file, like a huge log file, the file will not be actually deleted until the process lets it go.

You can spot this kind of files for example with lsof -n | grep -i deleted and then restart the offending process (or most of the time, just send a HUP signal to it with killall -HUP someprocessname

1
  • thanks for the tip. in this specific case it was an ext4 bug, but this information may be valuable for others. good luck with getting the badge :)
    – ufk
    Commented Jul 29, 2010 at 12:50
1

i think it was an ext4 related bug. i resolved the issue by copying all the content of /home/ufk/* to a different partition, deleting and re-creating the /home/ufk directory and copying all the files back.

0

Probably ufk is mounted over a directory that contains 250gb of data. In fact, df shows the filesystem usage per mount point.

Example:

mkdir tmp
dd if=/dev/urandom of=tmp/file bs=512 count=4096
mount /dev/sda5 tmp

now tmp should not contain anything (assuming sda5 is a clean partition, etc) but the directory before the mount contains a file of random data.

1
  • unfortunately this is not the case. i don't have anything specific mounted at /home/ufk which is my home directory.
    – ufk
    Commented Jan 6, 2010 at 16:04

You must log in to answer this question.

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