[NBLUG/talk] Discrepancies in output from "df -h"

Lincoln Peters sampln at sbcglobal.net
Sun Jul 30 00:13:29 PDT 2006


Here is an excerpt from "df -h", taken while copying data from my  
RAID array to the external hard drive:

Filesystem	Size	Used	Avail	Use%	Mounted on
/dev/sdb1	459G	435G	1.1G	100%	/mnt

These numbers don't add up.  If 435GB are used out of a total of  
459GB, then there should be 24GB available.

In the time it took me to type all of the above, the amount of space  
listed as "available" has dropped to zero, but the copy is still  
running.  Apparently, there is more space available than df is  
letting on.  And I'm not inclined to suspect that it involves  
reserved space (i.e. root's 5% reserved space), as the next line  
shows the following numbers for my RAID array (which didn't change at  
all during the copy):

/dev/md1	464G	450G	15G	97%	/home

The numbers still don't add up (the sum of the used and available  
space is 1GB greater than the size of the filesystem), but the  
discrepancy is small enough that I could just chalk it up to rounding  
error.

The only thing I can think of that might be causing odd behavior is  
that I'm using ReiserFS on the RAID array (and that will soon  
change), but ext2 on the external hard disk.  I can't think of any  
way that a filesystem as mature and (relatively) simple as ext2 could  
lead to this kind of problem, but I'm running out of ideas.

And I'd rather not crunch the raw numbers (as per "df" without the "- 
h" switch), as I would need to manually type the numbers into a  
calculator (or the calculator utility on my laptop), and right now  
I'm too tired to do something so tedious unless I absolutely have to.


In the meantime, the copy is almost done (finally!), and when it  
finishes, I'm going to bed!


--
Lincoln "The DiskBuster" Peters
<petersl at sonoma.edu>

No man is an island, but some of us are long peninsulas.




More information about the talk mailing list