From owner-freebsd-fs@FreeBSD.ORG Tue Apr 15 13:09:53 2014 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 325C8224 for ; Tue, 15 Apr 2014 13:09:53 +0000 (UTC) Received: from mail.in-addr.com (noop.in-addr.com [208.58.23.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 016701826 for ; Tue, 15 Apr 2014 13:09:52 +0000 (UTC) Received: from gjp by mail.in-addr.com with local (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1Wa37P-000EgZ-Vu; Tue, 15 Apr 2014 09:09:44 -0400 Date: Tue, 15 Apr 2014 09:09:43 -0400 From: Gary Palmer To: Jason Breitman Subject: Re: Differences in reporting by du df and usedbydataset Message-ID: <20140415130943.GC15884@in-addr.com> References: <0D13866F-04ED-4572-B7C9-04DC806B6513@zxcvm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: gpalmer@freebsd.org X-SA-Exim-Scanned: No (on mail.in-addr.com); SAEximRunCond expanded to false Cc: fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Apr 2014 13:09:53 -0000 On Tue, Apr 15, 2014 at 08:25:51AM -0400, Jason Breitman wrote: > I have not received a reply to my question and wanted to post again so that the group could see the question again. > Are there any open files on the filesystem? fstat or lsof should tell you, I think. Files thare are open but that have been deleted show up in df but not du. That is not unique to zfs. If there are no open files I'm not sure what else to suggest. Does a scrub pass OK? Regards, Gary > > > > On Mar 26, 2014, at 12:53 PM, Jason Breitman wrote: > > The different disk usage measurements are frequently discussed and most of the time snapshots are the source of confusion. > I use refquota to avoid this confusion for user based file systems, but can not explain the below reports and hope you can help. > > Why is there an ~18 GB difference between du and df / usedbydataset? > I included additional information so that you can see that used = usedbysnapshots + usedbydataset and that there are no reservations. > > # du -sh /tank/users/auser > 5.1G /tank/users/auser > > # df -h /tank/users/auser > Filesystem Size Used Avail Capacity Mounted on > tank/users/auser 35G 23G 11G 66% /tank/users/auser > > # zfs get usedbydataset tank/users/auser > NAME PROPERTY VALUE SOURCE > tank/users/auser usedbydataset 23.2G - > > # zfs get used,usedbysnapshots,usedbydataset tank/users/auser > NAME PROPERTY VALUE SOURCE > tank/users/auser used 63.9G - > tank/users/auser usedbysnapshots 40.7G - > tank/users/auser usedbydataset 23.2G - > > # zfs get refreservation,usedbyrefreservation tank/users/auser > NAME PROPERTY VALUE SOURCE > tank/users/auser refreservation none default > tank/users/auser usedbyrefreservation 0 > > > OS: Freebsd 9.1 > > # zpool upgrade -v > This system is currently running ZFS pool version 28. > > The following versions are supported: > > VER DESCRIPTION > --- -------------------------------------------------------- > 1 Initial ZFS version > 2 Ditto blocks (replicated metadata) > 3 Hot spares and double parity RAID-Z > 4 zpool history > 5 Compression using the gzip algorithm > 6 bootfs pool property > 7 Separate intent log devices > 8 Delegated administration > 9 refquota and refreservation properties > 10 Cache devices > 11 Improved scrub performance > 12 Snapshot properties > 13 snapused property > 14 passthrough-x aclinherit > 15 user/group space accounting > 16 stmf property support > 17 Triple-parity RAID-Z > 18 Snapshot user holds > 19 Log device removal > 20 Compression using zle (zero-length encoding) > 21 Deduplication > 22 Received properties > 23 Slim ZIL > 24 System attributes > 25 Improved scrub stats > 26 Improved snapshot deletion performance > 27 Improved snapshot creation performance > 28 Multiple vdev replacements > > For more information on a particular version, including supported releases, > see the ZFS Administration Guide. > > # zfs upgrade -v > The following filesystem versions are supported: > > VER DESCRIPTION > --- -------------------------------------------------------- > 1 Initial ZFS filesystem version > 2 Enhanced directory entries > 3 Case insensitive and filesystem user identifier (FUID) > 4 userquota, groupquota properties > 5 System attributes > > For more information on a particular version, including supported releases, > see the ZFS Administration Guide. > > > > Jason Breitman > jbreitman@zxcvm.com > > > > > > > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" >