Enabling or disabling oplocks on existing CIFS shares
Oplocks are enabled on CIFS shares on Vservers with FlexVol volumes by default. Under some circumstances, you might want to disable oplocks; alternatively, if you have previously disabled oplocks on a share, you might want to reenable oplocks.
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 enabling oplocks on the volume. Disabling oplocks on the share, disables both opportunistic and lease oplocks. You can enable or disable oplocks on existing shares at any time.
Step
- Perform the applicable action:
If you want to... Then... Enable oplocks on a share by modifying an existing share Enter the following command:
vserver share properties add -vserver vserver_name -share-name share_name -share-properties oplocks
Note: You can specify additional share properties to add by using a comma-delimited list.Newly added properties are appended to the existing list of share properties. Any share properties that you have previously specified remain in effect.Disable oplocks on a share by modifying an existing share Enter the following command:
vserver share properties remove -vserver vserver_name -share-name share_name -share-properties oplocks
Note: You can specify additional share properties to remove by using a comma-delimited list.Share properties that you remove are deleted from the existing list of share properties; however, previously configured share properties that you do not remove remain in effect.
Examples
The following example shows oplocks enabled for the share named "Engineering" on Vserver vs1:
cluster1::> vserver cifs share properties add -vserver vs1 -share-name Engineering -share-properties oplocks cluster1::> vserver cifs share properties show Vserver Share Properties ---------------- ---------------- ----------------- vs1 Engineering oplocks browsable changenotify showsnapshot
The following example shows oplocks disabled for the share named "Engineering" on Vserver vs1:
cluster1::> vserver cifs share properties remove -vserver vs1 -share-name Engineering -share-properties oplocks cluster1::> vserver cifs share properties show Vserver Share Properties ---------------- ---------------- ----------------- vs1 Engineering browsable changenotify showsnapshot
No comments:
Post a Comment