xfs
[Top] [All Lists]

Re: du vs. df inconsistency

To: linux-xfs@xxxxxxxxxxx
Subject: Re: du vs. df inconsistency
From: Robert Brockway <rbrockway@xxxxxxxxxxxxx>
Date: Fri, 4 Feb 2005 17:02:31 +0000 (GMT)
In-reply-to: <65517.192.168.0.77.1107504515.squirrel@xxxxxxxxxxxxx:443>
References: <Pine.OSF.4.61.0502030956450.28806@xxxxxxxxxxxxxxxxxxx> <4202D839.2090003@xxxxxxx> <65517.192.168.0.77.1107504515.squirrel@xxxxxxxxxxxxx:443>
Sender: linux-xfs-bounce@xxxxxxxxxxx
On Fri, 4 Feb 2005, Roberto wrote:

Yes, this could be an interesting test: I remember (some times ago) on
this list a similar problem where a deleted files where still keep open by
a daemon process: this led to df - du to disagree...

But I've not enough info to say it's the same problem  ...

The correct behaviour for a filesystem on Unix is for the kernel to hold on to the pointer to the file while it is still being kept open by a process even if the file has had its link count reduced to zero (ie, deleted).

The other day I accidentally deleted a tar file I was compressing (with bzip2). This was on an xfs filesystem too. I didn't worry (no need to pull it from backups) as bzip2 happily completed the compression. After it had finished it told me its attempt to remove the tar file failed. I would only have had a problem if I had killed the bzip2 process.

Getting back to the original poster, it is well known that differences betweeen du and df output can be a result of holes in a file. I have seen this with empty swap files and I'm not necessarily surprised if a database file is exhibiting this behaviour.

Cheers,
        Rob

--
Robert Brockway B.Sc.
Senior Technical Consultant, OpenTrend Solutions Ltd.
Phone: 416-669-3073 Email: rbrockway@xxxxxxxxxxxxx http://www.opentrend.net
OpenTrend Solutions: Reliable, secure solutions to real world problems.
Contributing Member of Software in the Public Interest (http://www.spi-inc.org)


<Prev in Thread] Current Thread [Next in Thread>