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 ID.CacheSVM
– the cache SVM name.OriginSVM
– the origin SVM name.OriginVol
– the origin volume name.CacheVol
– 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 intercluster
Logical 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_1
andinter_2 IP
addresses. They are referenced in theOriginSVM
alias asorigin_inter_1
andorigin_inter_2
and theCacheSVM
alias ascache_inter_1
andcache_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
Cache
cluster (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_ip
For 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_1
andinter_2
IP addresses for each HA pair.FSx-Cache::>
cluster peer create -address-family ipv4 -peer-addrs
origin_inter_1
,origin_inter_2
Enter the passphrase:
Confirm the passphrase:cluster-peer-passphrase
Notice: 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-addrs
cache_inter_1
,cache_inter_2
Enter the passphrase:
cluster-peer-passphrase
Confirm the passphrase:
cluster-peer-passphrase
On the
source
cluster, verify that cluster peering was set up successfully using the following command. In the output,Availability
should be set toAvailable
.Origin::>
cluster peer show
Peer Cluster Name Availability Authentication ----------------- -------------- -------------- Cache_ID Available ok
If the output does not show
Available
, repeat the previous steps on thesource
andcache
clusters.
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 theCacheLocalName
cache
SVM when configuring SVM peering on theorigin
SVM. -
– the name used to identify theOriginLocalName
origin
SVM when configuring SVM peering on thecache
SVM.
On the
cache
SVM, use the following command to create an SVM peering relationship.FSx-Cache::>
vserver peer create -vserver
CacheSVM
-peer-serverOriginSVM
-peer-clusterOrigin_ID
-local-nameOriginLocalName
-application flexcacheOn the source cluster, use the following command to accept the SVM peering relationship.
Origin::>
vserver peer accept -vserver
OriginSVM
-peer-vserverCacheSVM
-local-nameCacheLocalName
Info: [Job 211] 'vserver peer accept' job queued
On the source cluster, accept the peering relationship.
Origin::>
vserver peer accept -vserver
OriginSVM
-peer-vserverCacheSVM
-local-nameCacheLocalName
Info: [Job 211] 'vserver peer accept' job queued
Verify that the SVM peering was successful using the following command;
Peer State
should be set topeered
in the response.Origin::>
vserver peer show
Peer Peer Peer Peering Remote vserver Vserver State Cluster Applications Vserver ------- -------- ------ -------- ------------- --------- OriginSVM CacheSVM peered FSx-Cache flexcache OriginSVM
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.
-
On the cache cluster, use the following ONTAP CLI command to create a 2 TB FlexCache volume named
CacheVol
.FSx-Cache::>
volume flexcache create -vserver
CacheSVM
-size 2t -volumeCacheVol
-origin-volumeOriginVol
-origin-vserverOriginSVM
-junction-path /flexcache -aggr-list aggr1[Job 215] Job succeeded: Successful
Verify the FlexCache relationship between the FlexCache volume and the origin volume.
FSx-Cache::>
volume flexcache show
Vserver Volume Size Origin-Vserver Origin-Volume Origin-Cluster ------- ----------- ---------- -------------- ------------- -------------- CacheSVM CacheVol 2TB OriginSVM OriginVol Origin
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