Difference in free space reporting?

All your general support questions for OpenZFS on OS X.

Difference in free space reporting?

Postby nathansvt » Sat Oct 17, 2015 10:34 am

In OSX Finder, my ZFS volume shows no space available.
Code: Select all
df -h |grep zfsdrive
zfsdrive       440Gi  440Gi    0Bi   100% 4368414        0  100%   /Volumes/zfsdrive

But, zpool reports 21G free. I don't recall setting any quotas or special params when creating the pool.
Code: Select all
zpool iostat -v
                                                   capacity     operations    bandwidth
pool                                            alloc   free   read  write   read  write
----------------------------------------------  -----  -----  -----  -----  -----  -----
zfsdrive                                         674G  21.7G     16      2   483K  32.6K
  mirror                                         674G  21.7G     16      2   483K  32.6K
    media-3193CCDD-1A7D-0C45-9192-802B4C268E39      -      -      8      2   273K  33.3K
    media-06E1684C-9CB0-6044-8BF1-31F35EA7BB4A      -      -      7      2   247K  33.3K
----------------------------------------------  -----  -----  -----  -----  -----  -----

Why the difference :?:
Posts: 7
Joined: Mon Jan 19, 2015 10:25 am

Re: Difference in free space reporting?

Postby rottegift » Sat Nov 07, 2015 8:34 am

The zpool command's various free properties will reflect that a small amount of space (determined by the spa_slop_shift variable; in recent source it works out to 3.2% of the total pool space) is set aside to ensure that there is always emergency space for pool metadata. This space is not available to the "zfs" or "zvol" layers. This "slop" space protects you from situations in which you can end up with a completely-full-but-also-damaged pool more gently than out-of-pool-space pool suspensions or panics would.

WRT the unrelated reply above, Finder and other Apple tools generally report use base-ten giga-, mega-, etc.; the command line typically reports using base-two (Gibi-, Mebi-, etc.).

Using the example in the post above:

$ bc
Posts: 25
Joined: Fri Apr 25, 2014 12:00 am

Re: Difference in free space reporting?

Postby lundman » Sun Nov 08, 2015 4:37 pm

Also worth noting "zpool list" will show physical/raw space, and "zfs list" will show logical space.
User avatar
Posts: 707
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: Difference in free space reporting?

Postby oskar » Sun Nov 29, 2015 3:21 pm

Okay, but that is really annoying. Up to OS X 10.9 ZFS reported somewhat feasible things via df and the Finder. Is that change caused by the OS or is it just that 1.4.5 changed that? And, can we please get that back? Also, probably unrelated, with 1.3.x and OS 10.9 the trashcan worked as expected, with 10.11 and 1.4.5 the trashcan is gone and i get nasty warnings in the finder.
Can that be fixed or is this worth filing a bug with apple?

Posts: 2
Joined: Sun Nov 29, 2015 3:13 pm

Re: Difference in free space reporting?

Postby ilovezfs » Sun Nov 29, 2015 10:07 pm

There's also a rather unpleasant free-space-reporting-in-Finder bug to confound your analyses entirely.

Posts: 229
Joined: Thu Mar 06, 2014 7:58 am

Return to General Help

Who is online

Users browsing this forum: No registered users and 2 guests