Skip to main content
Version: 26.1

Control Volume Placement Using Array ID

When multiple FlashArrays or FlashBlades are connected to your cluster, you can control where PX-CSI provisions volumes by specifying an array ID. Use this to direct volumes to specific arrays based on performance tiers, capacity requirements, or organizational needs.

Configure volume placement

Get the array ID using one of these methods:

  • PX CLI: Run px csi list backend. For more information about installing and running the PX CLI, see Install and Run PX CLI.
  • Array UI: Log in to your FlashArray or FlashBlade management interface and navigate to the system settings to find the array ID.

Specify the target array by using the portworx.io/pure-array-id parameter in one of these ways:

  • Use a StorageClass parameter: Define the array ID in the StorageClass to apply it to all persistent volume claims (PVCs) that use that StorageClass.
  • Use a PVC annotation: Specify the array ID directly in the PVC annotation to override the StorageClass setting or target a specific array for individual volumes.

If the array ID is specified in both the PVC annotation and the StorageClass parameter, the PVC annotation takes precedence.

note

We recommend using array ID to control volume placement. You can also use FlashArray pods to control volume placement. For more information, see Control volume placement using FlashArray pods.

Use StorageClass parameter

Define the array ID in the StorageClass to apply it to all PVCs that use that StorageClass.

  1. Create a StorageClass YAML manifest that specifies the target array by using the portworx.io/pure-array-id parameter.

    fa-performance-sc.yaml
    kind: StorageClass
    apiVersion: storage.k8s.io/v1
    metadata:
    name: fa-performance-sc
    provisioner: pxd.portworx.com
    parameters:
    backend: "pure_block"
    portworx.io/pure-array-id: "1b07343b-xxxx-xxxx-xxxx-8b5e8cdeb16c" # Targets a specific FlashArray
    max_iops: "50000"
    max_bandwidth: "10G"
    volumeBindingMode: Immediate
    tip

    For a complete list of StorageClass parameters, see the StorageClass reference.

  2. Apply the StorageClass to your cluster:

    kubectl apply -f fa-performance-sc.yaml
    storageclass.storage.k8s.io/fa-performance-sc created
  3. Create a persistent volume claim (PVC) that references the StorageClass:

    database-pvc.yaml
    kind: PersistentVolumeClaim
    apiVersion: v1
    metadata:
    name: database-claim
    spec:
    accessModes:
    - ReadWriteOnce
    resources:
    requests:
    storage: 100Gi
    storageClassName: fa-performance-sc # Uses the array ID from the StorageClass
    tip

    For a complete list of PersistentVolumeClaim fields and annotations, see the PersistentVolumeClaim reference.

  4. Apply the PVC:

    kubectl apply -f database-pvc.yaml
    persistentvolumeclaim/database-claim created

Use PVC annotation

Specify the array ID directly in the PVC annotation to target a specific array for the volume. This overrides any array ID specified in the StorageClass.

  1. Create a persistent volume claim (PVC) YAML manifest that specifies the target array by using the portworx.io/pure-array-id annotation.

    database-pvc.yaml
    kind: PersistentVolumeClaim
    apiVersion: v1
    metadata:
    name: database-claim
    annotations:
    portworx.io/pure-array-id: "1b07343b-xxxx-xxxx-xxxx-8b5e8cdeb16c" # Targets a specific FlashArray
    spec:
    accessModes:
    - ReadWriteOnce
    resources:
    requests:
    storage: 100Gi
    storageClassName: px-fa-direct-access
    tip

    For a complete list of PersistentVolumeClaim fields and annotations, see the PersistentVolumeClaim reference.

  2. Apply the PVC to your cluster:

    kubectl apply -f database-pvc.yaml
    persistentvolumeclaim/database-claim created