Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Aug 2013 08:25:42 +0300
From:      Kimmo Paasiala <kpaasial@gmail.com>
To:        aurfalien <aurfalien@gmail.com>
Cc:        freebsd-fs <freebsd-fs@freebsd.org>
Subject:   Re: du which understands ZFS
Message-ID:  <CA%2B7WWSf1OjoYQp0SJ8PcJ=Qynd-W8JNuKSSR5suReE%2Bcrvx_UQ@mail.gmail.com>
In-Reply-To: <CAF20B8F-1CBE-4620-9F3D-0E4D05714067@gmail.com>
References:  <F85B151C-2750-4306-A6DC-E600AB7A7438@gmail.com> <CAFqOu6hpp7%2BcdSNOJkoRqc3MR-mVaLJ4HXBfP3Dq7tLgeo--qw@mail.gmail.com> <CAF20B8F-1CBE-4620-9F3D-0E4D05714067@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Aug 20, 2013 at 8:18 AM, aurfalien <aurfalien@gmail.com> wrote:
>
> On Aug 19, 2013, at 9:46 PM, Artem Belevich wrote:
>
>>
>>
>>
>> On Mon, Aug 19, 2013 at 8:51 PM, aurfalien <aurfalien@gmail.com> wrote:
>> Hi,
>>
>> Is there a version of du which understands ZFS?
>>
>> Currently when running du I get this;
>>
>> I guess you meant 'df'.
>>
>> Alas, the answer seems to be 'no, there's no ZFS-aware df'. The reason f=
or that is that df gets its info via statfs(2) call and the only info it ge=
ts back is total number of blocks and available number of blocks. It's assu=
med that used space equals total-available. It worked well enough for other=
 filesystems where it was filesystem that was managing disk space.
>>
>> ZFS obviously violates this assumption as available space is actually pr=
operty of the pool, not of the filesystem, so ZFS has to lie about total si=
ze in order to present (arguably more important) amount of used and availab=
le space in a consistent way.
>>
>> --Artem
>
> Thanks for the reply.
>
> There is a ZFS aware df in Illumos.  I wonder if it would be possible to =
port this to FreeBSD?
>
> Unsure how it works, hell I didn't even know how df worked until you expl=
ained, still kinda don't :)
>
> At any rate, perhaps I'll bring bring this up in the FreeBSD dev list to =
see what traction I get.
>
> - aurf
>
>

How are you going to define the maximum size of particular dataset
when it's set to "infinity" by default. The only way I know to get
df(1) to show proper numbers is to set a quota for the dataset to
limit the maximum size to something lower than the space available in
the pool.

-Kimmo



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B7WWSf1OjoYQp0SJ8PcJ=Qynd-W8JNuKSSR5suReE%2Bcrvx_UQ>