From owner-freebsd-fs@FreeBSD.ORG Wed Mar 26 17:00:28 2014 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E456363E for ; Wed, 26 Mar 2014 17:00:27 +0000 (UTC) Received: from smtp.01.com (smtp.01.com [199.36.142.181]) by mx1.freebsd.org (Postfix) with ESMTP id 9F615D66 for ; Wed, 26 Mar 2014 17:00:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 608394F4B38 for ; Wed, 26 Mar 2014 11:53:14 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-2.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-2.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JurK8ljMR2VO for ; Wed, 26 Mar 2014 11:53:14 -0500 (CDT) Received: from smtp.01.com (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 3D9D34F4EC2 for ; Wed, 26 Mar 2014 11:53:14 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 2721E4F4EB3 for ; Wed, 26 Mar 2014 11:53:14 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-2.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-2.01.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id YmqH8RjyoRKp for ; Wed, 26 Mar 2014 11:53:14 -0500 (CDT) Received: from newman.zxcvm.com (unknown [38.109.103.138]) by smtp-out-2.01.com (Postfix) with ESMTPSA id AC18B4F4B38 for ; Wed, 26 Mar 2014 11:53:13 -0500 (CDT) From: Jason Breitman Message-Id: <0D13866F-04ED-4572-B7C9-04DC806B6513@zxcvm.com> Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Differences in reporting by du df and usedbydataset Date: Wed, 26 Mar 2014 12:53:11 -0400 References: To: fs@freebsd.org In-Reply-To: X-Mailer: Apple Mail (2.1874) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.17 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: Wed, 26 Mar 2014 17:00:28 -0000 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 =3D = 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 =20= # 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=20 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