[Samba] Auto-Removal of Straggling File locks due to Ungraceful Client Disconnects

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Jan 6 09:55:10 MST 2011

On Thu, Dec 30, 2010 at 03:36:04AM +0000, Vincent Callanan wrote:
> This question has come up many times before in a number of guises.
> But I do not believe that it has ever been answered satisfactorily.

That's because it can't be anwered really satisfactorily
given that the CIFS protocol does not allow the server to
ping the client if it's still around. All you can do is to
apply heuristics.

> This may well reflect fundamental difficulties in the CIFS protocol
> However, recent incarnations of Windows Server seem to handle the problem
> better
> possibly due to tweaks in the underlying TCP/IP stack vis-a-vis Linux.

If you're on moderately recent Linux, you might want to play
with something like


This should kick dead clients after something like 6
minutes. A description of these parameters can be found in
"man tcp".

With best regards,

Volker Lendecke

SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen

More information about the samba mailing list