From owner-freebsd-fs@FreeBSD.ORG Tue Aug 20 17:48:51 2013 Return-Path: Delivered-To: freebsd-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 ESMTP id 20A88B2C for ; Tue, 20 Aug 2013 17:48:51 +0000 (UTC) (envelope-from aurfalien@gmail.com) Received: from mail-pb0-x233.google.com (mail-pb0-x233.google.com [IPv6:2607:f8b0:400e:c01::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EE2452026 for ; Tue, 20 Aug 2013 17:48:50 +0000 (UTC) Received: by mail-pb0-f51.google.com with SMTP id jt11so682174pbb.24 for ; Tue, 20 Aug 2013 10:48:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=mzij5KMhRsrGfn67T2qJCgK2mjflFpKE25doB4wHl2I=; b=CF3JnknK94L+59bPdeN/ICAlRzopOLsNniI5i9i3zYMNMnhXKul13UroaMv3HKmWzS CYkmcewWbsKAoDhvqb3llNHsLpPyZ8fOYMngW8oclLtzb4V2B//pJSIAnfXa7kqqRGWT G+NUe1p5g+Eab9eKoVprC1AQnd9SAwWmaiJX01clEWRc6odt538Yf6julZHjFf9Pni+7 ly/UiQDS1t5VS+Fsfo1ttnIospICMCHemhvoMUc0h46+SwgXWEt7T3S1aqbhMPNmG2cd TrkNrRBGdxLQm1sSmYSwCXsFJxY86R2ofgKessfMx2B3I1kxKrb5xLMaze/NftErmL+Q 8UdA== X-Received: by 10.66.150.41 with SMTP id uf9mr5166932pab.108.1377020930107; Tue, 20 Aug 2013 10:48:50 -0700 (PDT) Received: from briankrusicw.logan.tv ([64.17.255.138]) by mx.google.com with ESMTPSA id fl3sm5074761pad.10.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 20 Aug 2013 10:48:49 -0700 (PDT) Subject: Re: du which understands ZFS Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: aurfalien In-Reply-To: <5213A53D.4010701@bluerosetech.com> Date: Tue, 20 Aug 2013 10:48:45 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20130820165452.GA76782@neutralgood.org> <5213A53D.4010701@bluerosetech.com> To: Darren Pilgrim X-Mailer: Apple Mail (2.1085) Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 17:48:51 -0000 On Aug 20, 2013, at 10:19 AM, Darren Pilgrim wrote: > On 8/20/2013 12:54 PM, kpneal@pobox.com wrote: >> On Tue, Aug 20, 2013 at 10:01:48AM -0400, gtodd@bellanet.org wrote: >>>=20 >>> On Tue, 20 Aug 2013, Mark Felder wrote: >>>> On Mon, Aug 19, 2013, at 22:51, aurfalien wrote: >>>>> Hi, >>>>>=20 >>>>> Is there a version of du which understands ZFS? >>>>>=20 >>>>> Currently when running du I get this; >>>>>=20 >>>>> Filesystem Size Used Avail Capacity Mounted on >>>>> abyss 51T 50k 51T 0% /abyss >>>>> abyss/PROJECT 72T 20T 51T 29% = /abyss/PROJECTS >>>>> abyss/PROJECTX 54T 2.6T 51T 5% = /abyss/PROJECTSX >>>>>=20 >>>>> The zpool of abyss is 75TB in size. >>>>>=20 >>>> And do you want df to be aware of compression and deduplication, = too? I >>>> don't think this will show up in FreeBSD's df. Use the tools that = ZFS >>>> provides and you'll never get any unexpected surprises. >>>=20 >>> I think if there were to be a "zfs aware" df it would show = filesystem >>> statistics for ufs and other "traditional" filesystems, but if/when = it >>> detected zfs it would output something like: >>>=20 >>> "ZFS - free disk space does not apply" :-) >>=20 >> Well, except that that isn't really accurate. It looks like a df of >> zfs shows a size of used+avail. You'll see something similar if you >> NFS mount an exported filesystem. >>=20 >>> or maybe some more helpful message about using zpool(1) zfs(1) etc. >>=20 >> How about a short blurb along the lines of: >> "The results from df are approximations that do not take into account >> features supported by some filesystems like compression or = deduplication. >> Please refer to your filesystems documentation for = filesystem-specific >> details." >>=20 >> Perhaps throw in something about filesystem-specific metadata also >> throwing off the numbers. This is true for UFS as well if indirect >> blocks are needed, correct? >=20 > UFS with softupdates also has the fun side-effect of it being possible = to have negative free space. :) >=20 > df is a nice tool to give rough approximations of usage, but is far = too high level to provide the kind of reporting OP wants. ZFS's own = tools must be used for that. Agreed. Still getting used to the toolset involved with managing ZFS. > If we made df ZFS aware, we'd open the door to make it SMB, NFS, = soft-updates, and FUSE aware. Personally, I'd rather not have the = lumbering monstrosity that would be such a df. >=20 > P.S. I'd like to offer this bit of humour: >=20 > Excerpt from `df -ciH` > Filesystem Size Used Avail Capacity iused ifree %iused > tank 807G 38k 807G 0% 7 1.6G 0% > total 260T 1.1T 259T 0% 1.4M 505G 0% >=20 > A quarter petabyte and a half a trillion inodes. Pretty impressive = for a RAID-Z2 of four 1 TB disks. ;) Thats not only funny, but awesome that you got that much space from = 4x1TB disks. What brand are these disks so I can get some before the vendor finds out = :) - aurf=