IBM Cloud Docs
Why can't I delete my File Storage for VPC snapshot to a PVC?

Why can't I delete my File Storage for VPC snapshot to a PVC?

Virtual Private Cloud

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-file-1
      
    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, complete the following steps:

    1. Find the volumesnapshotcontent object that does 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" } ]'
      
    4. 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.