Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Nov 2021 17:35:56 +0100
From:      Guido Falsi via freebsd-hackers <freebsd-hackers@FreeBSD.org>
To:        Rozhuk Ivan <rozhuk.im@gmail.com>, freebsd-hackers@FreeBSD.org
Subject:   Re: What happen with disk space?
Message-ID:  <d5881003-b7cb-3a45-0ec2-2b7b2e06bf6e@madpilot.net>
In-Reply-To: <20211115185455.1cb9992a@rimwks.local>
References:  <20211115185455.1cb9992a@rimwks.local>

next in thread | previous in thread | raw e-mail | index | archive | help
On 15/11/21 16:54, Rozhuk Ivan wrote:
> 
> 
> # df -cHi
> Filesystem                                             Size    Used   Avail Capacity iused ifree %iused  Mounted on
> ....
> /dev/concat/16TB________.eli                            16T     16T    9.0G   100%     22k  246M    0%   /mnt/16TB________
> /dev/mirror/10T________.eli                            9.7T    8.8T    124G    99%     45k  1.2G    0%   /mnt/10T________
> /dev/gptid/87978976-10a9-11eb-ad6e-346346346346.eli    5.8T    4.1T    1.3T    76%    1.3M  732M    0%   /mnt/backup
> /dev/ada3p1.eli                                        5.8T    4.1T    1.3T    76%    1.3M  732M    0%   /mnt/tmp
> 
> Why Size != Used + Avail?

AFAIK in UNIX it has always been like this, I guess since 4BSD at least, 
maybe even in v6.

explanation is in minfree, -m option tu tunefs(8).

part of the disk space is reserved for system usage and is accessible 
only to root. df(1) calculates avail based on that, while size is the 
actual full size (if I remember correctly).

ZFS too shows the same behaviour.

-- 
Guido Falsi <mad@madpilot.net>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d5881003-b7cb-3a45-0ec2-2b7b2e06bf6e>