xfs
[Top] [All Lists]

Re: df bigger than ls?

To: xfs@xxxxxxxxxxx
Subject: Re: df bigger than ls?
From: Brian Candler <B.Candler@xxxxxxxxx>
Date: Wed, 7 Mar 2012 17:16:19 +0000
Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=date:from:to :subject:message-id:references:mime-version:content-type :in-reply-to; s=sasl; bh=kPd4U2gvRu47X/QYIGuEepQK4KA=; b=I+4A1zE 2xrSaEApZAHDdvqt+Cwf+VNiqBw1pYa7FVwjOPK65hm/e3mAr5nQAhyxV6rxmLEj mQxyG0dXVtNjo1KNVkPlhyZoBZxaF7jeAK4gpNIg3FnZeu2OKPRxXw6mJBsMsH8C jOdyFX95fnFSv1+828F2eAbXYDn6oMQslCnE=
Domainkey-signature: a=rsa-sha1; c=nofws; d=pobox.com; h=date:from:to :subject:message-id:references:mime-version:content-type :in-reply-to; q=dns; s=sasl; b=ZU2sTkxc+qCGk3Gtj80AEdQB5NUi4CAr8 2ZfaDjdFUVfY2WDvt8KwT0AkpXuWGby4fOkAZ0qTGZLAZUAssYiMIJUv63V0KSCM kRxN+4fMTycIV7089Bkd9NIdiz8miL6VDxuFzEhUj5AH3gd1BNh1bEkPwOKgYM3P pptdjmvHBM=
In-reply-to: <20120307155439.GA23360@xxxxxxxx>
References: <20120307155439.GA23360@xxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Mar 07, 2012 at 03:54:39PM +0000, Brian Candler wrote:
> core.size = 1085407232
> core.nblocks = 262370

core.nblocks is correct here: space used = 262370 * 4 = 1049480 KB

(If I add up all the non-hole extents I get 2098944 blocks = 1049472 KB
so there are two extra blocks of something)

This begs the question of where stat() is getting its info from?

Ah... but I've found that after unmounting and remounting the filesystem
(which I had to do for xfs_db), du and stat report the correct info.

In fact, dropping the inode caches is sufficient to fix the problem:

root@storage1:~# du -h /disk*/scratch2/work/PRSRA1/PRSRA1.1.0.bff
2.0G    /disk10/scratch2/work/PRSRA1/PRSRA1.1.0.bff
2.0G    /disk11/scratch2/work/PRSRA1/PRSRA1.1.0.bff
2.0G    /disk12/scratch2/work/PRSRA1/PRSRA1.1.0.bff
1.1G    /disk1/scratch2/work/PRSRA1/PRSRA1.1.0.bff
1.1G    /disk2/scratch2/work/PRSRA1/PRSRA1.1.0.bff
2.0G    /disk3/scratch2/work/PRSRA1/PRSRA1.1.0.bff
2.0G    /disk4/scratch2/work/PRSRA1/PRSRA1.1.0.bff
2.0G    /disk5/scratch2/work/PRSRA1/PRSRA1.1.0.bff
2.0G    /disk6/scratch2/work/PRSRA1/PRSRA1.1.0.bff
2.0G    /disk7/scratch2/work/PRSRA1/PRSRA1.1.0.bff
2.0G    /disk8/scratch2/work/PRSRA1/PRSRA1.1.0.bff
2.0G    /disk9/scratch2/work/PRSRA1/PRSRA1.1.0.bff
root@storage1:~# echo 3 >/proc/sys/vm/drop_caches 
root@storage1:~# du -h /disk*/scratch2/work/PRSRA1/PRSRA1.1.0.bff
1.1G    /disk10/scratch2/work/PRSRA1/PRSRA1.1.0.bff
1.1G    /disk11/scratch2/work/PRSRA1/PRSRA1.1.0.bff
1.1G    /disk12/scratch2/work/PRSRA1/PRSRA1.1.0.bff
1.1G    /disk1/scratch2/work/PRSRA1/PRSRA1.1.0.bff
1.1G    /disk2/scratch2/work/PRSRA1/PRSRA1.1.0.bff
1.1G    /disk3/scratch2/work/PRSRA1/PRSRA1.1.0.bff
1.1G    /disk4/scratch2/work/PRSRA1/PRSRA1.1.0.bff
1.1G    /disk5/scratch2/work/PRSRA1/PRSRA1.1.0.bff
1.1G    /disk6/scratch2/work/PRSRA1/PRSRA1.1.0.bff
1.1G    /disk7/scratch2/work/PRSRA1/PRSRA1.1.0.bff
1.1G    /disk8/scratch2/work/PRSRA1/PRSRA1.1.0.bff
1.1G    /disk9/scratch2/work/PRSRA1/PRSRA1.1.0.bff
root@storage1:~# 

Very odd, but not really a major problem other than the confusion it causes.

Regards,

Brian.

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