Warning ExternalExpanding persistentvolumeclaim/peer##-###-##-## Ignoring the PVC: didn’t find a plugin capable of expanding the volume; waiting for an external controller to process this PVC.Warning VolumeResizeFailed persistentvolumeclaim/… resize volume "<volume-id>" by resizer "csi.vsphere.vmware.com" failed: rpc error: code = FailedPrecondition desc = volume: <volume-id> with existing snapshots […] can’t be expanded.Please delete snapshots before expanding the volume
Tanzu Kubernetes Multicloud
vSphere with Tanzu
vSphere CSI Plugin
Openshift
Rancher
When a vSphere PV has one or more existing snapshots at the vCenter or datastore level, the vSphere CSI controller cannot perform an online filesystem expansion. These snapshots may have been created previously by Velero or another backup mechanism. The CSI driver’s precondition check blocks any expansion until all underlying snapshots are removed.
Note: Make sure to validate a healthy backup of the PVC before performing the below steps, as incorrect use of this procedure may lead to data loss or corruption. If you are not sure what you are doing, please open a case with VMware/Broadcom Support.
To resolve the issue, delete the PV snapshot via the vSAN Managed Object Browser (MOB) CnsVolumeManager.
Step 1: Identify the Affected Volume and Snapshot IDs
/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgresSELECT snapshot_id, volume_id, description FROM cns.vpx_storage_snapshot_info WHERE volume_id = '<volume-id>';
Step 2: Start the vSAN MOB
rvcvsan.debug.mob --start localhost
Step 3: Delete the Snapshot via CnsVolumeManager
https://<vcenter-fqdn>/vsan/mob/?moid=cns-volume-manager<!-- snapshotDeleteSpecs array start -->
<snapshotDeleteSpecs>
<volumeId>
<id><VOLUME_ID></id>
</volumeId>
<snapshotId>
<id><SNAPSHOT_ID></id>
</snapshotId>
</snapshotDeleteSpecs>
<!-- array end -->
Step 4: Try PVC Expansion from Kubernetes cluster.
Impact/Risks:
If the delete of the persistent volume from a Kubernetes node is performed directly in the vSphere Web Client rather than via the CnsVolumeManager then it may introduce data integrity issues, as CNS will not be aware of the change applied to the First Class Disk (FCD) object.
For more information to collect CSI logs refer to the official Broadcom KB: https://knowledge.broadcom.com/external/article/379178/basic-troubleshooting-and-retrieving-log.html