PRB: "Error Reading Drive" with Windows NT 3.5 as Server

ID: Q134637


The information in this article applies to:


SYMPTOMS

Users may receive an "Error reading drive <drive name>" message, or a "System error: Network error on drive <drive name>" message when trying to access a remote file on a Windows NT server or a workstation acting as a server.


CAUSE

Microsoft Windows NT caches the file handles (RFCBs) associated with files it has opened on behalf of a client request. Although write requests proceed normally, close requests are acknowledged by the server but buffered from the file system. This is intended to optimize response time to repeated open/close operations performed by clients.

Opportunistic Locking (oplock) optimization is a logical extension of the way a client caches its own file close request and relies on the server to arbitrate future requests for file access by other clients. This optimization may fail to work correctly depending on how the file has been opened by the application.


RESOLUTION

WARNING: The information in this article has not been confirmed or tested by Microsoft. Some or all of the information in this article has been taken from unconfirmed customer reports. ANY USE BY YOU OF THE INFORMATION PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this information "as is" without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

These errors have been resolved by using two different methods, each of which involve using the Registry Editor on the computer running Windows NT to manually disable this optimization by changing default parameters in the Registry.


MORE INFORMATION

WARNING: Using the Registry Editor incorrectly can cause serious, system- wide problems that may require you to reinstall Windows NT to correct them. Microsoft cannot guarantee that any problems resulting from the use of Registry Editor can be solved. Use this tool at your own risk.

Method 1:

The EnableOplocks startup parameter specifies whether the server allows clients to use oplocks on files. The default setting is 1 (true). Oplocks enable a significant performance enhancement but have the potential to cause lost cached data on some networks, particularly wide-area networks.

EnableOplocks is found in this path:


   \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
   \LanmanServer\Parameters 
With the Registry Editor, change the EnableOplocks parameter to 0 (false).

Method 2:

CachedOpenlimit controls the number of files that are cached open for optimization. Disabling this optimization and not caching open files has succeeded in alleviating these errors with FoxPro. The CachedOpenLimit parameter is located in the following key:

   \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
   \LanmanServer\Parameters 
If CachedOpenLimit exists, change the parameter to 0. If it does not exist, add it as follows:

   Value Name: CachedOpenLimit
   Data Type:  REG_DWORD
   Data:       0 
Method 3:

CacheFileTimeout controls duration of time the Cache manger holds the file open after an application has requested that it be closed. The response time for closing the file can be enhanced by reducing the CacheFileTimeout value. The CacheFileTimeout parameter is located in the following key:

   \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
   \LanmanServer\Parameters 
If CacheFileTimeout exists, change the parameter to 1. If it does not exist, add it as follows:

   Value Name: CacheFileTimeout
   Data Type:  REG_DWORD
   Data:       1 
or disable Opportunistic locking in the location

   UseOpportunisticLocking     REG_DWORD

   Range: 0 or 1
   Default: 1 (true) 


Indicates whether the redirector should use opportunistic-locking (oplock) performance enhancement. This value entry should be disabled only to isolate problems.


REFERENCES

For more information please see the following articles in the Microsoft Knowledge Base:

Q102967 REG: Server Service Entries, PART 1
Q124916 Some Client Applications Fail When Writing to Windows NT

Additional query words:


Keywords          : FoxWin FxnetworkWinnt 
Version           : 2.6a
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: July 28, 1999