Create a FlexCache volume
You can create a FlexCache volume in the same cluster for improving performance when accessing a hot object. If you have data centers in different locations, you can create FlexCache volumes on remote clusters for accelerating data access.
-
Beginning with ONTAP 9.5, FlexCache supports FlexVol volumes as origin volumes and FlexGroup volumes as FlexCache volumes.
-
Beginning in ONTAP 9.7 both FlexVol volume and FlexGroup volumes are supported as origin volumes.
-
Beginning with ONTAP 9.14.0, you can create an unencrypted FlexCache volume from an encrypted source.
-
You must be running ONTAP 9.5 or later.
-
If you are running ONTAP 9.6 or earlier, you must add a FlexCache license.
A FlexCache license is not required for ONTAP 9.7 or later. Beginning with ONTAP 9.7, FlexCache functionality is included with ONTAP and no longer requires a license or activation.
If an HA pair is using encrypting SAS or NVMe drives (SED, NSE, FIPS), you must follow the instructions in the topic Returning a FIPS drive or SED to unprotected mode for all drives within the HA pair prior to initializing the system (boot options 4 or 9). Failure to do this may result in future data loss if the drives are repurposed. |
-
If the FlexCache volume is on a different cluster than the origin volume, create a cluster peer relationship:
-
In the local cluster, click Protection > Overview.
-
Expand Intercluster Settings, click Add Network Interfaces and add intercluster network interfaces for the cluster.
Repeat this step on the remote cluster.
-
In 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.
-
In the local cluster, under Cluster Peers, click Peer Clusters and peer the local and remote clusters.
-
-
Create an SVM peer relationship:
Under Storage VM Peers, click and then Peer Storage VMs to peer the storage VMs.
-
Select Storage > Volumes.
-
Select Add.
-
Select More Options and then select Add as cache for a remote volume.
If you are running ONTAP 9.8 or later and you want to disable QoS or choose a custom QoS policy, click More Options, and then under Storage and Optimization, select Performance Service Level.
-
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:
volume flexcache create -vserver <cache_svm> -volume <cache_vol_name> -auto-provision-as flexgroup -size <vol_size> -origin-vserver <origin_svm> -origin-volume <origin_vol_name>
The following example creates a FlexCache volume and automatically selects existing aggregates for provisioning:
cluster1::> volume flexcache create -vserver vs_1 -volume fc1 -auto-provision-as flexgroup -origin-volume vol_1 -size 160MB -origin-vserver vs_1 [Job 443] Job succeeded: Successful
The following example creates a FlexCache volume and sets the junction path:
cluster1::> flexcache create -vserver vs34 -volume fc4 -aggr-list aggr34,aggr43 -origin-volume origin1 -size 400m -junction-path /fc4 [Job 903] Job succeeded: Successful
-
Verify the FlexCache relationship from the FlexCache volume and the origin volume.
-
View the FlexCache relationship in the cluster:
volume flexcache show
cluster1::> volume flexcache show Vserver Volume Size Origin-Vserver Origin-Volume Origin-Cluster ------- ----------- ---------- -------------- ------------- -------------- vs_1 fc1 160MB vs_1 vol_1 cluster1
-
View all of the FlexCache relationships in the origin cluster:
volume flexcache origin show-caches
cluster::> volume flexcache origin show-caches Origin-Vserver Origin-Volume Cache-Vserver Cache-Volume Cache-Cluster -------------- --------------- --------------- -------------- --------------- vs0 ovol1 vs1 cfg1 clusA vs0 ovol1 vs2 cfg2 clusB vs_1 vol_1 vs_1 fc1 cluster1
-
Result
The FlexCache volume is successfully created. Clients can mount the volume by using the junction path of the FlexCache volume.