Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Move to Win Server 2012 R2

Status
Not open for further replies.

Digikiss

IS-IT--Management
Dec 30, 2014
9
FR
Hello
Just got a new Win 2012R2 Server and having some issues. Currently Openfiler for file server = XP, Vista and W7 clients no problem

A test read/lock/write on W7 & XP seems to work fine, the problem is when the test program is executed on the server itself (in view of rdp use). Very quickly produces CDX error on either client or server.
All the usual done: SMB2 & oplocks disabled server side. XP client oplocks disabled. W7 oplocks & SMB2 disabled. Server client SMB2 & oplocks disabled.
Server disk caching is disabled.
Seems like some other caching/locking is still going on when when the server is accessing files 'locally'?
Need to access files via map drives and RDP into server.
Would like to avoid recoding as its working fine with files stored on Openfiler and worked fine before that on files stored on an XP 'server'. Code is very 1980's but is working fine in current setup.
Obvious solution would be to keep Openfiler or other NAS for file server but just forked out for pricey new kit so hmmmm would like to find solution!
Any ideas?

Mods made below:

Clients XP:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MRXSmb\Parameters OplocksDisabled = 1
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters]
"FileInfoCacheLifetime"=dword:00000000
"FileNotFoundCacheLifetime"=dword:00000000
"DirectoryCacheLifetime"=dword:00000000

Client Win 7 - 1:
SMB2 desactivé
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MRXSmb\Parameters OplocksDisabled = 1
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters]
"FileInfoCacheLifetime"=dword:00000000
"FileNotFoundCacheLifetime"=dword:00000000
"DirectoryCacheLifetime"=dword:00000000

Client Win 7 - 2:
Aucun modification

Serveur:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters SMB2 = 0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters SMB1 = 1
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters EnableOplocks = 0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters EnableOpLockForceClose = 1
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters CachedOpenLimit = 0



HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MRXSmb\Parameters OplocksDisabled = 1
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters]
"FileInfoCacheLifetime"=dword:00000000
"FileNotFoundCacheLifetime"=dword:00000000
"DirectoryCacheLifetime"=dword:00000000
 
Sorry if I was not clear. Currently Openfiler server files with XP, vista, w7 clients working fine. Want to move to new w2012r2 as file server and Rdp.
 
the problem is when the test program is executed on the server itself

How about giving us some information on this 'test program'?

* Is it a VFP application?
* If so, are the data tables VFP data tables residing on this new server?
* Or are they residing on a SQL Server or other database Server on this new server?

Need to access files via map drives and RDP into server.
???

* Is the test application being run on a virtual 'workstation' resident within the new server or what/how?

Any other pertinent information that might help us focus on where the problem might be coming from?

Good Luck,
JRB-Bldr
 
Hi JRB-Bldr

Thanks for your interest and assistance!

How about giving us some information on this 'test program'?
- Yes it is VFP 9 SP2. See attached RAR with code: - The DBF & CDX is on a shared folder on the server under c:- Just 1x DBF & 1x CDX files. Our main ERP/CRM just runs DBF's, CDX and memo files. There are about 40 DBFs. These are currently on Openfiler. Users access via a mapped drive (EXE is installed locally). Everything has been running fine on this setup for years.

Is the test application being run on a virtual 'workstation' resident within the new server or what/how?
- I'm running the test app on Win7 and XP. Both have oplocks disabled and other registry mods to avoid SMB2 / oplocks issues widely covered (see original post above).
- When app is run on server at same time as on Win7 / XP produces error very quickly. I'm just running the app in admin account. EXE+dll, etc are in a folder on the desktop. Points to the same mapped R: drive on shared folder under c:- When app is just run from Win7 + XP it produces the error very rarely if at all
- The app basically is to test no issues locking file: locks file and get last order number. It then adds 1 to this number, checks lock again and then writes the new record. The code in the CRM/ERP is all very similar to this and I would like to avoid making any major modifications (may as well just keep the Openfiler or other NAS for the data).

The error produced is 'Error Reading file r:\nastest\net_inv.cdx' on the line 'USE (netDRV+"net_inv.DBF") SHARED'.

I have done copy structure with CDX to create the test DBF/CDX before testing each time.

I have also run the test pointed to mapped drive on Openfiler NAS. Multiple Win7, XP (some with oplocks enabled) and the Win2012 server all read/writing at the same time. No problem.


Once again many thanks for any advice on this!

Charlie.
 
Once you did the registry change, not only clients but also the server has to restart to let them be effective.

Bye, Olaf.
 
Hi Olaf

Yes, I've restarted server and clients.

Just an additional note: I can run the test app on the server in multiple rdp sessions without getting any error.

Thanks,
Charlie

 
Running the app in rdp sessions confirms the server itself has no problems with oplocks, bur oplocks are a feature you only have with clients accessing the server via file (smb) protocol, not via rdp protocol anyway, so you that's not a proof the settings are working.

There's a fixit for setting off SMB2. You may find and use that:
Bye, Olaf.
 
Sorry for the typos.

On top of the given link to a FixIt installer: The essential thing to know is, previous truning off SMBv2 and oplocks was a solution, but now on top of that SMBv3 exists and also has to be turned off before the setting turning off oplocks will be effective.

Bye, Olaf.
 
Thanks.

I thought the following disabled both SMB2 and SMB3?
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
Registry entry: SMB2
REG_DWORD: 0 = Disabled

If I run:
Get-SmbServerConfiguration | Select EnableSMB1Protocol, EnableSMB2Protocol

EnableSMB1Protocol EnableSMB2Protocol
------------------ ------------------
True False

If I run Get-SmbConnection I get this:

ServerName ShareName UserName Credential Dialect NumOpens
---------- --------- -------- ---------- ------- --------
server15 test M******\administ... M******\Administ... 1.50 2
server15 test M******\charlie M******\charlie 1.50 3


So it looks like it's SMB1 (1.50) ?

Thanks,
Charlie
 
Registry entry: SMB2
REG_DWORD: 0 = Disabled

And SMB3?

Anyway, just try the fixit. It's there to do everything needed to turn off oplocks, and I'm not keen to deep dive into details of what you have to set for that matter today. One of our customers simplyfied the solution by adding a Win2003 server. It simply doesn't have SMB2 or 3 or oplocks.

Bye, Olaf.
 
And SMB3?
Do you know if this Fixit also works on 2012 R2? To me it looks like it is already done correctly (see below).

As far as I understand, disabling SMB2 also disables SMB3:
Notes When you enable or disable SMBv2 in Windows 8 or in Windows Server 2012, SMBv3 is also enabled or disabled. This behavior occurs because these protocols share the same stack.

Win2003 server. It simply doesn't have SMB2 or 3 or oplocks.
Or I could just use Openfiler for the data which has been working fine...


Below is current server config:
PS C:\Users\Administrator> Get-SmbServerConfiguration
AnnounceServer : False
AsynchronousCredits : 64
AutoShareServer : True
AutoShareWorkstation : True
CachedOpenLimit : 0
AnnounceComment :
EnableDownlevelTimewarp : False
EnableLeasing : True
EnableMultiChannel : True
EnableStrictNameChecking : True
AutoDisconnectTimeout : 0
DurableHandleV2TimeoutInSeconds : 30
EnableAuthenticateUserSharing : False
EnableForcedLogoff : True
EnableOplocks : False
EnableSecuritySignature : True
ServerHidden : True
IrpStackSize : 15
KeepAliveTime : 2
MaxChannelPerSession : 32
MaxMpxCount : 50
MaxSessionPerConnection : 16384
MaxThreadsPerQueue : 20
MaxWorkItems : 1
NullSessionPipes : netlogon
NullSessionShares :
OplockBreakWait : 35
PendingClientTimeoutInSeconds : 120
RequireSecuritySignature : True
EnableSMB1Protocol : True
EnableSMB2Protocol : False

Smb2CreditsMax : 2048
Smb2CreditsMin : 128
SmbServerNameHardeningLevel : 0
TreatHostAsStableStorage : False
ValidateAliasNotCircular : True
ValidateShareScope : True
ValidateShareScopeNotAliased : True
ValidateTargetName : True
EncryptData : False
RejectUnencryptedAccess : True
 
I think you have to run the fixit on 2012, because the op locks are not switched off by the registry.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are not good for you.
 
Thanks. But comes up with hotfix is not applicable OS.

op locks are not switched off by the registry.
Can you clarify? All that I have read indicates the registry to disable Oplocks and it is currently showing up:
EnableOplocks : False


Thanks,
Charlie
 
Follow these instructions:

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are not good for you.
 
Yes that has been done amongst other registry changes (see original post).

The error is only coming up when app run on the server pointing to a mapped drive, shared folder under c: drive. The app runs fine when just running on server or Rdp sessions on server. But not at the same time as running on clients pc's over lan.

Happy new year!

Charlie
 
quotes:

1. > I can run the test app on the server in multiple rdp sessions without getting any error.
2. > The error is only coming up when app run on the server pointing to a mapped drive, shared folder under c: drive.

This may not be contradicting each other, but I actually don't get the mix of what you're doing.

If users partly use an app via rdp and only one is using it via LAN, this is causing oplocks. oplocks never occur using files locally, but once they occur because of any LAN user, they also affect all local (or rdp) users.

Anyway, oplocks may also not be the root problem. I've lost track and interest in what to do about oplocks today, so all I can do is wish you good luck.

Bye, Olaf.
 
Just a follow-up to the vexed question of OpLocks , SMB etc. Had a site that recently moved from Server 2003 to Server 2014. Response time on some busy screens went from 10 secs to 300 seconds. I had maade sure that the upgrade put VFP on a seperate virtual box , this box had SMB switched off etc , all to no avail.

Finally the IT guy switched the office router from a new but unmanaged switch to an old managed switch and the response time came back almost to old. It does seem that no matter what you do , you are going to get a lot more round-trips on the network with server 2014 , so check your network switches. That experience might help others in same situation
 
Good morning, foxerdb

The solution you post IS actually about the registry keys to turn off SMB2.
There are better solutions and more verbose excplanations than this.

Thanks anyway.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top