IBM Cloud Docs
Why do I get a Volume not attached error when trying to expand a Block Storage for VPC volume?

Why do I get a Volume not attached error when trying to expand a Block Storage for VPC volume?

Virtual Private Cloud

When you edit a Block Storage for VPC and update the spec.resources.requests.storage section to expand your volume, you see the following error:

Volume not attached

You tried to expand the volume size of an existing Block Storage for VPC PVC that is not mounted by a pod. Only volumes mounted by app pods can be expanded.

Verify that your PVC supports volume expansion, then create an app pod that uses your PVC.

  1. Describe your existing PVC. Verify that allowVolumeExpansion is set to true.

    kubectl describe pvc <pvc-name>
    
  2. Create an app pod that uses your PVC and deploy it to your cluster.

  3. Edit the PVC and increase the value in the spec.resources.requests.storage field.

    kubectl edit pvc <pvc-name>
    
  4. Get the details of your PVC and make a note of the PV name.

    kubectl get pvc <pvc-name>
    
  5. Describe your PV and make a note of the volume ID

    kubectl describe PV
    
  6. Get the details of your Block Storage for VPC volume and verify the capacity.

    ibmcloud is vol <volume-ID>