Installation manual

Adding a Direct Volume
Setting CIFS Options
8-6 CLI Storage-Management Guide
Disabling CIFS Oplocks (optional)
The CIFS protocol supports opportunistic locks (oplocks) for its files. A client
application has the option to take an oplock as it opens a file. While it holds the
oplock, it can write to the file (or a cached copy of the file) knowing that no other
CIFS client can write to the same file. Once another client tries to access the file for
writes, the server gives the first client the opportunity to finish writing. This feature
makes it possible for clients to cache their file-writes locally, thereby improving client
performance.
CIFS volumes provide oplock support by default. Some installations prefer not to
offer oplocks to their CIFS clients. A volume with oplocks disabled does not grant
any oplocks to any CIFS clients, so CIFS clients cannot safely use file caching as
described above. From gbl-ns-vol mode, use the
cifs oplocks-disable command to
disable oplock support in the current volume:
cifs oplocks-disable
For example, the following command sequence disables oplock support in
“access~/G:”
prtlndA1k(gbl)# namespace access
prtlndA1k(gbl-ns[access])# volume /G
prtlndA1k(gbl-ns-vol[access~/G])# cifs oplocks-disable
prtlndA1k(gbl-ns-vol[access~/G])# ...
Allowing the Volume to Automatically Disable Oplocks
You can configure the volume to automatically disable oplocks for a CIFS client that
times out in response to an “oplock break” command. The “oplock break” command
informs a client that it must finish its writes and release the oplock, so that another
client can write to the file. For each client that does not respond in 10 seconds or less,
the volume disables oplocks for 10 minutes, then re-enables oplocks for that client
and tries again. The volume manages oplocks on a client-by-client basis.
To permit the volume to disable oplocks for misbehaving clients, use the optional
auto
flag in the
cifs oplocks-disable command:
cifs oplocks-disable auto
For example, the following command sequence changes the “medarcv~/test_results”
volume to automatically disable oplocks: