[Samba] File locks db (manually removing locks)

Nathan Vidican nvidican at wmptl.com
Tue Apr 12 12:11:59 GMT 2005

Okay, but then if the process signals back that is in fact not there, why
then do the locks remain? I killed all smbd processes last night, and
restarted samba alltogether before I went home. Upon running an smbstatus
when I got in this morning, there are still a bunch of locks present for
PIDs no longer running, some as old as April 1st still.

Is there any utility to manually manipulate the db file these locks are
stored in; or will simply deleting the db file after stopping all samba
processes, allow the new instance to create a fresh (empty) database? - How
do we remove the locks marked as present which really aren't?

Nathan Vidican
nvidican at wmptl.com
Windsor Match Plate & Tool Ltd.

-----Original Message-----
From: Jeremy Allison [mailto:jra at samba.org]
Sent: Monday, April 11, 2005 7:47 PM
To: Nathan Vidican
Cc: samba at lists.samba.org
Subject: Re: [Samba] File locks db (manually removing locks)

On Wed, Apr 06, 2005 at 07:53:32AM -0400, Nathan Vidican wrote:
> After killing an smbd process, or occasionally after a process has
> died itself, there remains a lock as indicated in an smbstatus output.
> The process ID tied to the file lock in the db is no longer active,
> yet the db entry still exists. Is there a way to manually manipulate
> the file locks db? If not, will any of these entries prohibit another
> smbd process from handling the file which is indicated as locked? Or
> will a new process simply validate the running/not running status of
> the process id indicated in the db before proceeding itself?

Yes, that's what the smbd's do when finding an existing lock entry. They
send a kill 0 signal to the process to validate its existence.


More information about the samba mailing list