Creating a FlexCache
Using the following procedures, you will create a FlexCache volume on an Amazon FSx for NetApp ONTAP file system, that is backed by an origin volume located in an on-premises NetApp ONTAP cluster.
Using the ONTAP CLI
You will use the ONTAP CLI to create and manage a FlexCache configuration on your FSx for ONTAP file system.
The commands in these procedures use the following aliases for the cluster, SVM, and volume :
Cache_ID– the cache cluster's ID (in the format FSxIdabcdef1234567890a)Origin_ID– the origin cluster's IDCacheSVM– the cache SVM nameOriginSVM– the origin SVM nameOriginVol– the origin volume nameCacheVol– the FlexCache volume name
The procedures in this section use the following NetApp ONTAP CLI commands.
Prerequisites
Before you begin using the procedures in the following sections, be sure that you have met the following prerequisites:
The source and destination file systems are connected in the same VPC, or are in networks that are peered using Amazon VPC, AWS Transit Gateway, AWS Direct Connect, or AWS VPN. For more information, see Accessing data from within the AWS Cloud and What is VPC peering? in the Amazon VPC Peering Guide.
The VPC security group for the FSx for ONTAP file system has inbound and outbound rules allowing ICMP as well as TCP on ports 11104 and 11105 for your inter-cluster endpoints (LIFs).
You have created a destination FSx for ONTAP file system with an SVM, but you have not created the volume that will be used as a FlexCache. For more information, see Creating file systems.
Record the source and destination inter-cluster LIFs
For the FSx for ONTAP file system that is the destination cluster:
Open the Amazon FSx console at https://console.aws.amazon.com/fsx/
. -
Choose File systems, then choose the FSx for ONTAP file system that is the destination cluster to open the file system details page.
In Administration, find the Inter-cluster endpoint - IP addresses, and record the value.
Note
For scale-out file systems, there are two inter-cluster endpoint IP addresses for each high-availability (HA) pair.
-
For the on-premises source cluster, retrieve the inter-cluster LIF IP addresses using the following ONTAP CLI command:
Origin::>network interface show -role interclusterLogical Network Vserver Interface Status Address/Mask ----------- ---------- ------- ------------ OriginSVM inter_1 up/up 10.0.0.36/24 inter_2 up/up 10.0.1.69/24 -
Save the
inter_1andinter_2 IPaddresses. They are referenced in theOriginSVMalias asorigin_inter_1andorigin_inter_2and theCacheSVMalias ascache_inter_1andcache_inter_2.
Establish cluster peering between the origin and cache
Establish a cluster peer relationship on the Cache and Source cluster using the
cluster peer create that you will need to enter in when you establish
cluster peering on the Origin cluster.cluster-peer-passphrase
Set up cluster peering on the
Cachecluster (your FSx for ONTAP file system).To access the ONTAP CLI, establish an SSH session on the management port of the Amazon FSx for NetApp ONTAP file system or SVM by running the following command. Replace
with the IP address of the file system's management port.management_endpoint_ip[~]$ssh fsxadmin@management_endpoint_ipFor more information, see Managing file systems with the ONTAP CLI.
Use the following command, and record the password that you create. For scale-out file systems, provide the
inter_1andinter_2IP addresses for each HA pair.FSx-Cache::>cluster peer create -address-family ipv4 -peer-addrsorigin_inter_1,origin_inter_2Enter the passphrase:Confirm the passphrase:cluster-peer-passphraseNotice: Now use the same passphrase in the "cluster peer create" command in the other cluster.cluster-peer-passphrase
Use the following command to set up cluster peering on the
source(on-premises) cluster. You’ll need to enter the passphrase you created in the previous step to authenticate. For scale-out file systems, you'll need to provide the inter-cluster IP address for each HA pair.Origin::>cluster peer create -address-family ipv4 -peer-addrscache_inter_1,cache_inter_2Enter the passphrase:cluster-peer-passphraseConfirm the passphrase:cluster-peer-passphraseOn the
sourcecluster, verify that cluster peering was set up successfully using the following command. In the output,Availabilityshould be set toAvailable.Origin::>cluster peer showPeer Cluster Name Availability Authentication ------------------- ------------- -------------- Cache_ID Available okIf the output does not show
Available, repeat the previous steps on thesourceandcacheclusters.
Configure storage virtual machine (SVM) peering
After you have established cluster peering successfully, the next step is to create an SVM peering relationship on the cache cluster (Cache) using the vserver peer command. Additional aliases used in the following procedure are as follows:
-
– the name used to identify theCacheLocalNamecacheSVM when configuring SVM peering on theoriginSVM. -
– the name used to identify theOriginLocalNameoriginSVM when configuring SVM peering on thecacheSVM.
On the
cacheSVM, use the following command to create an SVM peering relationship.FSx-Cache::>vserver peer create -vserverCacheSVM-peer-vserverOriginSVM-peer-clusterOrigin_ID-local-nameOriginLocalName-application flexcacheOn the source cluster, use the following command to accept the SVM peering relationship.
Origin::>vserver peer accept -vserverOriginSVM-peer-vserverCacheSVM-local-nameCacheLocalNameOn the source cluster, accept the peering relationship.
Origin::>vserver peer accept -vserverOriginSVM-peer-vserverCacheSVM-local-nameCacheLocalNameVerify that the SVM peering was successful using the following command;
Peer Stateshould be set topeeredin the response.Origin::>vserver peer showVserver Peer Vserver Peer State Peering Cluster Remote Applications ------------ --------------- ------------- ------------------ ----------------------- OriginSVM CacheSVM peered FSx-Cache flexcache
Create the FlexCache volume
After successfully creating the SVM peering relationship, the next step is to create the FlexCache volume on the cache SVM. The FlexCache volume must be a FlexGroup. You will also choose a mode of operation for your FlexCache volume. For more information, see FlexCache write modes.
-
On the cache cluster, use the following ONTAP CLI command to create your FlexCache volume. The example creates a 2 TB FlexCache volume named
CacheVol.-
To create a write-around FlexCache volume, use the following command.
FSx-Cache::>volume flexcache create -vserverCacheSVM-size 2t -volumeCacheVol-origin-volumeOriginVol-origin-vserverOriginSVM-junction-path/flexcache-aggr-listaggr1 -
To create a write-back FlexCache volume, use the following command.
FSx-Cache::>volume flexcache create -vserverCacheSVM-size 2t -volumeCacheVol-origin-volumeOriginVol-origin-vserverOriginSVM-junction-path/flexcache-aggr-listaggr1-is-writeback-enabled true
Note
You can use the
volume flexcache config modify -is-writeback-enabled {true|false}command to modify the write mode. Before using this command, make sure you enter ONTAP CLI advanced mode by using the set -privilege advancedcommand. -
Verify the FlexCache relationship between the FlexCache volume and the origin volume.
For a FlexCache write-around volume, your output will look similar to the following example.
FSx-Cache::>volume flexcache showVserver Volume Size Origin-Vserver Origin-Volume Origin-Cluster ------- ---------- ------- -------------- ------------- -------------- CacheSVM CacheVol 2TB OriginSVM OriginVol OriginFor a FlexCache write-back volume, your output will look similar to the following example.
FSx-Cache::>volume flexcache showVserver Volume Size Origin-Vserver Origin-Volume Origin-Cluster Writeback ------- ---------- ------- -------------- ------------- -------------- --------- CacheSVM CacheVol 2TB OriginSVM OriginVol Origin true
Mount the FlexCache volume
Once the FlexCache volume becomes AVAILABLE, NFSv3, NFSv4, and SMB clients can mount it. Once the FlexCache is mounted, clients have access to the entire dataset on the on-premise origin volume.
To create a mount point and mount the FlexCache, run the following commands on the client:
$sudo mkdir -p /fsx/CacheVol$sudo mount -t nfs management.fs-01d2f606463087f6d.fsx.us-east-1.amazonaws.com:/CacheVol /fsx/CacheVol