Write Access to CIFS share by MAC kills SMB

Status
Not open for further replies.

Erwin

Dabbler
Joined
Sep 21, 2011
Messages
30
Hi,
Since I upgraded to 9.3 I have issues when I send a larger amount of files to a CIFS share.

The error message looks like this:

Feb 8 07:29:18 Kwackl-NAS smbd[29004]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionssmb2_validate_message_id: client used more credits than granted, mid 5, charge 1, credits_granted 0, seqnum low/range: 5/0
  • It only happens when I access the CIFS share via MAC OS X clients (10.10 and 10.9) AND use the Apple GE dongle as network interface.
  • Write access works fine when I use the (slower) WLAN interfaces of the MacBooks. I also works fine when I use a Windows 7 client on GE.
The symptoms are that the NAS is not responding any longer to all clients and that the web GUI stopps working. Also SSH access and the console stops to respond. The only way out seems to be a reboot.

Looks like a Samba config issue?

thanks for any hint
erwin

Config details:
upload_2015-2-8_22-32-55.png

upload_2015-2-8_22-35-35.png


[global]
server max protocol = SMB3
encrypt passwords = yes
dns proxy = no
strict locking = no
oplocks = yes
deadtime = 15
max log size = 51200
max open files = 942176
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
getwd cache = yes
guest account = nobody
map to guest = Bad User
obey pam restrictions = yes
directory name cache size = 0
kernel change notify = no
panic action = /usr/local/libexec/samba/samba-backtrace
nsupdate command = /usr/local/bin/samba-nsupdate -g
server string = FreeNAS Server
ea support = yes
store dos attributes = yes
hostname lookups = yes
time server = yes
acl allow execute always = true
acl check permissions = true
dos filemode = yes
domain logons = no
local master = yes
idmap config *: backend = tdb
idmap config *: range = 90000001-100000000
server role = standalone
netbios name = KWACKL-NAS-CIFS
workgroup = GAGA
security = user
pid directory = /var/run/samba
smb passwd file = /var/etc/private/smbpasswd
private dir = /var/etc/private
create mask = 0666
directory mask = 0777
client ntlmv2 auth = yes
dos charset = CP437
unix charset = UTF-8
log level = 1

[Katzenklo]
path = /mnt/ZFS6x3T/Katzenklo
printable = no
veto files = /.snapshot/.windows/.mac/.zfs/
writeable = yes
browseable = yes
recycle:repository = .recycle/%U
recycle:keeptree = yes
recycle:versions = yes
recycle:touch = yes
recycle:directory_mode = 0777
recycle:subdir_mode = 0700
vfs objects = zfsacl aio_pthread streams_xattr
hide dot files = no
guest ok = no
nfs4:mode = special
nfs4:acedup = merge
nfs4:chown = true
zfsacl:acesort = dontcare
 

Erwin

Dabbler
Joined
Sep 21, 2011
Messages
30
Hi,
ok, meanwhile I did some research about the issue:
  • Coming to the question: Are you disabling WiFi when connecting via gigabit nic?
    • Yes, I disabled WLAN and plugged in the GE dongle in the Thunderbolt interface.
  • SMB Version Settings:
    • The Samba manual about smb.conf show lots of different version options. The interesting thing is, that the different tested OS in my environment uses different SMB versions:
      • Windows 7 works with SMB2_10 < this did not cause problems
      • MAC OS X 10.9 works with SMB2 < caused described issues
      • MAC OS X 10.10 works with SMB3 < caused described issues
    • When I see this list, then I would say, that a switch back from SMB3 to SMB2 on the freenas server will not solve the problem, as the MAC OS X 10.9 client does already not use SMB3. I did a try and as expected, the issue was not solved...
    • So I tried to step back to SMB1 on the MAC OS X side.
      • The simplest way to do so is to use a different protocol name in the Finder connect to server list:
        • smb://freenas-box < this the SMB2 or SMB3 protocol in 10.9 or 10.10
        • cifs://freenas-box < this forces a fallback to SMB1
        The result: now it works without switching down the freenas box. Not so fast (only 100 Mbps versus 800 Mbps with SMB3), but ist works.
  • Conclusion: I think that the issue is related to the MAC OS X stack and not to the freenas Samba stack.
    • Why? Apple was using Samba in pre-MAC OS X 10.9 releases, working with SMB1. Starting with MAC OS X 10.9 they tried to invent the CIFS stack from scratch, called SMBX.
    • It seems not to be related to freenas. I found several work arround advices in the web, like this: https://www.urz.unibas.ch/content.cfm?nav=396&content=440
    • The problem seems to be related to SMB layer flow control. The error messages states that the transmitting client consumed all credits but still transmits. I never observed the problem in the other direction, so the Samba stack on freenas behaves gentle when it comes to flow control...
    • Maybe that most of the Macbooks are connected via WLAN. In this situation, the bandwidth is small enough for the samba server on freenas to survive uploads from clients without working flow control.
    • Looks a bit poor for Apple...
best regards
 
Last edited:
Status
Not open for further replies.
Top