Create a FlexCache volume

This page describes how to create a FlexCache volume.

Considerations

  • NetApp Volumes can only be used for cache volumes, not as a FlexCache origin.

  • FlexCache is supported for the Premium and Extreme service levels.

  • Cache volumes don't support NFSv4.2.

  • The origin volume can be a FlexVol or FlexGroup on ONTAP clusters.

  • Access time updates must be disabled on the origin volume.

  • Choose the same volume security style for the cache volume as the origin volume. The security style of the cache volume is determined by the protocol type you choose for the cache.

Before you create a FlexCache volume on NetApp Volumes, make sure that access time updates are disabled on your origin volume.

Prerequisites for FlexCache

FlexCache uses the same communication channel as SnapMirror and shares the same prerequisites as volume migration. For more information, see Prerequisites for ONTAP to NetApp Volumes communication.

The following are the key prerequisites:

  • Source ONTAP system and administrator credentials

  • Network connection to the Google Cloud project

  • IP address allocation

  • NetApp Volumes settings

If you have already established a network connection and cluster peering for volume migration or external replication, FlexCache can reuse these existing configurations.

Create a FlexCache volume

Creating a FlexCache volume includes a two-step process. The first step is performed on NetApp Volumes and the second on the source ONTAP system. Both steps must be completed for the FlexCache volume to function correctly.

Use the following instructions to create a FlexCache volume using the Google Cloud CLI.

gcloud

  1. Create a FlexCache volume:

    gcloud beta netapp volumes create VOLUME_NAME --location=LOCATION \
     --capacity=CAPACITY --protocols=PROTOCOL \
     --share-name=SHARE_NAME --storage-pool=STORAGE_POOL \
     --snapshot-directory=FALSE --multiple-endpoints=TRUE \
     --cache-parameters=peer-volume-name=PEER_VOLUME_NAME,peer-svm-name=PEER_SVM_NAME,peer-cluster-name=PEER_CLUSTER_NAME,peer-ip-addresses=PEER_IP_ADDRESS1#PEER_IP_ADDRESS2#...,enable-global-file-lock=ENABLE_GLOBAL_FILE_LOCK,cache-config=cifs-change-notify-enabled=CIFS-CHANGE-NOTIFY-ENABLED

    The cache-parameters block designates the new volume as a cache volume.

    Replace the following information:

    • VOLUME_NAME: the name of the volume. This name must be unique per location.

    • LOCATION: the location for the volume.

    • CAPACITY: the capacity of the volume. It defines the capacity that NAS clients see.

    • PROTOCOLS: the NAS protocols the volume is exported with.

    • SHARE_NAME: the NFS export path or SMB share name of the volume.

    • STORAGE_POOL: the storage pool to create the volume in.

    • PEER_CLUSTER_NAME: the name of the ONTAP cluster hosting the source volumes.

    • PEER_IP_ADDRESSES: the InterCluster-LIF IP addresses of the ONTAP cluster. The source cluster must provide one IC-LIF per node, separated by # signs. Make sure to specify them all.

      The following example shows you how to add multiple IC-LIF IP addresses of the ONTAP cluster:

      peer-ip-addresses=10.0.0.25#10.0.0.26
      
    • PEER_SVM_NAME: the name of the storage virtual machine (SVM), also known as vserver that owns the source volume.

    • PEER_VOLUME_NAME: the name of the source volume.

    • ENABLE_GLOBAL_FILE_LOCK: Optional: a boolean flag indicating whether global file locking is enabled on the cache volume. The default is false.

    • CIFS-CHANGE-NOTIFY-ENABLED: Optional: a boolean flag indicating whether a CIFS change notification is enabled for the cache volume. The default is false.

    Example invocation:

    $ gcloud beta --project my-project netapp volumes create my-volume \
    --location australia-southeast1 --capacity 100 \
    --protocols=nfsv3 --share-name origin1 --storage-pool my-pool \
    --snapshot-directory=false --multiple-endpoints=true \
    --export-policy=access-type=READ_WRITE,allowed-clients=0.0.0.0/0,has-root-access=true,nfsv3=true \
    --cache-parameters=peer-volume-name=origin1,peer-svm-name=my-svm,peer-cluster-name=my-cluster,peer-ip-addresses=10.152.0.5,enable-global-file-lock=false,cache-config=cifs-change-notify-enabled=false
    

    To meet your volume requirements, specify all applicable optional parameters. For example, an NFS volume might require an export policy.

    Look up all options:

    gcloud netapp volumes create --help
    
  2. Peer with the origin ONTAP system.

    After creating the cache volume, NetApp Volumes tries to establish peering with your origin ONTAP system. This peering process serves as an authentication and authorization step, and protects your origin cluster from malicious cache creation requests. Therefore, make sure you only peer with trusted systems.

    To look up the detailed commands and steps for the peering process:

    gcloud beta netapp volumes describe VOLUME_NAME --location=LOCATION
    

    The cacheParameters block contains sub-parameters which show the status of the peering process. The cacheState parameter's output indicates the current step in the multi-step peering process.

    • If cacheState is PENDING_CLUSTER_PEERING:

      • Look up the command parameter and run the command listed on the ONTAP origin cluster.

      • ONTAP requests a passphrase, which can be found under the passphrase parameter.

      • The command format to run on the ONTAP side:

        cluster peer create ...
        
    • If cacheState is PENDING_SVM_PEERING:

      • Look up the command parameter and run the command listed on the ONTAP origin cluster.

      • ONTAP requests a passphrase, which can be found under the passphrase parameter.

      • The command format to run on the ONTAP side:

        vserver peer create ...
        
    • If cacheState is PEERED:

      • The FlexCache volume is successfully created and functional. You can now connect clients.

      • A FlexCache volume is always a volume with multiple endpoints.

    After running any of the commands indicated by the cacheState and command parameters, wait one minute, and then run the describe command again to get new instructions. Repeat this process until cacheState displays as PEERED.

What's next

Manage FlexCache volumes.