diff --git a/modules/storage-expanding-csi-volumes.adoc b/modules/storage-expanding-csi-volumes.adoc index b5b62c7733..d6dba0f891 100644 --- a/modules/storage-expanding-csi-volumes.adoc +++ b/modules/storage-expanding-csi-volumes.adoc @@ -10,15 +10,11 @@ You can use the Container Storage Interface (CSI) to expand storage volumes after they have already been created. -CSI volume expansion does not support the following: - -* Recovering from failure when expanding volumes - -* Shrinking +Shrinking persistent volumes (PVs) is _not_ supported. .Prerequisites -* The underlying CSI driver supports resize. +* The underlying CSI driver supports resize. See "CSI drivers supported by {product-title}" in the "Additional Resources" section. * Dynamic provisioning is used. @@ -28,4 +24,4 @@ CSI volume expansion does not support the following: . For the persistent volume claim (PVC), set `.spec.resources.requests.storage` to the desired new size. -. Watch the `status.conditions` field of the PVC to see if the resize has completed. {product-title} adds the `Resizing` condition to the PVC during expansion, which is removed after expansion completes. +. Watch the `status.conditions` field of the PVC to see if the resize has completed. {product-title} adds the `Resizing` condition to the PVC during expansion, which is removed after expansion completes. diff --git a/modules/storage-expanding-recovering-failure.adoc b/modules/storage-expanding-recovering-failure.adoc index c51c699d66..64b0ccb8dc 100644 --- a/modules/storage-expanding-recovering-failure.adoc +++ b/modules/storage-expanding-recovering-failure.adoc @@ -7,13 +7,21 @@ [id="expanding-recovering-from-failure_{context}"] = Recovering from failure when expanding volumes -If expanding underlying storage fails, the {product-title} administrator can manually recover the persistent volume claim (PVC) state and cancel the resize requests. Otherwise, the resize requests are continuously retried by the controller. +If a resize request fails or remains in a pending state, you can try again by entering a different resize value in `.spec.resources.requests.storage` for the persistent volume claim (PVC). The new value must be larger than the original volume size. + +If you are still having issues, use the following procedure to recover. .Procedure +If entering another smaller resize value in `.spec.resources.requests.storage` for the PVC does not work, do the following: + +. Mark the persistent volume (PV) that is bound to the PVC with the `Retain` reclaim policy. Change `persistentVolumeReclaimPolicy` to `Retain`. -. Mark the persistent volume (PV) that is bound to the PVC with the `Retain` reclaim policy. This can be done by editing the PV and changing `persistentVolumeReclaimPolicy` to `Retain`. . Delete the PVC. + . Manually edit the PV and delete the `claimRef` entry from the PV specs to ensure that the newly created PVC can bind to the PV marked `Retain`. This marks the PV as `Available`. + . Re-create the PVC in a smaller size, or a size that can be allocated by the underlying storage provider. + . Set the `volumeName` field of the PVC to the name of the PV. This binds the PVC to the provisioned PV only. + . Restore the reclaim policy on the PV. diff --git a/storage/expanding-persistent-volumes.adoc b/storage/expanding-persistent-volumes.adoc index f88ba30814..fd2afcac14 100644 --- a/storage/expanding-persistent-volumes.adoc +++ b/storage/expanding-persistent-volumes.adoc @@ -23,6 +23,8 @@ include::modules/storage-expanding-recovering-failure.adoc[leveloffset=+1] endif::openshift-enterprise,openshift-webscale,openshift-origin[] [role="_additional-resources"] -.Additional resources +[id="additional-resources_{context}"] +== Additional resources +* xref:../storage/expanding-persistent-volumes.adoc#add-volume-expansion_expanding-persistent-volumes[Enabling volume expansion support] -* The controlling `StorageClass` object has `allowVolumeExpansion` set to `true` (see xref:../storage/expanding-persistent-volumes.adoc#add-volume-expansion_expanding-persistent-volumes[Enabling volume expansion support]). \ No newline at end of file +* xref:../storage/container_storage_interface/persistent-storage-csi.adoc#csi-drivers-supported_persistent-storage-csi[CSI drivers supported by {product-title}] \ No newline at end of file