Share via


Steps to disable Client for NFS cache

Couple of days back, we were working on a problem in which user was trying to access NFS share using “map network drive” option. He is able to access it for the first time but when he tries to access it again after disconnecting the drive, he is getting the following error message:

However, he is able to access the NFS share using mount command and UNC path. Both these methods are working perfectly.

Striking point was that network trace does not show any MNT call for the second NFS access when tried from the “Map Network drive option”. This suggested that this issue may arise because of client for NFS caching some information. We make the following registry key changes to disable NFS cache:

· Open registry.

· Locate and then click the following registry subkey:

Ø HKEY_LOCAL_MACHINE\Software\Microsoft\ClientforNFS\CurrentVersion\Users\Default

· On the Edit menu, point to New, and then click Key.

· Type Cache, and then press ENTER.

· Locate and then click the following registry subkey:

Ø HKEY_LOCAL_MACHINE\Software\Microsoft\ClientforNFS\CurrentVersion\Users\Default\Cache

· On the Edit menu, point to New, and then click DWORD Value.

· Type AttributeTimeDelta, and then press ENTER.

· Right-click AttributeTimeDelta, and then click Modify.

· In the Edit DWORD Value dialog box, click Decimal, type a value 10, and then click OK.

· Also Create "RemoteWriteCache" and "FileAttributeCache" DWORD values under HKEY_LOCAL_MACHINE\Software\Microsoft\ClientforNFS\CurrentVersion\Users\Default\Cache and set these to 0 to disable caching.

· On the File menu, click Exit.

Please refer to the following KB article for more information in regard to AttributeTimeDelta:

            https://support.microsoft.com/kb/894071

We restart client for NFS service and this resolves the issue!