Date: Tue, 20 Aug 2013 13:19:57 -0400 From: Darren Pilgrim <list_freebsd@bluerosetech.com> To: kpneal@pobox.com Cc: freebsd-fs@freebsd.org Subject: Re: du which understands ZFS Message-ID: <5213A53D.4010701@bluerosetech.com> In-Reply-To: <20130820165452.GA76782@neutralgood.org> References: <alpine.BSF.2.00.1308200958000.63199@ninga.iciti.internal> <20130820165452.GA76782@neutralgood.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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: >> >> On Tue, 20 Aug 2013, Mark Felder wrote: >>> On Mon, Aug 19, 2013, at 22:51, aurfalien wrote: >>>> Hi, >>>> >>>> Is there a version of du which understands ZFS? >>>> >>>> Currently when running du I get this; >>>> >>>> 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 >>>> >>>> The zpool of abyss is 75TB in size. >>>> >>> 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. >> >> 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: >> >> "ZFS - free disk space does not apply" :-) > > 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. > >> or maybe some more helpful message about using zpool(1) zfs(1) etc. > > 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." > > 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? UFS with softupdates also has the fun side-effect of it being possible to have negative free space. :) 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. 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. P.S. I'd like to offer this bit of humour: 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% A quarter petabyte and a half a trillion inodes. Pretty impressive for a RAID-Z2 of four 1 TB disks. ;)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5213A53D.4010701>