Enable and manage ONTAP FlexCache write-back
Beginning with ONTAP 9.15.1, you can enable FlexCache write-back mode on FlexCache volumes to provide better performance for edge computing environments and caches with write-heavy workloads. You can also determine whether write-back is enabled on a FlexCache volume or disable write-back on the volume when necessary.
When write-back is enabled on the cache volume, write requests are sent to the local cache rather than to the origin volume.
You must be in advanced privilege mode.
Create a new FlexCache volume with write-back enabled
You can create a new FlexCache volume with write-back enabled by using ONTAP System Manager or the ONTAP CLI.
-
If the FlexCache volume is on a different cluster than the origin volume, create a cluster peer relationship:
-
On the local cluster, click Protection > Overview.
-
Expand Intercluster Settings, click Add Network Interfaces, and add intercluster interfaces to the cluster.
Repeat this on the remote cluster.
-
On the remote cluster, click Protection > Overview. Click in the Cluster Peers section and click Generate Passphrase.
-
Copy the generated passphrase and paste it in the local cluster.
-
On the local cluster, under Cluster Peers, click Peer Clusters and peer the local and remote clusters.
-
-
If the FlexCache volume is on a different cluster than the origin volume, create an SVM peer relationship:
Under Storage VM Peers, click and then Peer Storage VMs to peer the storage VMs.
If the FlexCache volume is on the same cluster, you cannot create an SVM peer relationship using System Manager.
-
Select Storage > Volumes.
-
Select Add.
-
Select More Options and then select Add as cache for a remote volume.
-
Select Enable FlexCache write-back.
-
If the FlexCache volume to be created is in a different cluster, create a cluster peer relationship:
-
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.
-
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.
-
-
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:-
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
-
Create the SVM peer relationship:
vserver peer create -vserver <local_SVM> -peer-vserver <remote_SVM> -peer-cluster <cluster_name> -applications flexcache
-
-
Create a FlexCache volume with write-back 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 write-back on an existing FlexCache volume
You can enable FlexCache write-back on an existing FlexCache volume using ONTAP System Manager or the ONTAP CLI.
-
Select Storage > Volumes and select an existing FlexCache volume.
-
On the volume's Overview page, click Edit in the upper right corner.
-
In the Edit Volume window, select Enable FlexCache write-back.
-
Enable write-back on an existing FlexCache volume:
volume flexcache config modify -volume <cache_flexgroup_name> -is-writeback-enabled true
Check if FlexCache write-back is enabled
You can use System Manager or the ONTAP CLI to determine whether FlexCache write-back is enabled.
-
Select Storage > Volumes and select a volume.
-
In the volume Overview, locate FlexCache details and check if FlexCache write-back is set to Enabled on the FlexCache volume.
-
Check if FlexCache write-back is enabled:
volume flexcache config show -volume <cache_flexgroup_name> -fields is-writeback-enabled
Disable write-back on a FlexCache volume
Before you can delete a FlexCache volume you need to disable FlexCache write-back.
You can use System Manager or the ONTAP CLI to disable FlexCache write-back.
-
Select Storage > Volumes and select an existing FlexCache volume that has FlexCache write-back enabled.
-
On the volume's Overview page, click Edit in the upper right corner.
-
In the Edit Volume window, deselect Enable FlexCache write-back.
-
Disable write-back:
volume flexcache config modify -volume <cache_vol_name> -is-writeback-enabled false