dead records in locking.tdb (was: Locking database cleanup?)

Jeremy Allison jra at samba.org
Wed May 31 17:58:05 GMT 2006


On Wed, May 31, 2006 at 11:20:25AM -0300, Daniel Coletti wrote:
> Daniel Coletti wrote:
> > Hi,
> [..]
> > Now, I'm running samba 3.0.14a-3sarge, and using samba as a file server
> > for different version of Ms Windows executing a FOXPRO legacy
> > application (the smb.conf is down below).
> > If I execute a FOX rlock() to get a lock of a specific record in a DBF
> > file, I can see that the locking record gets added correctly in the
> > locking.tdb file. While having this record locked I hard reseted the
> > Windows PC.
> > What I see next is that the smbd instance lives for a few seconds and as
> > the Windows PC comes back on, this particular smbd instance dies but the
> > record in the locking.tdb file still exists ... avoiding the same or any
> > new Windows PC to get a lock of this DBF.
> 
> Hi, I developed a small perl script using Angus Lees' TDB_File CPAN
> which goes throught the locking.tdb file and searches for a string in
> the 'data' part of the records. (I couldn't remove the records using
> tdbtool)
> I know its ugly and has a lot for potential problems, but it works.
> Is anybody interested in this script? Should I send it to this list just
> in case somebody needs it in the future?

It's a good idea to do that for Samba versions pre-3.0.23. Hopefully
when 3.0.23 is released we'll be self-cleaning in that respect.

Jeremy.


More information about the samba-technical mailing list