Show pool space as max for smb shares?

Mugga

Dabbler
Joined
Feb 19, 2020
Messages
25
I got a 19tib usable pool space (3vdevs > 2 way mirror).
I created mutiple datasets for the pool and shared those datasets as smb shares in freenas.

When I mount a share as a network drive in windows, I get 6,65tb shown as max space. Which is obviously wrong. Can I change that behaviour some how?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
total size in samba is calculated as follows:
Code:
        available = zfs_prop_get_int(zfsp, ZFS_PROP_AVAILABLE);
        usedbysnapshots = zfs_prop_get_int(zfsp, ZFS_PROP_USEDSNAP);
        usedbydataset = zfs_prop_get_int(zfsp, ZFS_PROP_USEDDS);
        usedbychildren = zfs_prop_get_int(zfsp, ZFS_PROP_USEDCHILD);
        real_used = usedbysnapshots + usedbydataset + usedbychildren;
        total = (real_used + available) / blocksize;

You can verify by running "zfs get all pool/dataset", then follow the formula above to verify. Now if you have a userspace quota on the dataset, then the quota value will be displayed as the size rather than the sum above.
 

Mugga

Dabbler
Joined
Feb 19, 2020
Messages
25
Okay, but why can't freenas not just report the full capacity of the pool when there is no quota limit enabled for any dataset?

In our qnap running a raid5 configuration the whole pool capacity was shown for any of the shares.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Okay, but why can't freenas not just report the full capacity of the pool when there is no quota limit enabled for any dataset?

In our qnap running a raid5 configuration the whole pool capacity was shown for any of the shares.
In the past I wrote a patch to use the zpool size, and even allow hard-coding a value. At the end of the day, it's cosmetic and the values reflect what you see using the `zfs` command.
 

Mugga

Dabbler
Joined
Feb 19, 2020
Messages
25
Yeah, its more or less cosmetic. Was just wondering why this "feature" seems to be so unimportant.
 
Top