SMB share of dataset with sub-datasets shown wrong used space after upgrade to 13.0

Breit

Dabbler
Joined
Oct 4, 2016
Messages
25
I recently upgraded TrueNAS Core from 12.0-U8.1 to 13.0. I have a pool there consisting of a 3x6 disk RaidZ2. There is (besides other things) a dataset that also has a few other child-datasets under it. That dataset is shared via SMB to a Windows 10 box.

On 12.0-U8.1 the SMB share showed as used space exactly the sum of all used space of all child datasets as well as the used space on the dataset itself. Just like zfs list <dataset> would.
On 13.0 the SMB share only showed the used space on the dataset excluding all the child datasets. zfs list <dataset> still shows the same as on 12.0-U8.1.

Is that intended behaviour or just a bug? Is there an option somewhere to revert this back to the way it was in 12.0-U8.1?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,545
The SMB request that we're responding to is for the FS stats of the underlying volume. It's inappropriate (and more inefficient) to get the stats for used by children on a potentially hot code path. If you want the old behavior you can set the auxiliary parameter zfs_core:zfs_space_enabled = true
 

ragametal

Contributor
Joined
May 4, 2021
Messages
187
THANK YOU!!!!
This was driving me crazy.
 

Ruff.Hi

Patron
Joined
Apr 21, 2015
Messages
271
Am I seeing the same / similar behavior via a different lens?

I am running 8 x 4TB drives in RaidZ2 so that should show 6 x 3.5tb (21) roughly.

I just upgraded my TrueNAS from 12.0-U8 to 13.0-U2.

With 12.0-U8, under windows 10, my mapped drive (Z) reports 8.1TB used with 12.4TB free ... total of 20.4TB
With 13.0-U2, under windows 10, my mapped drive (Z) reports 3.5MB used with 12.2TB free ... total of 12.2TB

I found another thread discussing the same / similar issue ... https://www.truenas.com/community/threads/storage-free-used-display-error.101121/
 
Last edited:

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,545
Am I seeing the same / similar behavior via a different lens?

I am running 8 x 4TB drives in RaidZ2 so that should show 6 x 3.5tb (21) roughly.

I just upgraded my TrueNAS from 12.0-U8 to 13.0-U2.

With 12.0-U8, under windows 10, my mapped drive (Z) reports 8.1TB used with 12.4TB free ... total of 20.4TB
With 13.0-U2, under windows 10, my mapped drive (Z) reports 3.5MB used with 12.2TB free ... total of 12.2TB
The total is simply summing up the `used` and `available` counters for the volume under the given path SMB path. So yes, you're seeing the same thing.
 

Ruff.Hi

Patron
Joined
Apr 21, 2015
Messages
271
The total is simply summing up the `used` and `available` counters for the volume under the given path SMB path. So yes, you're seeing the same thing.

Thanks for the reply. I agree that the total is summing correctly. The 'used' isn't right. I have a rainmeter display on my desktop and thought that my datasets had disappeared, been trashed, deleted. It was slightly worrying (classic understatement) for a few minutes.
 

MauricioU

Explorer
Joined
May 22, 2017
Messages
64
The SMB request that we're responding to is for the FS stats of the underlying volume. It's inappropriate (and more inefficient) to get the stats for used by children on a potentially hot code path. If you want the old behavior you can set the auxiliary parameter zfs_core:zfs_space_enabled = true
Hi,

May I ask where I add this to the auxiliary parameter? Under Services > SMB? or elsewhere?
 

MauricioU

Explorer
Joined
May 22, 2017
Messages
64
Hi,

May I ask where I add this to the auxiliary parameter? Under Services > SMB? or elsewhere?
I tried it in the auxiliary parameters under Services > SMB. It worked. Is there any downside to adding this in the auxiliary parameters?
 

MauricioU

Explorer
Joined
May 22, 2017
Messages
64
It will have a negative impact on performance of certain SMB requests.
could you elaborate on what kind of smb requests? Just curious.
 
Top