# du and df don't match with used space.



## bones18 (Aug 6, 2009)

Hi, 

I'm using Freenas based in FreeBSD, I attached an image where you can see that used space = 360G using du command, (if I use windows ï¿½e to look for used space it matches with this value) but if I use df it says me that I'm using 415Gb. 

I understand that both vaules should be equal. Is there anyway to free 415-360= 55Gb unused.

Many thanks


----------



## vermaden (Aug 6, 2009)

Check FAQ mate:
http://freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#DU-VS-DF


----------



## Levenson (Aug 6, 2009)

So df shows that disk is full but it's not! 10% of this diskspace is free and only root can write now. Look at the tunefs(8) man page.


----------



## bones18 (Aug 6, 2009)

Hi, thanks for your answer.

 I checked that cerntainly  8% of my disk was reserved but...

My system sees 476907MB from my 500Gb disk.

 476907MB * 0.08 = 38152 Mb = 38Gb 

But from 38Gb to 55Gb = I'm loosing 17Gb.


Do you thing those 17Gb are reserved space? 

Many thanks


----------



## mickey (Aug 6, 2009)

Depending on various filesystem parameters you also loose space for
keeping the filesystem meta-information.

BTW: 38152 MB == 37.25 GB :stud


----------



## SirDice (Aug 6, 2009)

bones18 said:
			
		

> My system sees 476907MB from my 500Gb disk.


Harddisk manufacturers have to use SI prefix standards. This means that 1GB = 1.000.000.000 B (10^9). The binary prefix standard (what your computer uses) says that 1GB = 1.073.741.824 Bytes (2^30). Notice the difference?

So 500GB = 500.000.000.000 B => binary 476837 MB

It's a little less because the filesystem itself takes up a bit of space too.


http://en.wikipedia.org/wiki/SI_prefix
http://en.wikipedia.org/wiki/Binary_prefix


----------

