lundi 23 février 2015

delayed appearance of ntfs file entry

We have a file server with a directory S:\ that is shared out as \\server\share. On the server we have the directories S:\rootDir1, S:\rootDir1\subDir, S:\rootDir2, and a junction S:\rootDir2\subDir => S:\rootDir1\subDir.


On an app server, I map M:\ => \\server\share, so the app server sees M:\rootDir1\subDir and M:\rootDir2\subDir


In powershell on the appserver, I create a file in M:\rootDir1\subDir via



New-Item -ItemType File -Path `M:\rootDir1\subDir\testFile.txt`


We then immediately execute the two tests



$l_ret1 = test-path `M:\rootDir1\subDir\testFile.txt`
$l_ret2 = test-path `M:\rootDir2\subDir\testFile.txt`


The returned result $l_ret1 is consistently $true, while the result $l_ret2 is inconsistent without a significant time delay between creating the test file and testing for it. Is there any way to force Windows to "update" or "refresh" the information is has about files in M:\rootDir2\subDir? I realize this may be the fault of the file server (window file server), but then the question just changes to, is there any way to force the file server to update its information?


Aucun commentaire:

Enregistrer un commentaire