Research on Disappearing/Reappearing Files via SMB

Questions regarding Mac OS X Specifically can be placed here, such as questions regarding TimeMachine, for example.
Forum rules
We've moved! Head over to Synology Community (community.synology.com) to meet up with our team and other Synology enthusiasts!
haroldcarrlaw
Beginner
Beginner
Posts: 20
Joined: Mon Aug 22, 2016 5:05 pm

Research on Disappearing/Reappearing Files via SMB

Unread post by haroldcarrlaw » Mon Apr 17, 2017 8:13 pm

A good few months ago I did all sorts of testing connecting to a NAS server via SMB from El Capitan and Sierra MacOSes in regards to the random disappearing/reappearing of files and folders, which caused Finder to act odd. (On its own select files and scroll down.)

First off here's reference link to the initial post on this forum.

https://forum.synology.com/enu/viewtopi ... 4&t=122309

Found all sorts of suggestions and ended up with the following to stop the random disappearing/reappearing files and folders.

By creating a nsmb.conf file, which I did via TextEdit, saved as a plain text file, minus the .txt. Then placing this file in a user's preferences folder. Which is located at ~/Library/Preferences

In the nsmb.conf file I have the following:

Code: Select all

[default]
signing_required=no
streams=yes
notify_off=yes
port445=no_netbios
unix extensions = no
veto files = /._*/.DS_Store/
Now what is interesting is the setting that fixed the specific issue I was having on the Macs in the office is the 'notifying_off=yes'. The other settings helped Finder be more responsive when navigating the shared folders.

I have 35+ Macs connecting to a shared folder that contains hundreds of subfolders and then thousands of files within all those subfolders.

Quick note, the last line of the above settings can be done via DSM > Control Panel > File Services > SMB Advanced Settings and then check the veto files check box and copy/paste "/._*/.DS_Store/"

Posting this here in hopes it may help others and also in hopes that Synology will read this and continue their R&D with MacOS connecting via SMB to their NAS servers.

citoki
I'm New!
I'm New!
Posts: 5
Joined: Fri Dec 20, 2013 6:20 pm

Re: Research on Disappearing/Reappearing Files via SMB

Unread post by citoki » Thu Jun 08, 2017 8:57 pm

Hi Haroldcarriaw,

perfect!! I had huge problems with a samba connection and couldn't even copy more than 200MB. The connection was shut down before the transfer ends.

I only used parameter "notify_off=yes" and now I can copy more than 2GB of files without any problem.

Thanks a lot!

haroldcarrlaw
Beginner
Beginner
Posts: 20
Joined: Mon Aug 22, 2016 5:05 pm

Re: Research on Disappearing/Reappearing Files via SMB

Unread post by haroldcarrlaw » Thu Jun 08, 2017 11:05 pm

Awesome!

A forewarning, a couple of weeks ago I witnessed a brand new Mac Mini running El Capitan with the SMB settings I mentioned and the files started disappearing/reappearing again! :cry:

I thought I was golden but alas no. Seems the busier the NAS server is with file-sharing the higher the chances the issue will persist.

Also worth noting, this is with the NAS running the latest DSM and with the advanced settings for SMB to use up to SMB 3.

Harolda
I'm New!
I'm New!
Posts: 2
Joined: Thu Aug 31, 2017 2:05 pm

Re: Research on Disappearing/Reappearing Files via SMB

Unread post by Harolda » Thu Aug 31, 2017 4:14 pm

Thank you thank you thank you! It has fixed the problems we've noticed. Root level folders resorting, folders appearing then disappearing and most annoyingly, enclosing folders reverting to display the root level of the share. Thank you again Haroldcarriaw for your research and sharing of the fix!

haroldcarrlaw
Beginner
Beginner
Posts: 20
Joined: Mon Aug 22, 2016 5:05 pm

Re: Research on Disappearing/Reappearing Files via SMB

Unread post by haroldcarrlaw » Thu Sep 28, 2017 10:32 pm

Okay, so I don't want to get too excited about this in fear I jinx it. Today I installed MacOS High Sierra on a Mac Mini (that contains flash storage, thus using the new APFS format). I've been testing it all day today and it looks like possibly Apple fixed some of the SMB bugs! I even removed the nsmb.conf file with all the tweaks mentioned above and continued the testing. So far no disappearing/reappearing folders/files and the speeds seem pretty decent! Oh man, I sure hope SMB can finally be usable (on a enterprise scale) on a Mac working with a Synology NAS. *Fingers crossed*

ALSO! - AFP seems to still be around. I connect the Mac Mini to a Mac OS X server (Lion version) and it connected via AFP without a single issue.

Mac Mini Specs:
Mac mini (Late 2014)
10.13 (17A365)
3 GHz Intel Core i7
16 GB 1600 MHz DDR3
Intel Iris 1536 MB

Here's stats on the SMB connection settings:

SHARE ATTRIBUTE TYPE VALUE
=============================================
Remote Files
SERVER_NAME kraig
USER_ID 502
SMB_NEGOTIATE SMBV_NEG_SMB1_ENABLED
SMB_NEGOTIATE SMBV_NEG_SMB2_ENABLED
SMB_NEGOTIATE SMBV_NEG_SMB3_ENABLED
SMB_VERSION SMB_3.02
SMB_SHARE_TYPE DISK
SIGNING_SUPPORTED TRUE
EXTENDED_SECURITY_SUPPORTED TRUE
LARGE_FILE_SUPPORTED TRUE
OS_X_SERVER TRUE
CLIENT_REQUIRES_SIGNING TRUE
DFS_SUPPORTED TRUE
MULTI_CREDIT_SUPPORTED TRUE
ENCRYPTION_SUPPORTED TRUE
SIGNING_ON TRUE

superpixel
I'm New!
I'm New!
Posts: 3
Joined: Sat Nov 19, 2016 2:51 pm

Re: Research on Disappearing/Reappearing Files via SMB

Unread post by superpixel » Mon Jul 09, 2018 3:52 pm

I suffer from the described problem since a very long time and just today found a promising Technote from Apple that seem to describe my problems perfectly:
You can disable local caching so that you always see a list of current files and folders on an SMB share. On busy or large file shares, items might disappear from Finder while the local cache rebuilds in macOS 10.11 or 10.12.
I will now disable local SMB directory enumeration caching via the nsmb.conf file as described in https://support.apple.com/en-us/HT207520 and hope it will fix the problem.

haroldcarrlaw
Beginner
Beginner
Posts: 20
Joined: Mon Aug 22, 2016 5:05 pm

Re: Research on Disappearing/Reappearing Files via SMB

Unread post by haroldcarrlaw » Mon Jul 09, 2018 4:46 pm

That is a fantastic discovery! Thank you for sharing that, sure wish Apple had made that more prominent. Or even had a script in place on the Mac to detect when connected to a SMB server and files disappear to automatically ask (or not) to disable the local SMB directory caching.

I can FINALLY allow the users I have using El Capitan and Sierra to begin using SMB along with AFP. The High Sierra users never had the problem.

superpixel
I'm New!
I'm New!
Posts: 3
Joined: Sat Nov 19, 2016 2:51 pm

Re: Research on Disappearing/Reappearing Files via SMB

Unread post by superpixel » Tue Jul 10, 2018 7:22 am

haroldcarrlaw wrote:
Mon Jul 09, 2018 4:46 pm
That is a fantastic discovery! Thank you for sharing that, sure wish Apple had made that more prominent. Or even had a script in place on the Mac to detect when connected to a SMB server and files disappear to automatically ask (or not) to disable the local SMB directory caching.

I can FINALLY allow the users I have using El Capitan and Sierra to begin using SMB along with AFP. The High Sierra users never had the problem.
I had some High Sierra users that still had problems. I'm still testing with the new fix, since the problem occurs only sporadically and it's hard to say yet if it really finally solves the problem.

Locked

Return to “Mac OS X”