[Samba] File locking problem involving Samba, Clearcase, and Cygwin
Kathy
banshee135 at gmail.com
Fri Feb 6 18:23:57 GMT 2009
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 7.0.1.3 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:
# first statement is old and may not be obsolete but we still keep it
just in case
oplocks = no
kernel oplocks = no
level2 oplocks = no
However, as shown below, we're seeing oplocks reported and I have no
idea whether this is normal or not. I asked a Clearcase support guy
and he did not know (sigh). So hence I'm hoping someone here has some
experience with this. Again, we ran this same sort of set up before
with a Solaris Clearcase/Samba server and we didn't see these
problems. This may not be related to Clearcase at all and simply and
issue of how file locking is working between RHEL 5.2 and Samba. What
exactly is a LEVEL_II oplock and why am I seeing these if I have Samba
oplocks turned off?
Other than this, Clearcase is operating normally and Samba is
operating normally on Flint for all other applications. It's just
this situation where we're running these sequential scripts sitting in
side the Clearcase view via Samba.
Thanks for any insight --
Kathy
Locked files:
Pid Uid DenyMode Access R/W Oplock Share
Path Name Time
--------------------------------------------------------------------------------
------------------
12825 20191 DENY_NONE 0x20196 WRONLY NONE /view
turboS_verification_1/vobs/c2test/C2Testsuite/magellan.log Thu Jan 15 04:40
:30 2009
12825 20191 DENY_NONE 0x20196 WRONLY EXCLUSIVE+BATCH /view
turboS_verification_2/vobs/c2test/C2Testsuite/cozushell.cvf Thu Jan 15 05:1
5:59 2009
12825 20191 DENY_NONE 0x20089 RDONLY NONE
/view turboS_verification_4/vobs/c2test/C2Testsuite/magellan.she
ll/S6_PU Wed Jan 14 18:00:20 2009
12825 20191 DENY_NONE 0x20089 RDONLY NONE
/view turboS_verification_1/vobs/c2test/C2Testsuite/magellan.she
ll/TURBOS_TESTSUITE Wed Jan 14 17:54:21 2009
12825 20191 DENY_NONE 0x20089 RDONLY LEVEL_II
/view turboS_verification_1/vobs/c2test/C2Testsuite/magellan.she
ll/TURBOS_TESTSUITE Wed Jan 14 17:56:41 2009
12825 20191 DENY_NONE 0x20089 RDONLY LEVEL_II
/view turboS_verification_1/vobs/c2test/C2Testsuite/magellan.she
ll/TURBOS_TESTSUITE Wed Jan 14 17:57:23 2009
12825 20191 DENY_NONE 0x20196 WRONLY NONE
/view turboS_verification_4/vobs/c2test/C2Testsuite/cozushell.cv
f Thu Jan 15 04:29:34 2009
12825 20191 DENY_NONE 0x20196 WRONLY NONE
/view turboS_verification_4/vobs/c2test/C2Testsuite/magellan.sum
Thu Jan 15 04:29:34 2009
12825 20191 DENY_NONE 0x20196 WRONLY NONE
/view turboS_verification_1/vobs/c2test/C2Testsuite/magellan.sum
Thu Jan 15 04:40:30 2009
12825 20191 DENY_NONE 0x20196 WRONLY NONE
/view turboS_verification_2/vobs/c2test/C2Testsuite/magellan.log
Thu Jan 15 05:15:59 2009
12825 20191 DENY_NONE 0x20196 WRONLY NONE
/view turboS_verification_4/vobs/c2test/C2Testsuite/magellan.log
Thu Jan 15 04:29:34 2009
12825 20191 DENY_NONE 0x20196 WRONLY NONE
/view turboS_verification_2/vobs/c2test/C2Testsuite/magellan.sum
Thu Jan 15 05:15:59 2009
12825 20191 DENY_NONE 0x20196 WRONLY
EXCLUSIVE+BATCH /view
turboS_verification_3/vobs/c2test/C2Testsuite/cozushell.cv
f Thu Jan 15 06:30:22 2009
12825 20191 DENY_NONE 0x20196 WRONLY LEVEL_II
/view turboS_verification_3/vobs/c2test/C2Testsuite/magellan.sum
Thu Jan 15 06:30:22 2009
12825 20191 DENY_NONE 0x20196 WRONLY LEVEL_II
/view turboS_verification_3/vobs/c2test/C2Testsuite/magellan.sum
Thu Jan 15 04:40:31 2009
12825 20191 DENY_NONE 0x20196 WRONLY NONE
/view turboS_verification_3/vobs/c2test/C2Testsuite/magellan.log
Thu Jan 15 06:30:22 2009
More information about the samba
mailing list