How does FreeBSD calculate disk sizes
Alex de Kruijff
freebsd at akruijff.dds.nl
Mon Nov 3 16:39:00 PST 2003
On Mon, Nov 03, 2003 at 12:07:15PM +0300, Odhiambo Washington wrote:
>
> Hello users,
>
> I have a disk which is actually 72GB. 2GB has been used as swap while
> the rest was given to /.
>
> Can someone explain to me what I could be missing here, because what
> I am seeing isn't what I expect. Perhaps it's just right while I am
> the dumb one. Why isn't the whole size reported?
>
>
> sucks# uname -nmr
> sucks.wananchi.com 5.1-RELEASE-p10 i386
>
> sucks# df -h
> Filesystem Size Used Avail Capacity Mounted on
> /dev/da0s1a 64G 1.8G 57G 3% /
> devfs 1.0K 1.0K 0B 100% /dev
>
> Some expert explanation would help clear my ignorance!
The answers can be found in the FAQ. The source is:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#DISK-MORE-THAN-FULL
9.25. How is it possible for a partition to be more than 100% full?
A portion of each UFS partition (8%, by default) is reserved for use by
the operating system and the root user. df(1) does not count that space
when calculating the Capacity column, so it can exceed 100%. Also,
you'll notice that the Blocks column is always greater than the sum of
the Used and Avail columns, usually by a factor of 8%.
For more details, look up the -m option in tunefs(8).
--
Alex
Articles based on solutions that I use:
http://www.kruijff.org/alex/index.php?dir=docs/FreeBSD/
More information about the freebsd-questions
mailing list