Problems with SMB and macOS Sierra?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problems with SMB and macOS Sierra?

James Andrewartha
Hi,

We're testing macOS Sierra at the moment, and are seeing some weird
problems connecting to SMB shares on our 8.2.4 7-mode filer. Listing
directories is super-slow, and then after a while all the files get the
no permissions icon and you can't open anything. Has anyone seen
anything similar?

Thanks,

--
James Andrewartha
Network & Projects Engineer
Christ Church Grammar School
Claremont, Western Australia
Ph. (08) 9442 1757
Mob. 0424 160 877
_______________________________________________
Toasters mailing list
[hidden email]
http://www.teaparty.net/mailman/listinfo/toasters
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems with SMB and macOS Sierra?

jordan slingerland-2
I do not have the solution, but I did run into a problem several years ago when we migrated a windows file share to the a netapp running 8.1 or 8.2.  I do not remember the fix but we certainly saw the slow directory listing, I do not recall if I was seeing the permission denied.  Sorry I am not more  help but our desktop guys resolved it on the client, it may have been something with local cache settings or something.  Sorry again for the lack of information, but I though knowing there is likely a client side resolution may be of some help.

--Jordan



On Mon, Nov 7, 2016 at 8:47 PM, James Andrewartha <[hidden email]> wrote:
Hi,

We're testing macOS Sierra at the moment, and are seeing some weird
problems connecting to SMB shares on our 8.2.4 7-mode filer. Listing
directories is super-slow, and then after a while all the files get the
no permissions icon and you can't open anything. Has anyone seen
anything similar?

Thanks,

--
James Andrewartha
Network & Projects Engineer
Christ Church Grammar School
Claremont, Western Australia
Ph. (08) 9442 1757
Mob. 0424 160 877
_______________________________________________
Toasters mailing list
[hidden email]
http://www.teaparty.net/mailman/listinfo/toasters


_______________________________________________
Toasters mailing list
[hidden email]
http://www.teaparty.net/mailman/listinfo/toasters
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems with SMB and macOS Sierra?

Christopher S Eno
In reply to this post by James Andrewartha
Any performance difference between mapping shares this way:

cifs://server/share (forces smb 1)

Vs.

smb://server/share (smb 2+)

?

Sent from my iPhone

> On Nov 7, 2016, at 8:47 PM, James Andrewartha <[hidden email]> wrote:
>
> Hi,
>
> We're testing macOS Sierra at the moment, and are seeing some weird
> problems connecting to SMB shares on our 8.2.4 7-mode filer. Listing
> directories is super-slow, and then after a while all the files get the
> no permissions icon and you can't open anything. Has anyone seen
> anything similar?
>
> Thanks,
>
> --
> James Andrewartha
> Network & Projects Engineer
> Christ Church Grammar School
> Claremont, Western Australia
> Ph. (08) 9442 1757
> Mob. 0424 160 877
> _______________________________________________
> Toasters mailing list
> [hidden email]
> http://www.teaparty.net/mailman/listinfo/toasters

_______________________________________________
Toasters mailing list
[hidden email]
http://www.teaparty.net/mailman/listinfo/toasters
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems with SMB and macOS Sierra?

James Andrewartha
On 08/11/16 10:16, Christopher S Eno wrote:
> Any performance difference between mapping shares this way:
>
> cifs://server/share (forces smb 1)
>
> Vs.
>
> smb://server/share (smb 2+)

We did just test that, and cifs:// works fine, no permissions problems.
What debug options can I turn on to see what's happening?

--
James Andrewartha
Network & Projects Engineer
Christ Church Grammar School
Claremont, Western Australia
Ph. (08) 9442 1757
Mob. 0424 160 877
_______________________________________________
Toasters mailing list
[hidden email]
http://www.teaparty.net/mailman/listinfo/toasters
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems with SMB and macOS Sierra?

Christopher S Eno
From NetApp (RE: 8.3 but might still apply).  Other things I've done, disable SMB 3 on the NetApp and/or hide the snapshot directory on the share being accessed by the Mac(s).

I think you'll find the overall fix for many many versions of OSX (macOS) vs. many versions of OnTap are like below, force the mac to make smb 1 connections.  

CAUSE

Packet trace displays that there is no issue with the controller response times, and the issue is with the client side settings.

The SMB LargeMTU feature allows an SMB client to issue a single request of up to 1MB. Without support for this feature, SMB clients (both Apple and Mac) are limited to 64KB max request size. Windows clients get around the lack of support for this feature by using another Windows feature called pipelining. Pipelining allows an SMB client to issue multiple outstanding requests without waiting for a response.
Apple supports this feature as well; however, they limit their client to just a few outstanding pipelined requests (less than 4 total outstanding requests versus Windows which regularly goes well above that). So despite a lack of support for LargeMTU, Windows clients have a better performance experience on SMB2.x than Apple because they better utilize pipelining, in place of the absence of LargeMTU with clustered Data ONTAP.

Apple Spotlight file indexer is a common cause for slowness in accessing CIFS shares. 



SOLUTION

Perform the following steps to resolve the issue:

  1. Add nsmb.conf to ~/Library/Preferences/ with the following details:
    [default] 
    smb_neg=smb1_only
  2. Set Other-Networks and Static IP address in Network Preference.
  3. Connect to smb://pathname

Additional settings for improving Mac SMB peformance:

  1. Exclude network shares from Spotlight searching:
    Open System PreferencesSpotlight, and add all the network shares to the exclusion list.
  2. Disable updating .DS_Store files within network share folders:
    Run from a terminatel windows:
    Defaults write com.apple.desktopServices DSDDontWriteNetworkStores true
    Two additional settings, Disable ARP requests validation and Revert TCP ACK to compatabilility mode, are also available. 

On Nov 7, 2016, at 9:21 PM, James Andrewartha <[hidden email]> wrote:

On 08/11/16 10:16, Christopher S Eno wrote:
Any performance difference between mapping shares this way:

cifs://server/share (forces smb 1)

Vs.

smb://server/share (smb 2+)

We did just test that, and cifs:// works fine, no permissions problems.
What debug options can I turn on to see what's happening?

--
James Andrewartha
Network & Projects Engineer
Christ Church Grammar School
Claremont, Western Australia
Ph. (08) 9442 1757
Mob. 0424 160 877

_______________________________________________
Toasters mailing list
[hidden email]
http://www.teaparty.net/mailman/listinfo/toasters
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems with SMB and macOS Sierra?

Christopher S Eno
Also, this page might help (kind of old)



On Nov 7, 2016, at 10:00 PM, S Eno <[hidden email]> wrote:

From NetApp (RE: 8.3 but might still apply).  Other things I've done, disable SMB 3 on the NetApp and/or hide the snapshot directory on the share being accessed by the Mac(s).

I think you'll find the overall fix for many many versions of OSX (macOS) vs. many versions of OnTap are like below, force the mac to make smb 1 connections.  

CAUSE

Packet trace displays that there is no issue with the controller response times, and the issue is with the client side settings.

The SMB LargeMTU feature allows an SMB client to issue a single request of up to 1MB. Without support for this feature, SMB clients (both Apple and Mac) are limited to 64KB max request size. Windows clients get around the lack of support for this feature by using another Windows feature called pipelining. Pipelining allows an SMB client to issue multiple outstanding requests without waiting for a response.
Apple supports this feature as well; however, they limit their client to just a few outstanding pipelined requests (less than 4 total outstanding requests versus Windows which regularly goes well above that). So despite a lack of support for LargeMTU, Windows clients have a better performance experience on SMB2.x than Apple because they better utilize pipelining, in place of the absence of LargeMTU with clustered Data ONTAP.

Apple Spotlight file indexer is a common cause for slowness in accessing CIFS shares. 



SOLUTION

Perform the following steps to resolve the issue:

  1. Add nsmb.conf to ~/Library/Preferences/ with the following details:
    [default] 
    smb_neg=smb1_only
  2. Set Other-Networks and Static IP address in Network Preference.
  3. Connect to smb://pathname

Additional settings for improving Mac SMB peformance:

  1. Exclude network shares from Spotlight searching:
    Open System PreferencesSpotlight, and add all the network shares to the exclusion list.
  2. Disable updating .DS_Store files within network share folders:
    Run from a terminatel windows:
    Defaults write com.apple.desktopServices DSDDontWriteNetworkStores true
    Two additional settings, Disable ARP requests validation and Revert TCP ACK to compatabilility mode, are also available. 

On Nov 7, 2016, at 9:21 PM, James Andrewartha <[hidden email]> wrote:

On 08/11/16 10:16, Christopher S Eno wrote:
Any performance difference between mapping shares this way:

cifs://server/share (forces smb 1)

Vs.

smb://server/share (smb 2+)

We did just test that, and cifs:// works fine, no permissions problems.
What debug options can I turn on to see what's happening?

--
James Andrewartha
Network & Projects Engineer
Christ Church Grammar School
Claremont, Western Australia
Ph. (08) 9442 1757
Mob. 0424 160 877

_______________________________________________
Toasters mailing list
[hidden email]
http://www.teaparty.net/mailman/listinfo/toasters
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems with SMB and macOS Sierra?

James Andrewartha
In reply to this post by Christopher S Eno
On 08/11/16 11:00, S Eno wrote:

Perform the following steps to resolve the issue:

  1. Add nsmb.conf to ~/Library/Preferences/ with the following details:
    [default] 
    smb_neg=smb1_only
  2. Set Other-Networks and Static IP address in Network Preference.
  3. Connect to smb://pathname
This file has changed in Sierra, smb_neg is no longer an option. Instead there is protocol_vers_map, but you can only disable SMB v1, or SMB v1 and v2, not enforce v1 only.

I thought maybe it was Kerberos (not that you can disable that directly either), but logging in as a different user (via smb://user:*@filer/share) has the same problem.

I fired up Wireshark on the client and you can see it pausing when checking file access permissions, 2 seconds between each directory when it gets a STATUS_ACCESS_DENIED response. For admin users who can read all directories, it's quick, but for regular users who don't have access to most you see the delay.

Setting kloglevel=2 in nsmb.conf shows the permission denied responses, but there's nothing else indicative of the problem.

-- 
James Andrewartha
Network & Projects Engineer
Christ Church Grammar School
Claremont, Western Australia
Ph. (08) 9442 1757
Mob. 0424 160 877

_______________________________________________
Toasters mailing list
[hidden email]
http://www.teaparty.net/mailman/listinfo/toasters
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems with SMB and macOS Sierra?

James Andrewartha
On 09/11/16 11:10, James Andrewartha wrote:

> On 08/11/16 11:00, S Eno wrote:
>>
>> Perform the following steps to resolve the issue:
>>
>>  1. Add |nsmb.conf |to |~/Library/Preferences/| with the following
>>     details:
>>     |[default]
>>     smb_neg=smb1_only|
>>  2. Set *Other-Networks* and *Static IP address* in *Network Preference*.
>>  3. Connect to |smb://pathname|
>>
> This file has changed in Sierra, smb_neg is no longer an option. Instead
> there is protocol_vers_map, but you can only disable SMB v1, or SMB v1
> and v2, not enforce v1 only.

Turns out protocol_vers_map=1 does work, but requires a restart to take
effect.

--
James Andrewartha
Network & Projects Engineer
Christ Church Grammar School
Claremont, Western Australia
Ph. (08) 9442 1757
Mob. 0424 160 877
_______________________________________________
Toasters mailing list
[hidden email]
http://www.teaparty.net/mailman/listinfo/toasters
Loading...