1

I have a FreeNas server with zfs pool. Configuration: 6 x 2TB disks in RAIDZ2. 15.5 TB raw space of disks.

# zpool list -v
NAME                                     SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
freenas-boot                            14.5G  4.94G  9.56G         -      -    34%  1.00x  ONLINE  -
  gptid/60734409-71b8-11e5-89c7-003048dcbffe  14.5G  4.94G  9.56G         -      -    34%
macierz                                 10.9T  7.39T  3.48T         -    40%    67%  1.00x  ONLINE  /mnt
  raidz2                                10.9T  7.39T  3.48T         -    40%    67%
    gptid/39505ab0-71c0-11e5-bb5b-003048dcbffe      -      -      -         -      -      -
    gptid/3a58ef4b-71c0-11e5-bb5b-003048dcbffe      -      -      -         -      -      -
    gptid/3b6a3687-71c0-11e5-bb5b-003048dcbffe      -      -      -         -      -      -
    gptid/3c6f5dd7-71c0-11e5-bb5b-003048dcbffe      -      -      -         -      -      -
    gptid/3d7255dd-71c0-11e5-bb5b-003048dcbffe      -      -      -         -      -      -
    gptid/3e77035a-71c0-11e5-bb5b-003048dcbffe      -      -      -         -      -      -

The "macierz" pool shows 10.9 TB of total space. The problem is the samba share on "macierz" shows only 4,15TB total space. Why?

 zfs list
NAME                                                         USED  AVAIL  REFER  MOUNTPOINT
freenas-boot                                                4.94G  9.11G    31K  none
freenas-boot/ROOT                                           4.84G  9.11G    25K  none
freenas-boot/ROOT/9.10-STABLE-201606270534                  12.7M  9.11G   607M  /
freenas-boot/ROOT/9.10.1-U4                                 13.6M  9.11G   636M  /
freenas-boot/ROOT/9.10.2-U1                                 13.8M  9.11G   649M  /
freenas-boot/ROOT/9.10.2-U2                                 14.4M  9.11G   651M  /
freenas-boot/ROOT/9.10.2-U3                                 13.1M  9.11G   651M  /
freenas-boot/ROOT/9.10.2-U5                                 14.4M  9.11G   653M  /
freenas-boot/ROOT/9.10.2-U6                                 4.75G  9.11G   657M  /
freenas-boot/ROOT/FreeNAS-8863f903d550e9d8a1e9f8c73ae9b4f0  10.6M  9.11G   504M  /
freenas-boot/ROOT/Initial-Install                              1K  9.11G   510M  legacy
freenas-boot/ROOT/default                                     45K  9.11G   511M  legacy
freenas-boot/grub                                           84.5M  9.11G  6.34M  legacy
macierz                                                     4.92T  2.09T   208K  /mnt/macierz
macierz/.system                                              233M  2.09T   208K  legacy
macierz/.system/configs-5ece5c906a8f4df886779fae5cade8a5     217M  2.09T   217M  legacy
macierz/.system/cores                                       4.44M  2.09T  4.44M  legacy
macierz/.system/rrd-5ece5c906a8f4df886779fae5cade8a5         192K  2.09T   192K  legacy
macierz/.system/samba4                                      1.54M  2.09T  1.54M  legacy
macierz/.system/syslog-5ece5c906a8f4df886779fae5cade8a5     9.79M  2.09T  9.79M  legacy
macierz/Veem                                                 866G  2.09T   866G  /mnt/macierz/Veem
macierz/backups                                             2.06T  2.09T  2.06T  /mnt/macierz/backups
macierz/jails                                               4.28G  2.09T   240K  /mnt/macierz/jails
macierz/jails/.warden-template-pluginjail                    610M  2.09T   606M  /mnt/macierz/jails/.warden-template-pluginjail
macierz/jails/nextcloud_1                                   3.68G  2.09T  4.24G  /mnt/macierz/jails/nextcloud_1
macierz/mailarchive_backup                                   130G  2.09T   130G  /mnt/macierz/mailarchive_backup
macierz/samba                                                598G  2.09T   598G  /mnt/macierz/samba
macierz/vmware                                              1.07T  2.09T  1.07T  /mnt/macierz/vmware
macierz/vsphere                                             5.31G  2.09T  5.31G  /mnt/macierz/vsphere
macierz/zimbra_backup                                        230G  2.09T   230G  /mnt/macierz/zimbra_backup
XorOrNor
  • 241
  • 1
  • 3
  • 8

2 Answers2

0

This is the strange way ZFS is interpreting space in order to take into account many ZFS features. This will surprise you many times in many situations. You have to not only read tutorials but also read the docs (man pages and Oracle docs) many times to understand it and remember it.

So you are asking about what almost everybody using ZFS will be asking in the beginning. And like I said, it is a bit complicated, so I don't have time to analyze it and remind myself and answer here (perhaps someone else will someday post an answer here), but I just wanted to post this short info that someone coming here will know what's going on. So Google is your friend here :)

Tomeg
  • 141
  • 3
0

The reasons are, as mentioned, several.

The first is that there is no "easy" way to know how much free space there is on a zfs pool in general.

The normal way to make a samba share report the (approximately) available space is to use a special script, configured in /usr/local/etc/smb4.conf (or whatever you use)

dfree command = something-you-made

Those scripts, usually, return the sum of used and available by a zfs get (!) normalized by 1024