為何在嘗試擴充 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>