[Samba] File locking problem involving Samba, Clearcase, and Cygwin

Jeremy Allison jra at samba.org
Sat Feb 7 01:26:17 GMT 2009

On Fri, Feb 06, 2009 at 10:23:57AM -0800, Kathy wrote:
> We are having some problems in our company's test group that did not
> exist when our Clearcase 2003.06 server existed on a Solaris 8
> machine.  Now we are running on RHEL 5.2 with Clearcase with
> Samba 3.0.28 (despite the fact that IBM has only blessed up to 3.0.24)
> and running into some file locking issues with some scripts our test
> group runs.  I am hoping that someone might have some ideas.
> The environment is this:  Our test group has a PC that runs VMWare
> virtual machines (Windows XP).  They log into one of the virtual Win
> XP machines and pop several Cygwin windows running bash.  They have
> several Clearcase views that they might use at the same time but each
> view used is in a different Cygwin window.  The views are located on a
> RHEL 5.2 Clearcase server named Flint running Samba 3.0.28.  So, in
> each Cygwin window, they will "cd
> //flint/views/<view_name>/vobs/c2test/C2Testsuite"  and in there they
> run some scripts that write to logs called magellan.log and
> magellan.sum.  They are essentially using the views as a file server
> for their test scripts.
> They often run these scripts from different views at the same time,
> and each script that runs runs multiple sequential tests.  Inside the
> master script (simple bourne shell), after a test is complete, it
> closes out the magellan.log (and .sum) files and does a "mv" to rename
> the file so the next iteration can use the same name for the log file.
>  (Yeah, it would be easier to just make them unique names for each
> run, but this is old legacy stuff that would be a pain in the kazoo to
> change, so for the moment we're trying to just fix it before
> redesigning it all).
> What's happening is at random times, the mv command fails and they get
> permission denied because another process is holding on to the script
> and sometimes in the Samba log I will see NT_STATUS_SHARING_VIOLATION,
> which can make sense if another process has a lock on the file.  In
> our smb.conf file, I have oplocks turned off because IBM requires this
> for Clearcase:

This is not oplock or lock releated, this is open share mode
related. The three are completely different.

I'd suggest trying 3.2.8 (3.3.0 is slightly better but
there's an ACL issue we need to do a 3.3.1 release for
on Feb 24th. If you don't care about ACLs then 3.3.0
might suit). 3.0.x is not under active development,
only maintanence.


More information about the samba mailing list