為什麼我的區塊儲存 PVC 一直處於待定狀態?

虛擬私有雲 經典基礎架構

當您建立一個 PVC 並執行 oc get pvc <pvc_name>`` 時,即使等待了一段時間,該 PVC 仍會保持在 「待處理 」狀態。

在 PVC 建立和連結期間,File Storage 和 Block Storage 外掛程式會執行許多不同的作業。 每個作業都可能失敗並導致不同的錯誤訊息。

透過描述您的 PVC 和檢閱常見的錯誤訊息,找出根本原因。

  1. 描述 PVC 和狀態。

    oc describe pvc <pvc_name> -n <project>
    
  2. 檢閱一般錯誤訊息說明及解決方法。

儲存錯誤訊息
錯誤訊息 說明 解決的步驟
User doesn't have permissions to create or manage Storage
Failed to find any valid softlayer credentials in configuration file
Storage with the order ID %d could not be created after retrying for %d seconds.
Unable to locate datacenter with name <datacenter_name>.
儲存在您叢集 storage-secret-store Kubernetes 密碼中的 IAM API 金鑰或 IBM Cloud 基礎架構 API 金鑰,沒有佈建持續性儲存空間的所有必要許可權。 請參閱 PVC 建立因為遺漏許可權而失敗
Your order will exceed the maximum number of storage volumes allowed. Please contact Sales 每個 IBM Cloud 帳戶在建立時,皆會設定可建立的檔案儲存與區塊儲存實例的最大數量。 藉由建立 PVC,建立的實例數可超過上限儲存空間實例數。 如需更多關於您可以建立的最大磁碟區數量,以及如何擷取帳戶中的磁碟區數量的資訊,請參閱 檔案區塊 儲存的說明文件。

若要建立 PVC,請從下列選項中選擇。

  • 移除任何未使用的 PVC。
  • 透過開啟支援個案 ,要求 IBM Cloud 帳戶擁有者增加您的儲存配額。
Unable to find the exact ItemPriceIds for the specified storage
Failed to place storage order with the storage provider
您在 PVC 中指定的儲存容量和 IOPS 超出所選儲存類型的支援範圍,因此無法與指定的儲存類別搭配使用。 檢閱決定檔案儲存空間配置決定區塊儲存空間配置,以尋找要使用的儲存空間類別支援的儲存空間大小和 IOPS。 更正大小和 IOPS,然後重建 PVC。
無法在設定檔中找到資料中心名稱。 在 PVC 中指定的資料中心不存在。 執行 ibmcloud oc locations 以列出可用的資料中心。 更正 PVC 中的資料中心,然後重建 PVC。
Failed to place storage order with the storage provider
Storage with the order ID 12345 could not be created after retrying for xx seconds.
Failed to do subnet authorizations for the storage 12345.
Storage 12345 has ongoing active transactions and could not be completed after retrying for xx seconds.
儲存空間大小、IOPS 和儲存空間類別可能與您選擇的儲存空間類別不相容,或者 IBM Cloud 基礎架構 API 端點目前無法使用。 檢閱決定檔案儲存空間配置決定區塊儲存空間配置,以尋找要使用的儲存空間類別和儲存空間類型支援的儲存空間大小和 IOPS。 然後,刪除 PVC 並重建 PVC。
無法找到儲存空間 ID 為 12345 的儲存空間。 您希望使用 Kubernetes 靜態佈建來為現有儲存空間實例建立 PVC,但找不到指定的儲存空間實例。 遵循指示在叢集裡佈建現有檔案儲存空間區塊儲存空間,並確保擷取到現有儲存空間實例的正確資訊。 然後,刪除 PVC 並重建 PVC。
未提供儲存類型,預期儲存類型應為 EndurancePerformance 您建立了一個自訂的儲存類別,並指定了系統不支援的儲存類型。 請更新您自己的儲存類別,將儲存類型指定為「Endurance」或「Performance」。 若要尋找您自己儲存類別的範例,請參閱 檔案儲存區塊儲存 的範例儲存類別。
SoftLayer_Exception_User_Customer_Unauthorized: Invalid API key 當需要傳統基礎結構 API 金鑰時,您指定了 IAM API 金鑰。 或者,您指定的經典基礎結構 API 金鑰不存在。 請遵循「無效的 API 金鑰」中的指示

針對區塊儲存中持續處於「待處理」狀態的持久性卷聲明進行疑難排解。