9

When I create a new folder in a shared folder under Windows Server 2012 sometimes i can not see new folder by windows 7 clients. Also with some refresh I still can not see new folders. After some minutes they appear. Is possibile to change the refresh time or what can be?

thank you

2
  • Can you supply more information? Are you using the new SMB 3.0, for example? Feb 25, 2013 at 18:32
  • How can i understand the smb version?
    – Tobia
    Feb 26, 2013 at 7:13

3 Answers 3

15

I had exactly the same issue but with Samba 4 exports and Windows 7 clients. It is definitely client side error. After some thorough troubleshooting, I simply added the registry key and it worked like a charm after hitting the F5 button once.

Only had to add this registry key:

DirectoryCacheLifetime[DWORD] = 0

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Lanmanworkstation\Parameters

The values mentioned in this article seem to be invalid, as these registry values no longer exist. I believe that the default expiry time for the cache is 10 minutes rather than 10 seconds. http://technet.microsoft.com/en-us/library/ff686200%28v=ws.10%29.aspx

UPDATE(20/04/2015)

If you are interested in applying this on server side without the need to configure the clients you must add the following line in the [global] section within smb.conf:

server max protocol = SMB2_02

This will limit the server down to protocol SMB2 rather than the default SMB3 which comes with Samba 4 but it compromises the transfer speed. I believe that protocol SMB2_02 is an early version of SMB2 which doesn't support caching, so it should work in this case.

However I noticed that a few clients were still experiencing caching issues and had to manually change registry as described above.

Unfortunately there isn't much documentation about the various SMB protocol versions. Here is what the man page for smb.conf says about this:

Reference: https://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#SERVERMAXPROTOCOL

1
  • Bit me today and the listed reghack took effect immediately.
    – genpfault
    Sep 21, 2015 at 4:55
2

Im having the same issue and I will post what I have read. I didn't try it yet.


You need to add some registry keys to force SMB2.0 to refresh the screen quicker. Here are the keys:

as always, edit the registry at your own risk

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Lanmanworkstation\Parameters

1.Directory cache, by setting "DirectoryCacheLifetime" to ZERO.

2.File Not Found cache, by setting "FileNotFoundCacheLifetime" to ZERO.

3.File information cache, by setting "FileInfoCacheLifetime" to ZERO.

After adding these entries, reboot the machine and try again. I did this to any client machine that was having issues viewing the network share. I didn't do this to the File server itself.

1

I created a new Dword: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Lanmanworkstation\Parameters\DirectoryCacheLifetime and set to 0

It worked for me after a reboot.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .