I'm seeing a strange issue with regard to file listing in CIFS. It seems that if I make changes to a share outside of CIFS, it takes some amount of time for the change to actually show up via CIFS.
Here's the scenario:
Share name is called test and points to TopDirectory
TopDirectory
-- ChildDirectory
-- File1.txt
I browse the test share share using Windows 7. I correctly see ChildDirectory and File1.txt both inside TopDirectory (the root level). Next, I SSH into FreeNAS and move File1.txt into ChildDirectory. Here's the problem. Now, using the CIFS client, when I press F5 to refresh TopDirectory, I still see File1.txt. Sometimes I can change to ChildDirectory and I'll see File1.txt there correctly, then I go back to TopDirectory and I still see File1.txt (it appears to be in two locations). If I simply click on the file in the old location, then refresh, it will disappear. If I don't click it, it usually takes a couple minutes before hitting F5 will actually get it to show the proper listing. During tests I've had files simply not show up in the 'new' location as well.
If I connect with a new client, I see the file in the correct location (not in two places). If I do this same file move using a CIFS client A, on CIFS client B, everything shows correctly.
I've tried using smbclient instead of Windows 7, it doesn't appear to have this behavior. Unfortunately, packet traces of this show that smbclient is using smbv1 while Windows 7 is using smbv2 (I have the maximum level set to smbv3 on the server side, there is no minimum). In a test where I had moved files, refreshed the target directory, and they still didn't show up, a packet trace showed that the server simply wasn't returning them in the list. This leads me to believe the client isn't simply caching the listing. It seems like the server has some type of cache for each client?
This is all using FreeNAS 9.2.1.5. The behavior is the same for both ZFS and UFS volumes. This feels like some sort of bug, but I figure I'd post here first to see if there is some behavior in Samba that I'm unaware of. I did this exact same test using an Ubuntu box and did not have this problem (though, different OS and different Samba version). Many posts I've run across deal with either things not auto refreshing (where F5 does work--even that isn't working here). Another similar report didn't have a good answer (refresh=1 is not a valid setting anymore): http://forums.freenas.org/index.php...fresh-on-file-creation-delete-for-cifs.15851/
Thoughts?
Here's the scenario:
Share name is called test and points to TopDirectory
TopDirectory
-- ChildDirectory
-- File1.txt
I browse the test share share using Windows 7. I correctly see ChildDirectory and File1.txt both inside TopDirectory (the root level). Next, I SSH into FreeNAS and move File1.txt into ChildDirectory. Here's the problem. Now, using the CIFS client, when I press F5 to refresh TopDirectory, I still see File1.txt. Sometimes I can change to ChildDirectory and I'll see File1.txt there correctly, then I go back to TopDirectory and I still see File1.txt (it appears to be in two locations). If I simply click on the file in the old location, then refresh, it will disappear. If I don't click it, it usually takes a couple minutes before hitting F5 will actually get it to show the proper listing. During tests I've had files simply not show up in the 'new' location as well.
If I connect with a new client, I see the file in the correct location (not in two places). If I do this same file move using a CIFS client A, on CIFS client B, everything shows correctly.
I've tried using smbclient instead of Windows 7, it doesn't appear to have this behavior. Unfortunately, packet traces of this show that smbclient is using smbv1 while Windows 7 is using smbv2 (I have the maximum level set to smbv3 on the server side, there is no minimum). In a test where I had moved files, refreshed the target directory, and they still didn't show up, a packet trace showed that the server simply wasn't returning them in the list. This leads me to believe the client isn't simply caching the listing. It seems like the server has some type of cache for each client?
This is all using FreeNAS 9.2.1.5. The behavior is the same for both ZFS and UFS volumes. This feels like some sort of bug, but I figure I'd post here first to see if there is some behavior in Samba that I'm unaware of. I did this exact same test using an Ubuntu box and did not have this problem (though, different OS and different Samba version). Many posts I've run across deal with either things not auto refreshing (where F5 does work--even that isn't working here). Another similar report didn't have a good answer (refresh=1 is not a valid setting anymore): http://forums.freenas.org/index.php...fresh-on-file-creation-delete-for-cifs.15851/
Thoughts?