File-locking interactions

About this section

This section describes in general what happens when a client program using one protocol tries to read or write a file that is currently used by a client program using a different protocol in an environment consisting of CIFS, (PC)NFS, and NFS users. For details about locking in a particular protocol, consult the documentation for that protocol.

Types of clients

There are CIFS clients and two kinds of NFS clients: UNIX-based NFS clients and (PC)NFS clients. The (PC)NFS clients and CIFS clients behave in the same general way.

Types of locks

NFS locks are advisory, while CIFS locks are mandatory. CIFS applications depend on locking to behave properly. Because NFS locks are only advisory, file-manipulation operations, such as rm, rmdir, and mv, by a UNIX-based NFS client on a file opened by a (PC)NFS application can cause the application to crash.

Reads by UNIX-based NFS clients always succeed.

A deny-write operation causes a file-manipulation operation, such as rm, rmdir, and mv, on a CIFS-accessed file by a UNIX-based NFS client to fail.

Byte-range locks work on portions of a file. Byte-range operations other than reads by a UNIX-based NFS client fail if the attempted operation is forbidden by the lock. As is appropriate for NFS, a UNIX-based NFS application might be forbidden to access a byte-range that is locked by CIFS.


Note: There is one exception to the enforcement of locks set by CIFS clients on the filer. When the filer runs the dump command, it ignores the file lock set by a CIFS client that prevents read access to parts of a file or the entire file. Ignoring the "read" file lock allows the filer to back up all files.



Copyright © 1999, Network Appliance, Inc. All rights reserved.

Part No. 210-02334
File: multi1.htm
Last updated: 04/26/99 08:11:26