From nobody@FreeBSD.ORG Mon Jul  5 17:43:56 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id B66AD14DF1; Mon,  5 Jul 1999 17:43:56 -0700 (PDT)
Message-Id: <19990706004356.B66AD14DF1@hub.freebsd.org>
Date: Mon,  5 Jul 1999 17:43:56 -0700 (PDT)
From: kientzle@acm.org
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: Deleting a large file loses disk space
X-Send-Pr-Version: www-1.0

>Number:         12527
>Category:       kern
>Synopsis:       Deleting a large file loses disk space
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul  5 17:50:00 PDT 1999
>Closed-Date:    Mon Jul 19 02:01:18 PDT 1999
>Last-Modified:  Mon Jul 19 02:02:10 PDT 1999
>Originator:     Tim Kientzle
>Release:        FreeBSD 3.1-RELEASE
>Organization:
Independent
>Environment:
FreeBSD clover.kientzle.com 3.1-RELEASE FreeBSD 3.1-RELEASE #10: Thu Jul  1 13:48:43 PDT 1999     root@clover.kientzle.com:/usr/src/sys/compile/CLOVER  i386
>Description:
I created a large file (approximately 3.6 gigabytes) on a UFS
partition.  After using 'rm' to remove the file, I noted
the following discrepancy:

df /usr showed 8 gigabytes of disk space used
du -x /usr shows only 4.5 gigabytes of disk space used

I expect some discrepancy between the two, but this seems a
bit excessive. ;-)

>How-To-Repeat:
Unfortunately, I no longer have enough free disk space
to check whether a large file built with 'dd' will
reproduce this problem.

I'm hoping that 'fsck' can correct it.

>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: sheldonh 
State-Changed-When: Fri Jul 9 07:04:55 PDT 1999 
State-Changed-Why:  
From <Pine.NEB.3.95.971114152907.13922C-100000@praline.no.neosoft.com>: 

Some process has a file that has been rm'ed open, likely.  The file is  
not actually deleted until the last process that has it open closes it.  
Du will report the space as unused, df will report correctly. 

Are you sure this isn't the cause of your perceived problem? 
State-Changed-From-To: feedback->closed 
State-Changed-By: sheldonh 
State-Changed-When: Mon Jul 19 02:01:18 PDT 1999 
State-Changed-Why:  
Submitter agrees that the symptoms were caused by a process holding 
a deleted file open. 
>Unformatted:
