Hello
I'm really hoping someone can help with this one.
We have an old application that's currently hosted on a Windows 2012R2 failover cluster - This provides file access to clients via a number of shares.
This application used to reside on an old Windows 2003 cluster and at the time the clients were running windows XP.
We've since upgraded our clients to Windows 10.
The vendor of the application has always insisted that the server be configured to only use SMB1 otherwise this causes issues with the application. We then had to enable SMB1 on our Windows 10 clients so they could access the server. This obviously isn't something we want to do.
Since the application has been on the 2012R2 cluster files are occasionally locked or corrupted causing all sorts of problems within the system.
I looked into this a little more and assumed that these issues could be because the clients are caching the flat files and also locking them on the server.
I also assumed this was the reason for the supplier wanting the server restricted to SMB1 so that that oplocks could be disabled - It seems that oplocks can only be disabled under SMB1 :/
(Turns out that although SMB2\3 has been disabled on the server the registry keys to disable oplocks hasn't been put in place so it's kinda pointless)
My questions are:
• Can oplocks be disabled on server 2012R2 for SMB2/3? I thought I might be able to use the new -LeasingMode powershell switch but this is only available for 2016 and up.
Info about leasing mode found here: https://learn.microsoft.com/en-us/windows-server/storage/file-server/troubleshoot/smbv1-not-installed-by-default-in-windows
• I did notice there's an EnableOplocks parameter under the Set-SMBServerConfiguration cmdlet on 2012R2. Would this work instead?
• If I can't disable this on the server side without being restricted to SMB1 then can I disable caching on these clients using the following reg keys? I could then leave the server running with SMB2\3 and then disable SMB1 on the clients?
- Directory cache, by setting DirectoryCacheLifetime to ZERO.
- File Not Found cache, by setting FileNotFoundCacheLifetime to ZERO.
- File information cache, by setting FileInfoCacheLifetime to ZERO.
• Here's the silly question. If I just disable caching on the server side share wouldn't this prevent the client from trying to cache the file and therefore prevent it from requesting a lock on the file?
Many thanks in advance