Technical article 100072

UNIX file on SCO AFPS share fails to save correctly on client PC hard disk.

OpenServer 5.0.0

Written · Last revised

Problem

A UNIX file has been created on my SCO OpenServer system. This file resides in a directory on an HTFS filesystem that is part of an SCO Advanced File and Print Server share resource. This file is then copied to an AFPS client PC's local hard disk. Subsequently, the UNIX file is re-edited on the SCO OpenServer server using an editor such as vi(c). If the file is again copied to the local PC disk using the Microsoft Windows for Workgroups File Manager, it appears that the original copy is overwritten as prompted. However, on inspection, with (for example) Microsoft Notepad, the actual contents of the file have not changed.

Cause

The PC client application, such as Notepad, opens its local copy of the UNIX file or document using "opportunistic locking". The server does this on the client's behalf. With a file locked, the client can cache read and write to the file. The opportunistic lock (oplock) is broken when another application modifies the file and the initial client connection is forced to close the file. However, the Advanced File and Print Server is not aware that, in the meantime, another UNIX process has opened, written and closed the same file. The client workstation does not actually close the file after the initial read although the application itself may be then closed.

Solution

Turn off opportunistic locking on the Advanced File and Printer Server.

Log in as the root user.

Stop the Advanced File and Print Server:

#net stop server
#cd /usr/net/servers/lanman
#vi lanman.ini
...
...
under the [lmxserver] section, add;
useoplock=no

Restart the Advanced File and Print Server:

#net start server
NOTE:     Without client opportunistic locking, there will be a potential
          impact on performance. To a large degree, it is dependent upon
          the overall system setup and set of applications.

See also

SCO Advanced File and Print Server System Guide, Appendix B, page 215.

From the Xinuos technical article database, record 100072. Reproduced with permission. The original is at www.sco.com/ta/100072, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.