Skip to main content

Commands for enabling or disabling oplocks on volumes and qtrees

Contributors netapp-thomi

Oplocks allow clients to lock files and cache content locally, which can increase performance for file operations. You need to know the commands for enabling or disabling oplocks on volumes or qtrees. You also must know when you can enable or disable oplocks on volumes and qtrees.

  • Oplocks are enabled on volumes by default.

  • You cannot disable oplocks when you create a volume.

  • You can enable or disable oplocks on existing volumes for SVMs at any time.

  • You can enable oplocks on qtrees for SVMs.

    The oplock mode setting is a property of qtree ID 0, the default qtree that all volumes have. If you do not specify an oplock setting when creating a qtree, the qtree inherits the oplock setting of the parent volume, which is enabled by default. However, if you do specify an oplock setting on the new qtree, it takes precedence over the oplock setting on the volume.

If you want to…​ Use this command…​

Enable oplocks on volumes or qtrees

volume qtree oplocks with the -oplock-mode parameter set to enable

Disable oplocks on volumes or qtrees

volume qtree oplocks with the -oplock-mode parameter set to disable

Related information

Monitoring oplock status