[clue-tech] Missing disk space?

David Anselmi anselmi at anselmi.us
Wed May 25 20:27:20 MDT 2005


Chris Tubutis wrote:
> On 24 May, David Anselmi wrote:
[...]
>>Perhaps df is reporting used blocks and du is reporting total bytes in 
>>files, or one or the other doesn't account well for space in the tail 
>>blocks of files.
>>
>>What you're seeing is typical in a mostly free filesystem.
> 
> When this happens in Solaris, the cause is almost always one or more
> files that have been manually rm'd yet there are still processes in
> memory holding files open.

Too bad Linux doesn't behave much like Solaris.  Maybe it's a ext2 vs. 
ufs (or whatever) issue.

I'm looking at /tmp because that's the only filesystem I have that's 
mostly empty.  FWIW:

/home is 1.5G by df and 1.4G by du.  The difference when I look at 1k 
blocks is about 50MB so for large filesystems it isn't very noticable.

/tmp is 4.1MB by df and 32kB by du.  Let's see what's in there.  Various 
  directories reported at 1k contain nothing but sockets.  One directory 
does have files and is reported at 8k.  lost+found is reported at 12k 
even though it's empty.

So it looks like du reports disk blocks used--that's blocks in use due 
to a file, not bytes (see --apparent-size).  And df probably reports 
something similar, but since is shows more space used it must be 
counting other things--superblocks, inode lists, and other fs overhead, 
maybe.

But still, what Angelo is asking about is typical on Linux.  I don't 
think rebooting will change anything.

Dave



More information about the clue-tech mailing list