IBM Cloud Docs
Why can't I delete my Block Storage for VPC volume snapshot resources?

Why can't I delete my Block Storage for VPC volume snapshot resources?

Infrastructure provider: VPC

When you try to remove your volumesnapshot and volumesnapshotcontents objects, the removal fails, but your volume snapshot object shows a ReadyToUse status as false.

There are finalizers preventing the resources from being removed.

Remove the finalizers and continue deleting the resources. Note that stale volumesnapshot and volumesnapshotcontents objects can cause unnecessary CreateSnapshot requests, which can eventually lead to request spamming.

If the volumesnapshot and volumesnapshotcontent objects are included as a single mapping, follow these steps.

  1. Delete the volumesnapshot and volumesnapshotcontent objects.
    kubectl delete volumesnapshot snapshot-csi-block-3
    
  2. Remove the finalizers section from the volumesnapshot resource.
    kubectl patch volumesnapshot/VOLUMESNAPSHOT --type json --patch='[ { "op": "remove", "path": "/metadata/finalizers" } ]'
    
  3. Remove the finalizers section from the volumesnapshotcontents resource.
    kubectl patch volumesnapshotcontent/snapcontent-VOLUMESNAPSHOTCONTENT --type json --patch='[ { "op": "remove", "path": "/metadata/finalizers" } ]'
    

If the volumesnapshot object is deleted, but volumesnapshotcontent object still exists, follow these steps to remove the volumesnapshotcontent object.

  1. Find volumesnapshotcontent object that do not have a ReadyToUse status as empty or false.
    kubectl get volumesnapshotcontents | egrep -v 'true'
    
  2. Delete the snapshot object.
    kubectl delete volumesnapshotcontent snapcontent-011b11d1-1101-4b11-b1b1-011abcde11db
    
  3. Remove the finalizer.
    kubectl patch volumesnapshotcontent/snapcontent-011b11d1-1101-4b11-b1b1-011abcde11db --type json --patch='[ { "op": "remove", "path": "/metadata/finalizers" } ]'
    

If the issue persists, contact support. Open a support case. In the case details, be sure to include any relevant log files, error messages, or command outputs.