Windows properties for shared SMB folders are incorrect

I have a “Syncback3” dataset. Within this dataset, there is an “images” folder shared via SMB. This “images” folder is a replica of an “images” folder on my wife’s laptop (Windows Pro 11 25h2). On this laptop, if I check the properties of the “images” folder, I get 112,613 files, 1,465 folders, and 676 GB.
On the same PC, if I check the properties of the “images” folder shared on TrueNAS, I get 61,877 files, 930 folders, and 380 GB.
On my PC, if I check the properties of the “images” folder shared on TrueNAS, I get 99,370 files, 1,455 folders, and 624 GB. The properties of the shared folder in Windows display random values, sometimes showing 0.
In all cases, Midnight Commander on TrueNAS always shows 113,513 files and 692,536 MB.

It’s scary.

1 Like

I have noticed random issues like this with SMB before on Windows, I don’t think I have ever seen it happen on Linux when accessing the share. I think it might be an issue with Windows.

What version of TrueNAS are you using? TrueNAS 25.10 has known issues related to SMB.

1 Like

Yes 25.10.0

I seem to remember that the same problem existed on 25.04, but I am not sure.

In this case client walks the filesystem over SMB protocol and so counts can be impacted if (for example) the currently authenticated user lacks permissions to access a subdirectory.

Thank you for your response.

On the same Windows 11 PC, therefore with the same rights and at a 5-minute interval, it’s random.

If this is testing against 25.10.0 results are invalid since there is an outstanding SMB bug that’s scheduled for hotfix soon. Retry against 25.04.

Yes, indeed, version 25.10.0.
I tried rebooting to version 25.04, but that caused other problems. I’ll wait for the fix.

The problem only occurs on Windows 11. I have two Ubuntu systems, one running in Docker within TrueNAS and the other running standalone. The properties of the shared “images” directory are correct in both cases. The good news is that there is no data loss on the TrueNAS side. However, at this point, I don’t know if Windows 11 is processing all the data.

I downloaded and installed TreeSize Free on a Windows workstation.(Windows properties for shared SMB folders are incorrect - #11 by awalkerix) The number of files and directories, as well as the size of the “images” directory, are correct, identical to the properties shown by my two Ubuntu installations.
It therefore seems to be a problem with Windows File Explorer. I don’t know if Truenas 25.10.0 is affected.

Once again if you’re testing 25.10.0 then you’re probably wasting time.

1 Like

Resolved with 25.10.0.1. No data loss at first glance.
Thanks for the quick fix.