Skip to main content
Version: 26.1

Use FlashArray ActiveCluster for High Availability

PX-CSI supports FlashArray ActiveCluster, which enables you to provision volumes with synchronous replication and high availability across two FlashArrays.

ActiveCluster is Pure Storage's synchronous replication technology for FlashArray. It provides zero recovery point objective (RPO) by ensuring that every write I/O is simultaneously acknowledged by both arrays before the write is committed. This configuration allows two FlashArrays to operate as active-active peers and replicate storage volumes across availability zones or data centers.

When a PersistentVolumeClaim (PVC) is created, the associated volume is provisioned and synchronized across both FlashArrays. During attachment, the CSI driver waits until the volume is fully synchronized before proceeding. The attachment operation is performed separately on each FlashArray. If one FlashArray is unavailable, the operation completes on the available FlashArray and automatically attaches to the other when it becomes available.

When a PVC is deleted, the associated volume is removed from both FlashArrays. However, if a FlashArray is unavailable while the volume remains attached to it, PX-CSI cannot delete the volume. In such cases, Kubernetes continues to retry the deletion with exponential backoff until the FlashArray becomes available.

note

ActiveCluster is different from ActiveDR. ActiveDR is a near-synchronous disaster recovery feature that uses lightweight, snapshot-based replication to mirror data across arrays with a few seconds of lag.

For more information about ActiveCluster, see Pure Storage FlashArray ActiveCluster documentation.

Prerequisites

Before setting up ActiveCluster with PX-CSI, verify the following:

  • Two FlashArrays that support ActiveCluster and are properly licensed
  • Connectivity to the Mediator from both arrays
  • FlashArray pods must be created but must not use the secure multi-tenancy feature (realm)

For more information about compatibility and supported Purity versions, see Purity version requirements for the ActiveCluster feature.

Limitation

  • A stretched pod can contain a maximum of 8000 volumes. If you need to provision additional volumes, create additional stretched pods.

Configure ActiveCluster on FlashArray

For detailed instructions about configuring synchronous replication and stretched pods with ActiveCluster, refer to the Pure Storage FlashArray Administration Guide.

Install or configure PX-CSI

Complete the following steps based on whether PX-CSI is already installed.

Fresh installation

If you're installing PX-CSI for the first time:

  1. Prepare your environment to use FlashArray as the back-end storage.

    note

    When you create the pure.json file, include both FlashArrays in the ActiveCluster pair.

  2. Install PX-CSI.

Existing installation

If PX-CSI is already installed, verify that both FlashArrays are defined in the pure.json configuration. If the second FlashArray is not included, complete the following steps:

  1. Edit the pure.json file to include both FlashArrays.

    {
    "FlashArrays": [
    {
    "MgmtEndPoint": "flasharray-1.example.com",
    "APIToken": "<array-1-api-token>"
    },
    {
    "MgmtEndPoint": "flasharray-2.example.com",
    "APIToken": "<array-2-api-token>"
    }
    ]
    }
  2. Update the Kubernetes secret:

    kubectl create secret generic px-pure-secret \
    --namespace <portworx-namespace> \
    --from-file=pure.json=<file path> \
    --dry-run=client -o yaml | kubectl apply -f -
  3. Restart the PX-CSI controller pods to apply the updated configuration:

    kubectl rollout restart deployment -n <portworx-namespace> px-pure-csi-controller

Dynamic provisioning

To provision volumes with ActiveCluster, you must create a StorageClass that specifies the stretched pod name, and then create a PersistentVolumeClaim that references the StorageClass.

Create a StorageClass

Create a StorageClass that specifies the stretched pod name in the pure_fa_pod_name parameter:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: <fada-activecluster-sc>
provisioner: pxd.portworx.com
volumeBindingMode: Immediate
allowVolumeExpansion: true
parameters:
backend: "pure_block"
pure_fa_pod_name: "<stretched-pod-name>" # Required: Name of the stretched pod in ActiveCluster
# Optional QoS parameters:
# max_bandwidth: "10G"
# max_iops: "30000"

Apply the StorageClass:

kubectl apply -f <storageclass-file>.yaml

Create a PVC

Create a PersistentVolumeClaim that references the StorageClass you created:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: <activecluster-pvc>
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Gi
storageClassName: <fada-activecluster-sc>

Apply the PVC:

kubectl apply -f <pvc-file>.yaml

PX-CSI provisions a volume that is synchronously replicated across both FlashArrays.

Static provisioning (importing existing volumes)

To import an existing volume from ActiveCluster, the volume must be in a stretched FlashArray pod. Specify the stretched pod name in the portworx.io/pure-volume-name annotation using the format <stretched-pod-name>::<volume-name>.

The following example shows how to import an existing ActiveCluster volume:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: <imported-activecluster-pvc>
annotations:
portworx.io/pure-volume-name: "<stretched-pod-name>::<volume-name>"
spec:
storageClassName: <px-fa-direct-access>
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Gi # Must match the size of the existing volume on FlashArray
note

The annotation takes precedence over the StorageClass pure_fa_pod_name parameter, so you do not need to specify pure_fa_pod_name in the StorageClass when importing volumes.