Skip to main content

Enable and manage FlexCache writeback

Contributors netapp-lenida

Beginning with ONTAP 9.15.1, you can enable FlexCache writeback mode on FlexCache volumes to provide better performance for edge computing environments and caches with write-heavy workloads. You can also determine whether writeback is enabled on a FlexCache volume or disable writeback on the volume when necessary.

When writeback is enabled on the cache volume, write requests are sent to the local cache rather than to the origin volume.

Before you begin

You must be in advanced privilege mode.

Create a new FlexCache volume with writeback enabled

Steps

You can create a new FlexCache volume with writeback enabled by using ONTAP System Manager or the ONTAP CLI.

System Manager
  1. If the FlexCache volume is on a different cluster than the origin volume, create a cluster peer relationship:

    1. On the local cluster, click Protection > Overview.

    2. Expand Intercluster Settings, click Add Network Interfaces, and add intercluster interfaces to the cluster.

      Repeat this on the remote cluster.

    3. On the remote cluster, click Protection > Overview. Click menu options icon in the Cluster Peers section and click Generate Passphrase.

    4. Copy the generated passphrase and paste it in the local cluster.

    5. On the local cluster, under Cluster Peers, click Peer Clusters and peer the local and remote clusters.

  2. If the FlexCache volume is on the same cluster as the origin volume but is in a different SVM, create an intercluster SVM peer relationship of type "flexcache":

    Under Storage VM Peers, click menu options icon and then Peer Storage VMs to peer the storage VMs.

  3. Select Storage > Volumes.

  4. Select Add.

  5. Select More Options and then select Add as cache for a remote volume.

  6. Select Enable FlexCache write-back.

CLI
  1. If the FlexCache volume to be created is in a different cluster, create a cluster peer relationship:

    1. On the destination cluster, create a peer relationship with the data protection source cluster:

      cluster peer create -generate-passphrase -offer-expiration MM/DD/YYYY HH:MM:SS|1...7days|1...168hours -peer-addrs <peer_LIF_IPs> -initial-allowed-vserver-peers <svm_name>,..|* -ipspace <ipspace_name>

      Beginning with ONTAP 9.6, TLS encryption is enabled by default when creating a cluster peer relationship. TLS encryption is supported for the intercluster communication between the origin and FlexCache volumes. You can also disable TLS encryption for the cluster peer relationship, if required.

      cluster02::> cluster peer create -generate-passphrase -offer-expiration 2days -initial-allowed-vserver-peers *
      
                           Passphrase: UCa+6lRVICXeL/gq1WrK7ShR
                      Expiration Time: 6/7/2017 08:16:10 EST
        Initial Allowed Vserver Peers: *
                  Intercluster LIF IP: 192.140.112.101
                    Peer Cluster Name: Clus_7ShR (temporary generated)
      
      Warning: make a note of the passphrase - it cannot be displayed again.
    2. On the source cluster, authenticate the source cluster to the destination cluster:

      cluster peer create -peer-addrs <peer_LIF_IPs> -ipspace <ipspace>
      cluster01::> cluster peer create -peer-addrs 192.140.112.101,192.140.112.102
      
      Notice: Use a generated passphrase or choose a passphrase of 8 or more characters.
              To ensure the authenticity of the peering relationship, use a phrase or sequence of characters that would be hard to guess.
      
      Enter the passphrase:
      Confirm the passphrase:
      
      Clusters cluster02 and cluster01 are peered.
  2. If the FlexCache volume is in a different SVM than that of the origin volume, create an SVM peer relationship with flexcache as the application:

    1. If the SVM is in a different cluster, create an SVM permission for the peering SVMs:

      vserver peer permission create -peer-cluster <cluster_name> -vserver <svm-name> -applications flexcache

      The following example illustrates how to create an SVM peer permission that applies for all of the local SVMs:

      cluster1::> vserver peer permission create -peer-cluster cluster2 -vserver "*" -applications flexcache
      
      Warning: This Vserver peer permission applies to all local Vservers. After that no explict
      "vserver peer accept" command required for Vserver peer relationship creation request
      from peer cluster "cluster2" with any of the local Vservers. Do you want to continue? {y|n}: y
    2. Create the SVM peer relationship:

      vserver peer create -vserver <local_SVM> -peer-vserver <remote_SVM> -peer-cluster <cluster_name> -applications flexcache
  3. Create a FlexCache volume with writeback enabled:

    volume flexcache create -vserver <cache_vserver_name> -volume <cache_flexgroup_name> -aggr-list <list_of_aggregates> -origin-volume <origin flexgroup> -origin-vserver <origin_vserver name> -junction-path <junction_path> -is-writeback-enabled true

Enable FlexCache writeback on an existing FlexCache volume

You can enable FlexCache writeback on an existing FlexCache volume using ONTAP System Manager or the ONTAP CLI.

System Manager
  1. Select Storage > Volumes and select an existing FlexCache volume.

  2. On the volume’s Overview page, click Edit in the upper right corner.

  3. In the Edit Volume window, select Enable FlexCache write-back.

CLI
  1. Enable writeback on an existing FlexCache volume:

    volume flexcache config modify -volume <cache_flexgroup_name> -is-writeback-enabled true

Check if FlexCache writeback is enabled

Steps

You can use System Manager or the ONTAP CLI to determine whether FlexCache writeback is enabled.

System Manager
  1. Select Storage > Volumes and select a volume.

  2. In the volume Overview, locate FlexCache details and check if FlexCache writeback is set to Enabled on the FlexCache volume.

CLI
  1. Check if FlexCache writeback is enabled:

    volume flexcache config show -volume cache -fields is-writeback-enabled

Disable writeback on a FlexCache volume

Before you can delete a FlexCache volume you need to disable FlexCache writeback.

Steps

You can use System Manager or the ONTAP CLI to disable FlexCache writeback.

System Manager
  1. Select Storage > Volumes and select an existing FlexCache volume that has FlexCache writeback enabled.

  2. On the volume’s Overview page, click Edit in the upper right corner.

  3. In the Edit Volume window, deselect Enable FlexCache write-back.

CLI
  1. Disable writeback:

    volume flexcache config modify -volume <cache_vol_name> -is-writeback-enabled false