Filesystem  512-blocks      Used     Avail Capacity  Mounted on
/dev/wd0a       256252    180540     62900    74%    /

256252 blocks less 5% reserve.
This gives 243440 blocks total available for users.
        less 180540     gives 62900 blocks currently available for users.
180540/243440  gives 74.162% which rounds to 74%

For a user to write to the disk, it must be less than 100% full.
If root has used up all the reserve, 105% capacity is a fair value,
in that the user will need to free up in excess of 5% in order to
have ANY free space in which to write stuff.

For the above 256252 block partition, the percentages are based
on the 243440 blocks of user-usable space rather than the
total of 256252 blocks of root-usable space.

Probably much kinder on users to run out at 100% than at 95%.
Of course this requires that root runs out at something over 100%.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
Matthew S Elmore
Sent: Saturday, June 25, 2005 11:48 PM
To: [EMAIL PROTECTED]
Cc: misc@openbsd.org
Subject: Re: Strange df output


It was my understanding that this reserved space was not accounted for 
when using 'df'. Hence, you can sometimes have partitions that are 105% 
capacity.

Am I off base on this? It is very possible, it is very late. ;)

 From the FAQ sec 14.14:

People are sometimes surprised to find they have negative available 
disk space, or more than 100% of a partition in use, as shown by df(1).

When a partition is created with newfs(8), some of the available space 
is held in reserve from normal users. This provides a margin of error 
when you accidently fill the disk, and helps keep disk fragmentation to 
a minimum. Default for this is 5% of the disk capacity, so if the root 
user has been carelessly filling the disk, you may see up to 105% of 
the available capacity in use.

On Jun 25, 2005, at 11:41 PM, <[EMAIL PROTECTED]> wrote:

> 5% or so is reserved for root and is not "available".
>
> When everybody has run out of disk space, it is very helpful
> if the situation does NOT apply to root.
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf 
> Of
> Matthew S Elmore
> Sent: Saturday, June 25, 2005 11:35 PM
> To: misc@openbsd.org
> Subject: Strange df output
>
>
> Can anyone explain this math to me?
>
> 490M - 32.8M != 433M
>
> Not that it's a big deal but just wondering where that bit of space
> went.
>
> [EMAIL PROTECTED]:/home/matt$ df -h
> Filesystem            Size    Used   Avail Capacity  Mounted on
> /dev/wd0a             490M   32.8M    433M     7%    /

Reply via email to