How do you clear a lock file? (PR#3018)

Andrew Tridgell samba-bugs at samba.anu.edu.au
Mon Jan 12 12:39:20 GMT 1998


> I have several DOS apps on a Samba server (Solaris 2.5.1, 1.9.18) that I 
> execute from a
> DOS machine using the MS client.  Sometimes the DOS machine crashes while the
> executable is in memory and has an active lock.  When the DOS machine reboots
> and the .exe file is run again, the machine hangs because it can't execute
the
> file.  The only way to execute the file again is to restart both the Samba
> server and the DOS machine.   

Can you tell me what the output of "smbstatus" is when this happens? Does
the lock show up? If it does, then is the process shown in the output still
alive? 

My best guess as to what is happening is that the smbd process that was
serving the dead client doesn't know that the client is dead. To fix this
you should add "keepalive = 30" in smb.conf. That will tell smbd to 
send a NBT keepalive packet every 30 seconds. When the client is dead
the TCP layer will soon notice that the keepalive didn't get through
(or got rejected if the PC has now rebooted) and will exit.

Cheers, Andrew



More information about the samba mailing list