(1 votes, average: 1.00 out of 5)
Loading...
Resolving MAC OS/X folder frequent refreshes on an SMB file share
Recently working with a group of MAC users, I came across a very annoying issue. The user complains. How can I get rid of this annoying Folder Refreshes about every 30-60 seconds? The user explains. I am mounting a file share on my MAC, the file share has many files / folders(100k+), last, the file share is mounted using the SMB protocol. The Issue: In Finder, going to my folder destination, about every 30-60 seconds, the Finder folder structure refreshes, I then find my self back in the top root destination folder (extremely annoying). The user also claims, we did not have this issue in older versions of the OS (he doesn’t know the exact version the issue started) Solution: After researching the issue, the fowling solution fixed our issue. Create a file /etc/nsmb.conf – global option(if not exists) or it can be applied on a per user login, create a file/folder ~/Library/Preferences/nsmb.conf. Then, add these entry’s./etc/nsmb.conf [default] smb_neg=smb3_only notify_off=yesNote: The solution (and issue) was tested on MAC OS X El Capitan (version 10.11.5+). Solution explained: In some of the earlier versions, the protocol used for CIFS/SMB was 1.x, causing MAC/OS to behave different on refreshes (in fact you can still used that as a workaround by doing somthing like thiscifs://server@share/dir1). To note, since there is no refresh button in Finder, the MAC OS has to be smart enough to auto refresh whenever there is a file/directory change, in fact, there where many user’s complaining in older versions of MAC OS/X files/folder not getting refreshed (+workarounds for that). In latter releases (like ours) 10.11.5+ using SMB version 3.0, plus having notify_off=no(default), can cause constant folder structure refreshes, as a test changing to smb_neg=smb1_only will address the issue. we are forcing v3 as its many times faster then older releases.
Options available for nsmb.conf
Options available for /etc/nsmb.conf taken from the man page. Note: Apply changes with caution as it might have an adverse effect.The SMB library uses the following information for section names: A) [default] B) [SERVER] C) [SERVER:SHARE] Possible keywords may include: Keyword Section Default Comment A B C Values addr - + - DNS name or IP address of server nbtimeout + + - 1s Timeout for resolving a NetBIOS name minauth + + - NTLMv2 Minimum authentication level allowed port445 + + - normal How to use SMB TCP/UDP ports streams + + + yes Use NTFS Streams if server supported soft + + + Make the mount soft notify_off + + + no Turn off using notifications kloglevel + - - 0 Turn on smb kernel logging smb_neg + - - normal How to negotiate SMB 1/2/3 signing_required + - - yes Turn off smb client signing signing_req_vers + - - 6 Bitmap of SMB Versions that have signing required validate_neg_off + - - no Turn off using validate negotiate max_resp_timeout + + - 30s Max time to wait for any response from server read_async_cnt + + - 4 Max async number of reads write_async_cnt + + - 4 Max async number of writes dir_cache_async_cnt + + - 10 Max async queries to fill dir cache dir_cache_max_cnt + + - 2048 Max entries to cache for a dir dir_cache_max + + - 60s Max time to cache for a dir dir_cache_min + + - 30s Min time to cache for a dirDid you also run in to this issue? do you have a better solution?, Please let me know in the comments below.
0
0
votes
Article Rating