Mounted folders disappear in shared folder after navigating to them in Windows 7

You have a share folder on Windows Server 2008 or R2. The share folder contains volume mount points. Sometimes the mount point folders appear as "hidden" when you navigate through the content of the folders and clicks "back" in Windows Explorer.

 

This issue is related to SMBv2

Background:

This is behavior of SMB2 Client Redirector Caches explained here:

https://technet.microsoft.com/en-us/library/ff686200(WS.10).aspx

SMB Directory cache is based on path but when opening a mount point or junction depending on whether you open the reparse point or the target of the reparse point you get different attributes in the create response. GetFileAttributes API always opens with the flag open reparse point so you get the attributes of the reparse point (mount point or junction) if you open locally. But if you open a remote reparse point we get the attributes of the target as part of the create response that we cache and then when the app calls GetFileAttributes we return the attributes for the target of the reparse point from the cache instead of returning attributes for the reparse point. This problem is resulting into multiple problems in the field.

You can observe this behavior by following the below steps:

(1) Install a Windows file server that speakes SMBv2 (Windows 2008, Windows 2008 R2)

(2) Install a Windows 7 RTM client

On the server

=============

create a folder on c:share1 and share it (at least for your test user)

under c:share1, create the folders:

c:share1Dir1

c:share1Dir2

c:share1Dir3

c:share1Dir4

c:share1Mountpoint1

create a VHD and mount it in the Folder Mountpoint1

under Mountpoint1 create subfolders:

c:share1Mountpoint1subfolder1

c:share1Mountpoint1subfolder2

c:share1Mountpoint1subfolder3

On the Win 7 client

=================

Keep the standard Explorer settings in Tools - Folder Options - View Tab

(.) Do not show hidden files and folders."

net use Z \Win2008share1

open Z: in explorer

browse into Mountpoint1 and subfolder1

click back to share1

Result:

=> Mountpoint1 is hidden

Depending on the Explorer's Folder Options - View Setting, you will see the folder as hidden or not see the mountpoint folder at all.

Workaround is:

 

1. On the Win 7 client set the following registry key:

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesLanmanWorkstationParameters

DirectoryCacheLifetime = 0

But this workaround limits the functionality and improvements of Windows 7. This workaround may push higher load to the file servers.

 

2.  Instead of mounting the volume, mount a directory under the volume.

 

3. Disable SMBv2 (No SMB cache).

 

 

Update:

We have published a formal KB article to solve this problem. plese click following link for detail.

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