Skip to main content
Version: 26.2

Modify volume attributes of a PVC

A VolumeAttributesClass (VAC) lets you modify QoS limits and backend tags on an existing FlashArray block volume without cloning to a new StorageClass. This is useful when application requirements change and you need to adjust IOPS or bandwidth caps on a running PVC.

note

VolumeAttributesClass modification is supported only for FlashArray block volumes.

Prerequisites

Ensure that you are running:

  • Kubernetes version 1.34 or later
  • PX-CSI version 26.2.1 or later

How VolumeAttributesClass works

VolumeAttributesClass is a Kubernetes resource that defines a set of mutable parameters for PVCs. When you set spec.volumeAttributesClassName on a PVC, Kubernetes calls the CSI driver's ControllerModifyVolume RPC to apply the specified parameters to the underlying FlashArray volume.

During provisioning, parameters in the VolumeAttributesClass take precedence over matching parameters in the StorageClass. When you modify an existing PVC by referencing a VolumeAttributesClass, only the parameters defined in the VAC apply.

If the target backend does not support any parameter in the VolumeAttributesClass, the modification fails with an InvalidArgument error.

Apply a VolumeAttributesClass to a PVC

  1. Create a VolumeAttributesClass manifest with the desired parameters. The following example sets QoS limits on a FlashArray block volume.

    apiVersion: storage.k8s.io/v1
    kind: VolumeAttributesClass
    metadata:
    name: fa-high-performance
    driverName: pxd.portworx.com
    parameters:
    max_iops: "50000"
    max_bandwidth: "2G"
  2. Apply the manifest:

    kubectl apply -f vac.yaml
  3. Patch the target PVC to reference the VolumeAttributesClass:

    kubectl patch pvc <pvc-name> -n <namespace> \
    --type=merge -p '{"spec":{"volumeAttributesClassName":"fa-high-performance"}}'
  4. Verify that the modification completed by inspecting the PVC status:

    kubectl get pvc <pvc-name> -n <namespace> -o yaml

    When the modification is complete, status.currentVolumeAttributesClassName matches the name of the VolumeAttributesClass you applied.

Supported parameters

The following parameters are supported in a VolumeAttributesClass for FlashArray block volumes:

ParameterTypeDescription
max_iopsstringSets a QoS IOPS cap. Range: 100 – 100,000,000. Example: "50000".
max_bandwidthstringSets a QoS bandwidth cap. Units: K, M, G. Example: "2G".
pure_backend_tagsstringSemicolon-separated tags to set on the volume. Format per tag: key:value or namespace:key:value. If you omit the namespace, it uses the default namespace. Example: "env:production;team:storage". Cannot modify the reserved portworx.internal:created-by tag.
pure_backend_remove_tagsstringSemicolon-separated tag keys to remove from the volume. Format per tag: key or namespace:key. If you omit the namespace, it uses the default namespace. Example: "env;team". Cannot remove the reserved portworx.internal:created-by tag.

For tag format details, see Add custom tags to FlashArray block volumes.

In this topic: