This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

HOW-TO: prevent OS X client samba timeout

CIFS/SMB network sharing.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
danzi
Starter
Starter
Posts: 66
Joined: 11 Nov 2012 23:24
Location: Budapest
Status: Offline

HOW-TO: prevent OS X client samba timeout

Post by danzi »

I wonder if you OS X users have the same issue.

I like to have the samba server connected at all times, cos I need my data frequently. However, OS X tends to drop the connection after a certain time.

When this happens, sometimes re-mount fails unless I restart Samba via the GUI.

I mount the shares as follows:
# mount -t smbfs smb://user:pass@ipaddress/sharename /path/to/local/folder

Works well... After this sysctl command would show a couple of kernel variables for samba connections:

# sysctl -a | grep -i smb
net.smb.fs.version: 300064
net.smb.fs.loglevel: 0
net.smb.fs.kern_deadtimer: 60
net.smb.fs.kern_hard_deadtimer: 600
net.smb.fs.kern_soft_deadtimer: 30
net.smb.fs.tcpsndbuf: 4194304
net.smb.fs.tcprcvbuf: 4194304
net.smb.fs.maxwrite: 524288
net.smb.fs.maxread: 1048576
net.smb.fs.maxsegreadsize: 2097152
net.smb.fs.maxsegwritesize: 2097152

I am guessing that the kern_deadtimer, kern_soft_deadtimer and kern_hard_deadtimer are all related to my timeouts, so I zero them out one by one:

$ sudo sysctl net.smb.fs.kern_deadtimer=0
net.smb.fs.kern_deadtimer: 60 -> 0

$ sudo sysctl net.smb.fs.kern_hard_deadtimer=0
net.smb.fs.kern_hard_deadtimer: 600 -> 0

$ sudo sysctl net.smb.fs.kern_soft_deadtimer=0
net.smb.fs.kern_soft_deadtimer: 30 -> 0

This seems to work well and the samba connection stays up :-)
----------------------------------------------
Dell T130 - 32Gb ECC - ESXi 6.7
VM Full Instal - 11.2.0.4 - Omnius (revision 6005)
HP/LSI 9121-4i SAS2008 Pass Through mode
2 x 2Tb ZFS mirror
1 x 3Tb UFS
----------------------------------------------

User avatar
tony1
Moderator
Moderator
Posts: 169
Joined: 14 Jul 2016 19:04
Status: Offline

Re: HOW-TO: prevent OS X client samba timeout

Post by tony1 »

maybe an issue with osx version?
just thinking out loud.

danzi
Starter
Starter
Posts: 66
Joined: 11 Nov 2012 23:24
Location: Budapest
Status: Offline

Re: HOW-TO: prevent OS X client samba timeout

Post by danzi »

I don't know if it is version specific.

Never popped the hood for samba specifically until now. But since I don't yet have crashplan on the NAS box, I need to suck the data from it with a client... unless you have better ideas ;-)

a jail setup is due, but I am lame, it is not working yet
----------------------------------------------
Dell T130 - 32Gb ECC - ESXi 6.7
VM Full Instal - 11.2.0.4 - Omnius (revision 6005)
HP/LSI 9121-4i SAS2008 Pass Through mode
2 x 2Tb ZFS mirror
1 x 3Tb UFS
----------------------------------------------

Post Reply

Return to “CIFS/SMB (Samba)”