Resize a PersistentVolumeClaim
Follow the instructions on this page to expand PersistentVolumeClaims (PVCs) managed by PX-CSI. These operations help adjust storage allocation based on changing application requirements.
This procedure applies to both FlashArray and FlashBlade volumes. The example uses FlashArray PVC, but the same steps work for FlashBlade PVCs.
-
Edit the PVC specification:
Run the following command to open the PVC specification for editing. This step allows you to modify the PVC's configuration to reflect the required storage size.
kubectl edit pvc <pvc-name> -n <pvc-namespace>
-
Modify the
storage
field:Locate the
resources.requests.storage
field in thespec
section and update it to the desired storage size. This change specifies the new storage capacity for the PVC. For example, update thestorage
to the desired capacity:spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
storageClassName: sc-portworx-fa-direct-access
volumeMode: Filesystem
volumeName: pvc-7ba7c112-xxxx-xxxx -
Save and apply changes:
Save and exit the editor. Kubernetes will trigger a resize operation based on the new request.