[Samba] timeout after inactivity on mount.cifs

Gaelan Lloyd glp.samba at eml.cc
Wed May 3 15:50:03 UTC 2017


Hi Ivan,

Not sure if you have found a solution or not since your post was back in
February, but I thought I'd reply as this is the only thread I could
find anywhere that mentions a problem that I was having on a recent
installation of Arch Linux.

A few minutes after boot all of my CIFS/Samba mounts would go offline
and I'd get an error "The host is down." But I could unmount and remount
them just fine. They'd stay online as long as I was using them, then go
offline again after a few minutes of idle.

Turns out I wasn't specifying a version in my CIFS fstab mount, and the
system was defaulting to a version 1.0 protocol.  That protocol is super
old and apparently doesn't talk well to my FreeNAS Samba 3 share, so the
connection was dying after a few minutes of idle. Changing the fstab to
version 3.0 fixed the problem immediately:

//server/share  /mount/point   cifs  
defaults,uid=username,credentials=/etc/smbpaswd,vers=3.0   0   0

It would be nice if CIFS tried to mount starting with the newest
protocol (3), and if that failed it downgraded to 2, then to 1 if
necessary, rather than defaulting to version 1.

I hope that if you're still having this issue this is helpful info!

Gaelan Lloyd
http://www.gaelanlloyd.com



More information about the samba mailing list