From nobody@FreeBSD.org  Tue Apr 19 11:49:25 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 52EF216A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 19 Apr 2005 11:49:25 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 391C343D53
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 19 Apr 2005 11:49:25 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j3JBnPrx025214
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 19 Apr 2005 11:49:25 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j3JBnPd1025213;
	Tue, 19 Apr 2005 11:49:25 GMT
	(envelope-from nobody)
Message-Id: <200504191149.j3JBnPd1025213@www.freebsd.org>
Date: Tue, 19 Apr 2005 11:49:25 GMT
From: "Ben O'Hara" <bohara@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: df reports incorrect stats with gmirror
X-Send-Pr-Version: www-2.3

>Number:         80097
>Category:       bin
>Synopsis:       df reports incorrect stats with gmirror
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pav
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 19 11:50:21 GMT 2005
>Closed-Date:    Tue Dec 13 14:41:29 GMT 2005
>Last-Modified:  Tue Dec 13 14:41:29 GMT 2005
>Originator:     Ben O'Hara
>Release:        5.3-RELEASE
>Organization:
Trigold
>Environment:
FreeBSD doc-store01.trigold.co.uk 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Fri Nov  5 04:19:18 UTC 2004     root@harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
Using a gmiror mirrored disk setup 

doc-store01# gmirror list
Geom name: gm0s1
State: COMPLETE
Components: 2
Balance: round-robin
Slice: 4096
Flags: NONE
SyncID: 1
ID: 1459419299
Providers:
1. Name: mirror/gm0s1
   Mediasize: 146812989952 (137G)
   Sectorsize: 512
   Mode: r6w6e1
Consumers:
1. Name: da0s1
   Mediasize: 146812990464 (137G)
   Sectorsize: 512
   Mode: r6w6e2
   State: ACTIVE
   Priority: 0
   Flags: DIRTY
   SyncID: 1
   ID: 1511566181
2. Name: da1s1
   Mediasize: 146812990464 (137G)
   Sectorsize: 512
   Mode: r6w6e2
   State: ACTIVE
   Priority: 0
   Flags: DIRTY
   SyncID: 1
   ID: 3697187295

Geom name: gm0s1.sync


Then using df gives incorrect values for the percentage of disk space used (assuming the used/available results are correct)

doc-store01# df -k /apps
Filesystem         1K-blocks     Used     Avail Capacity  Mounted on
/dev/mirror/gm0s1g 133553752 16280212 106589240    13%    /apps

however, (106589240/133553752)*100 = ~80% free and not 13% used as reported by df.
>How-To-Repeat:
Mirror 2 disks into a gmirror, mount and use df to check used space.
>Fix:
unknown
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-i386->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Jul 22 23:35:25 GMT 2005 
Responsible-Changed-Why:  
This sounds more like a problem with df or gmirror rather than anything 
i386-specific. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=80097 
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Tue Dec 13 14:39:31 UTC 2005 
State-Changed-Why:  
This is not gmirror related; and it's a proper behaviour, too. 

What you're experiencing is an 8% free space limit enforced by UFS filesystem. 
Note that sum of Used+Avail is exactly 92% of total size of filesystem. 

If you want to reclaim that 8% of space, and you don't mind performance hit, 
see -m flag to tunefs(8) 


Responsible-Changed-From-To: freebsd-bugs->pav 
Responsible-Changed-By: pav 
Responsible-Changed-When: Tue Dec 13 14:39:31 UTC 2005 
Responsible-Changed-Why:  
Take possible replies 

http://www.freebsd.org/cgi/query-pr.cgi?pr=80097 
>Unformatted:
