[OmniOS-discuss] zfs diskusage (solved)

Tobias Oetiker tobi at oetiker.ch
Fri May 16 13:38:58 UTC 2014


Yesterday Tobias Oetiker wrote:

> Today we were out of diskspace on one of our pools ... a few removed
> snapshots later all is fine, except that I find that I don't realy
> understand the numbers ... can anyone elighten me?
>
> # zpool list fast
> NAME   SIZE  ALLOC   FREE  EXPANDSZ    CAP  DEDUP  HEALTH  ALTROOT
> fast  4.34T  1.74T  2.61T         -    39%  1.22x  ONLINE  -
>
> # zfs list fast
> NAME   USED  AVAIL  REFER  MOUNTPOINT
> fast  2.59T   716G  78.5K  /fast
>
> Why does the 'zpool list' claim that 2.61T is free (61%)
> while 'zfs list' sees 716G free (27%)
>
> I know there is raidz2 and compression so the numbers  don't match
> up, but I don't understand why the ratio is so different between
> the two.
>
> I checked on other filesystems and there the view from zpool and
> zfs look much more similar.

answering my own question with some help from dan and irc:

a) zpool shows the actual free space on the disks ... blocks not
   allocated. Since it is a raidz2 pool, we loose 2 disks for
   redundancy.

b) zfs shows the space realy used ... though this does not realy
   add up yet.

c) The missing piece was the zvols ... zfs by default
   does thick provisioning why you create a volume ...
   so creating an 200G zvol reduces the available space in zfs by
   200G (and then some) without actually allocating any space ...
   so the free space in zpool does not change ...

d) (Not sure this is true, but I guess) In connection with
   compression a volume will in all likelyhood never occupie the
   space allocated.

what fell out of this for me, is that I switched the less important
volumes to thin provisioning ... (it could be done with the -s
switch at creation time):

# zfs set refreservation=0 pool-2/randomstuff/unimportant-volume

cheers
tobi

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
www.oetiker.ch tobi at oetiker.ch +41 62 775 9902



More information about the OmniOS-discuss mailing list