如何手动调整 IBM Cloud File / Block Storage 支持的 PVC 的大小?

How do I manually resize a PVC backed by IBM Cloud File / Block Storage?

假设我正在托管使用我的 pvc 的 pod。我的 pvc 只配置了 10 Gi 的存储空间,所以我的 pod 最终崩溃了,因为它用完了磁盘 space。此时,如何添加更多space?

最好不丢数据

我知道 allowVolumeExpansion https://kubernetes.io/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims,但我不认为我的云提供商的存储 类 ibm.io/ibmc-fileibm.io/ibmc-blockvpc.block.csi.ibm.io 支持此功能。

据我所知,这在 ibm.io/ibmc-block

上是不可能的

这是 Storing data on classic IBM Cloud Block Storage 的文档。

Deciding on the block storage configuration部分我们可以找到:

Important:

Make sure to choose your storage configuration carefully to have enough capacity to store your data. After you provision a specific type of storage by using a storage class, you cannot change the size, type, IOPS, or retention policy for the storage device. If you need more storage or storage with a different configuration, you must create a new storage instance and copy the data from the old storage instance to your new one.

然而,这似乎适用于 ibm.io/ibmc-file,其中提到 here:

Important:

After you provision a specific type of storage by using a storage class, you cannot change the type, or retention policy for the storage device. However, you can change the size and the IOPS if you want to increase your storage capacity and performance. To change the type and retention policy for your storage, you must create a new storage instance and copy the data from the old storage instance to your new one.

这是描述Changing the size and IOPS of your existing storage device

您可以使用预期存储 space 更新 .resources.requests.storage 字段。

要更新你可以运行:

$ kubectl edit pvc <pvc_name>

您可以通过 运行ning 验证:

$ kubectl get pvc <pvc_name> -o yaml

这应该可以为您完成工作。

参考:Resizing Persistent Volumes using Kubernetes

很抱歉造成这种混乱。您也可以更改块存储的大小和 IOPS。请参阅此处 link:https://cloud.ibm.com/docs/containers?topic=containers-block_storage#block_change_storage_configuration

我们将更新注释。