du which understands ZFS
gtodd at bellanet.org
gtodd at bellanet.org
Tue Aug 20 14:03:14 UTC 2013
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".
More information about the freebsd-fs
mailing list