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.
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
-
Create a
VolumeAttributesClassmanifest with the desired parameters. The following example sets QoS limits on a FlashArray block volume.apiVersion: storage.k8s.io/v1kind: VolumeAttributesClassmetadata:name: fa-high-performancedriverName: pxd.portworx.comparameters:max_iops: "50000"max_bandwidth: "2G" -
Apply the manifest:
kubectl apply -f vac.yaml -
Patch the target PVC to reference the
VolumeAttributesClass:kubectl patch pvc <pvc-name> -n <namespace> \--type=merge -p '{"spec":{"volumeAttributesClassName":"fa-high-performance"}}' -
Verify that the modification completed by inspecting the PVC status:
kubectl get pvc <pvc-name> -n <namespace> -o yamlWhen the modification is complete,
status.currentVolumeAttributesClassNamematches the name of theVolumeAttributesClassyou applied.
Supported parameters
The following parameters are supported in a VolumeAttributesClass for FlashArray block volumes:
| Parameter | Type | Description |
|---|---|---|
max_iops | string | Sets a QoS IOPS cap. Range: 100 – 100,000,000. Example: "50000". |
max_bandwidth | string | Sets a QoS bandwidth cap. Units: K, M, G. Example: "2G". |
pure_backend_tags | string | Semicolon-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_tags | string | Semicolon-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.