Re: [Samba] File locks db (manually removing locks)
On Tue, Apr 12, 2005 at 08:11:59AM -0400, Nathan Vidican wrote: > Okay, but then if the process signals back that is in fact not there, why > then do the locks remain? No, the smbd process that detected the problem should then remove that entry. > 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. These must be for files that have not been used since the owning process abended. You might be able to fix this be using smbclient to open the files listed. That should cause the cleanup. Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
RE: [Samba] File locks db (manually removing locks)
Because we have been having problems with file locking issues, and need the output of smbstatus to debug and figure out who's got what locked and why they can't save. Aside from being un-tidy, these entries are becoming stale-dated and invalid anyhow; they stay there and make the output of smbstatus full of 'untidy' data which gets in the way of us solving the real problem - why a user can't save or is seeing an un-opened file as locked when it's not. -- Nathan Vidican [EMAIL PROTECTED] Windsor Match Plate & Tool Ltd. http://www.wmptl.com/ -Original Message- From: David McCann [mailto:[EMAIL PROTECTED] On Behalf Of Mac Sent: Tuesday, April 12, 2005 9:53 AM To: Nathan Vidican Cc: [EMAIL PROTECTED] Subject: Re: [Samba] File locks db (manually removing locks) >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? Why would you want to? What problems do they cause (other than making 'smbstatus' output look untidy? Mac Assistant Systems Adminstrator @nibsc.ac.uk [EMAIL PROTECTED] Work: +44 1707 641565 Everything else: +44 7956 237670 (anytime) -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
Re: [Samba] File locks db (manually removing locks)
>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? Why would you want to? What problems do they cause (other than making 'smbstatus' output look untidy? Mac Assistant Systems Adminstrator @nibsc.ac.uk [EMAIL PROTECTED] Work: +44 1707 641565 Everything else: +44 7956 237670 (anytime) -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
RE: [Samba] File locks db (manually removing locks)
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 [EMAIL PROTECTED] Windsor Match Plate & Tool Ltd. http://www.wmptl.com/ -Original Message- From: Jeremy Allison [mailto:[EMAIL PROTECTED] Sent: Monday, April 11, 2005 7:47 PM To: Nathan Vidican Cc: samba@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. Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
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. Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba