Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Aug 2013 10:01:48 -0400 (EDT)
From:      gtodd@bellanet.org
To:        freebsd-fs@freebsd.org
Subject:   Re: du which understands ZFS 
Message-ID:  <alpine.BSF.2.00.1308200958000.63199@ninga.iciti.internal>

next in thread | raw e-mail | index | archive | help

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" :-)

or maybe some more helpful message about using zpool(1) zfs(1) etc.

The Oracle docs say something like this:

    When you compare the space consumption that is reported by the df
    command with the zfs list command, consider that df is reporting
    the pool size and not just file system sizes. In addition, df doesn't
    understand descendent file systems or whether snapshots exist.
    If any ZFS properties, such as compression and quotas, are set on file
    systems, reconciling the space consumption that is reported by df might
    be difficult.

http://docs.oracle.com/cd/E23824_01/html/821-1448/gbchp.html

Perhaps a short addition to the df/du manual pages or a reference to the 
relevant zfs part of the FreeBSD handbook would make df "zfs aware".



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1308200958000.63199>