Enabling or disabling oplocks when creating SMB shares
Oplocks allow clients to lock files and cache content locally, which can increase performance for file operations. Oplocks are enabled on SMB shares residing on storage virtual machines (SVMs). In some circumstances, you might want to disable oplocks. You can enable or disable oplocks on a share-by-share basis.
About this task
If oplocks are enabled on the volume containing a share but the oplock share property for that share is disabled, oplocks are disabled for that share. Disabling oplocks on a share takes precedence over the volume oplock setting. Disabling oplocks on the share disables both opportunistic and lease oplocks.
You can specify other share properties in addition to specifying the oplock share property by using a comma-delimited list. You can also specify other share parameters.
If you want to... | Then... |
---|---|
Enable oplocks on a share during share creation | Enter the following command: vserver cifs share create -vserver vserver_name -share-name share_name -path path_to_share -share-properties [oplocks,...] Note If you want the share to have only the default share properties, which are |
Disable oplocks on a share during share creation | Enter the following command: vserver cifs share create -vserver vserver_name -share-name share_name -path path_to_share -share-properties [other_share_property,...] Note When disabling oplocks, you must specify a list of share properties when creating the share, but you should not specify the |