W_Prindl Absent Member.
Absent Member.
1956 views

Severe file locking issues

I have the follolwing issues on an OES2 Sp1 server with DSfW.
File access is from Windows PCs either via Novell Client (4.91Sp5) or
via Samba. OPlock support level is 2 and cross protocol locks are
enabled.
We have an accounting application which creates zero byte files if
certain files are opened and removes these files if the those files are
closed to prevent that two instances of the application open the same
file at the same time.

This does work and worked without any problem for several years on NW
6.5 using NCP and CIFS - and worked before on earlier versions of
Netware only using NCP.

Now we often encounter the problem - only on NCP connections - that
those files are created and subsequently cannot be deleted from any NCP
connection either because the file is in use by another application or
because the file does not exist (that is what Novell Client tells).

Looking at those files via NRM show no locks at all. Via Samba or via
Linux they are easily deleted whithout any error messages.

Going completely to Samba is not really an option as this is much
slower than NCP.

--
W. Prindl

W. Prindl
Labels (1)
0 Likes
4 Replies
Marcel_Cox Absent Member.
Absent Member.

Re: Severe file locking issues

Does it make a difference if yyou change the oplock level to 0 (or 1)?
0 Likes
W_Prindl Absent Member.
Absent Member.

Re: Severe file locking issues

That I did not test yet. Now I changed FILE_COMMIT to 1 and look if
that changes something. Today there were no issues and nobody
complained. But that is not really an assurance, that this was the
issue.
--
W. Prindl


Marcel Cox wrote:

>
>Does it make a difference if yyou change the oplock level to 0 (or 1)?


W. Prindl
0 Likes
W_Prindl Absent Member.
Absent Member.

Re: Severe file locking issues

That did not help.

But now I am able to reproduce this issue on demand. It is definitely a
cross protocol lock issue, which seems to happen in this way:

If a NCP client creates such a file and holds it open and afterwards
other NCP clients access the same file and open and close them (for
read only) there are no issues. As soon as a Samba client accesses the
same file problems start. If all NCP clients close the file before any
Samba client closes it, the Samba client is able to close the file and
delete it. But if the Samba client closes the file and does not delete
it (because it is open via a NCP connection) there remains an
(invisible in RM) lock on the file so that later NCP clients are unable
to open the file for writing or to delete the file. Samba clients have
no lock and can write to the file or delete it.

So I have the impression, that Samba does not remove it's cross
protocol lock upon closing the file.

What I would now like to know, is, where are all those lock
informations stored and how could one retrieve them for inspection -
because RM does not help here in any way.

--
W. Prindl


W_ Prindl wrote:

>That I did not test yet. Now I changed FILE_COMMIT to 1 and look if
>that changes something. Today there were no issues and nobody
>complained. But that is not really an assurance, that this was the
>issue.


W. Prindl
0 Likes
Marcel_Cox Absent Member.
Absent Member.

Re: Severe file locking issues

It's probably best to open an SR with Novell on this issue.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.