Recovering from failure when expanding volumes
If a resize request fails or remains in a pending state, you can try again by entering a different resize value in .spec.resources.requests.storage for the persistent volume claim (PVC). The new value must be larger than the original volume size.
If entering another smaller resize value in .spec.resources.requests.storage for the PVC does not work, use the following procedure to recover.
-
Mark the persistent volume (PV) that is bound to the PVC with the
Retainreclaim policy. Change thepersistentVolumeReclaimPolicyfield toRetain. -
Delete the PVC.
-
Manually edit the PV and delete the
claimRefentry from the PV specification to ensure that the newly created PVC can bind to the PV markedRetain. This marks the PV asAvailable. -
Recreate the PVC in a smaller size, or a size that can be allocated by the underlying storage provider.
-
Set the
volumeNamefield of the PVC to the name of the PV. This binds the PVC to the provisioned PV only. -
Restore the reclaim policy on the PV.