zfs: the exponential file system from hell

Matthew Ahrens mahrens at delphix.com
Tue Oct 15 05:45:05 UTC 2013


On Tue, Oct 1, 2013 at 9:33 AM, Jordan Hubbard <jkh at mail.turbofuzz.com>wrote:

>
> On Sep 30, 2013, at 4:44 PM, kpneal at pobox.com wrote:
>
> > Bottom line:
> > The replacement for the 'df' command when using ZFS is 'zfs list'.
>
> Given that we have the sources to df, I guess we should consider the
> question begged:  Do we want to change it to DTRT for zfs filesystems?
>  There's no Unix Law™ that says "df(1) must use the output of statfs(2)
> directly and can use no longer sources of information!"
>
> At the end of the day, df(1) is just a convenient status reporting tool
> aimed at human consumption.  It could easily reach out to "zfs list" for
> the data it prints for zfs volumes if what's reported by statfs(2) just
> isn't suitable.
>

Indeed.  This is what illumos df(1) does, so that the "Size" reported is
the size of the pool, rather than the "Used + Available" of the individual
filesystem.  It would be great to get a similar change in gnu df (which is
also used on many illumos distros).

https://github.com/illumos/illumos-gate/blob/master/usr/src/cmd/fs.d/df.c#L1236-1306

--matt


More information about the freebsd-fs mailing list