尝试扩展 Block Storage for VPC 卷时,为什么会收到 Volume not attached 错误?
排查无法挂载到 Pod 的块存储卷的问题。
虚拟私有云
编辑 Block Storage for VPC 并更新 spec.resources.requests.storage 部分以扩展卷时,会出现以下错误:
Volume not attached
您试图扩展现有 Block Storage for VPC PVC 的卷大小,但该 PVC 未被 pod 挂载。 只能展开由应用程序 pod 安装的卷。
验证 PVC 是否支持卷扩展,然后创建使用 PVC 的应用程序 pod。
-
说明现有的 PVC 并验证
allowVolumeExpansion是否设置为true。oc describe pvc <pvc-name> -
创建使用 PVC 的应用程序 pod 并将其部署到集群。
-
编辑 PVC 并增大
spec.resources.requests.storage字段中的值。oc edit pvc <pvc-name> -
获取 PVC 的详细信息,并记录 PV 名称。
oc get pvc <pvc-name> -
描述您的 PV 并记下卷 ID。
oc describe PV -
获取 Block Storage for VPC 卷的详细信息并验证容量。
ibmcloud is vol <volume-ID>