Add custom tags to FlashArray block volumes
PX-CSI automatically tags FlashArray block volumes to identify those created by the CSI driver. You can also define custom tags to apply your own metadata, such as environment names, team ownership, or cost allocation labels.
Tags are supported only for FlashArray block volumes. For more information about FlashArray tags, see FlashArray tag administration.
Prerequisites
Ensure that you are running:
- PX-CSI version 26.2.1 or later.
- Purity version 6.8.2 or later.
Default tag
PX-CSI automatically applies the following tag to each FlashArray block volume when it is dynamically provisioned, cloned, or imported into Kubernetes:
| Property | Value | Description |
|---|---|---|
| Key | created-by | Identifies the creator of the volume |
| Value | px-csi | Indicates the volume was created by PX-CSI |
| Namespace | portworx.internal | Internal namespace for Portworx-specific tags |
| Copyable | false | Tags are not copied to cloned volumes |
The portworx.internal namespace and the created-by key are reserved. You cannot modify or remove this tag.
Custom tags
You can define custom tags on FlashArray block volumes using the pure_backend_tags parameter. Custom tags are applied at provisioning time.
Tag format
Specify tags as a semicolon-separated list. Each tag must use one of the following formats:
| Format | Example | Description |
|---|---|---|
key:value | env:production | Adds a tag in the default namespace |
namespace:key:value | team:storage:ops | Adds a tag in a custom namespace |
key: | owner: | Adds a tag with an empty value |
To specify multiple tags, separate them with semicolons: env:production;team:storage:ops.
Add custom tags in a StorageClass
Specify the pure_backend_tags parameter in the StorageClass parameters field:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: px-fa-block-tagged
provisioner: pxd.portworx.com
parameters:
backend: pure_block
pure_backend_tags: "env:production;team:storage:ops"
Modify or remove custom tags on an existing volume
You can add or remove custom tags on an existing FlashArray block volume using VolumeAttributesClass mutable parameters:
| Parameter | Format | Description |
|---|---|---|
pure_backend_tags | key:value or namespace:key:value, semicolon-separated | Tags to add to the volume |
pure_backend_remove_tags | key or namespace:key, semicolon-separated | Tag keys to remove from the volume |
For pure_backend_remove_tags, specify only the key (not the value). To remove a tag in a custom namespace, use namespace:key format. For more information, see Modify volume attributes of a PVC.
You cannot modify or remove the reserved portworx.internal:created-by tag.
Using tags on FlashArray
You can use tags to identify and filter volumes created by PX-CSI on the FlashArray.
List all volumes with tags
View all volumes and their tags:
purevol list --tags
Name Key Value Namespace Copyable
pvc-abc123-fa-vol created-by px-csi portworx.internal False
pvc-abc123-fa-vol env production default False
pvc-def456-fa-vol created-by px-csi portworx.internal False
other-volume Department IT default True
List only PX-CSI volumes
Filter to show only volumes created by PX-CSI using the tag key and value:
purevol list --tags --filter="key='created-by' and value='px-csi'"
Name Key Value Namespace Copyable
pvc-abc123-fa-vol created-by px-csi portworx.internal False
pvc-def456-fa-vol created-by px-csi portworx.internal False
pvc-ghi789-fa-vol created-by px-csi portworx.internal False
This command lists all volumes on the FlashArray that were created by PX-CSI, making it easy to identify and manage CSI-managed volumes separately from other volumes on the array.
View tags for a specific volume
purevol list --tags <volume-name>
Replace <volume-name> with the name of the volume you want to inspect.
You can also filter tags for a specific volume by key:
purevol list --tags <volume-name> --filter="key='created-by'"