Resolving MAC OS/X SMB (Annoying) Folder Refreshes.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

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)

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.

Note: 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.

Did you also run in to this issue? do you have a better solution?, Please let me know in the comments below.

Leave a Reply

Notify of