diff --git a/modules/storage-expanding-add-volume-expansion.adoc b/modules/storage-expanding-add-volume-expansion.adoc index c4f47a5e17c5..b2bfc9be8964 100644 --- a/modules/storage-expanding-add-volume-expansion.adoc +++ b/modules/storage-expanding-add-volume-expansion.adoc @@ -7,8 +7,8 @@ [id="add-volume-expansion_{context}"] = Enabling volume expansion support -Before you can expand persistent volumes, the `StorageClass` object must -have the `allowVolumeExpansion` field set to `true`. +[role="_abstract"] +Before you can expand persistent volumes, the `StorageClass` object must have the `allowVolumeExpansion` field set to `true`. .Procedure @@ -16,13 +16,14 @@ have the `allowVolumeExpansion` field set to `true`. + [source,terminal] ---- -$ oc edit storageclass <1> +$ oc edit storageclass ---- -<1> Specifies the name of the storage class. + -The following example demonstrates adding this line at the bottom -of the storage class configuration. +Enter the name of storage class in ``. + +The following example shows adding this line at the bottom of the storage class configuration. ++ +.Example storage class YAML file with `allowVolumeExpansion` field set to `true` [source,yaml] ---- apiVersion: storage.k8s.io/v1 @@ -31,7 +32,7 @@ kind: StorageClass parameters: type: gp2 reclaimPolicy: Delete -allowVolumeExpansion: true <1> +allowVolumeExpansion: true ---- -<1> Setting this attribute to `true` allows PVCs to be -expanded after creation. ++ +* `parameters.allowVolumeExpansion`: Setting this field to `true` allows persistent volume claims (PVCs) to be expanded after creation. diff --git a/modules/storage-expanding-csi-volumes.adoc b/modules/storage-expanding-csi-volumes.adoc index 3e29dc4e9ed4..34a88c9e9ca3 100644 --- a/modules/storage-expanding-csi-volumes.adoc +++ b/modules/storage-expanding-csi-volumes.adoc @@ -3,25 +3,30 @@ // * storage/expanding-persistent-volumes.adoc //* microshift_storage/expanding-persistent-volumes-microshift.adoc - :_mod-docs-content-type: PROCEDURE [id="expanding-csi-volumes_{context}"] = Expanding CSI volumes +[role="_abstract"] You can use the Container Storage Interface (CSI) to expand storage volumes after they have already been created. Shrinking persistent volumes (PVs) is _not_ supported. .Prerequisites -* The underlying CSI driver supports resize. See "CSI drivers supported by {product-title}" in the "Additional resources" section. +* The underlying CSI driver supports resize. ++ +For information about which CSI drivers support resizing, see under the _Additional resources_ section "CSI drivers supported by {product-title}". * Dynamic provisioning is used. -* The controlling `StorageClass` object has `allowVolumeExpansion` set to `true`. For more information, see "Enabling volume expansion support." +* The controlling `StorageClass` object has `allowVolumeExpansion` set to `true`. ++ +For more information, see section _Enabling volume expansion support_. .Procedure -. For the persistent volume claim (PVC), set `.spec.resources.requests.storage` to the desired new size. +* 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. +.Verification +To confirm that the resize is finished, look at the `status.conditions` field of the PVC . {product-title} adds the `Resizing` condition to the PVC during expansion, which is removed after expansion completes. diff --git a/modules/storage-expanding-filesystem-pvc.adoc b/modules/storage-expanding-filesystem-pvc.adoc index 3a18bcc733ce..f37665174843 100644 --- a/modules/storage-expanding-filesystem-pvc.adoc +++ b/modules/storage-expanding-filesystem-pvc.adoc @@ -7,28 +7,32 @@ [id="expanding-pvc-filesystem_{context}"] = Expanding persistent volume claims (PVCs) with a file system +[role="_abstract"] ifndef::microshift,openshift-rosa,openshift-rosa-hcp[] -Expanding PVCs based on volume types that need file system resizing, such as GCE, EBS, and Cinder, is a two-step process. First, expand the volume objects in the cloud provider. Second, expand the file system on the node. +Expanding PVCs based on volume types that need file system resizing, such as Google Cloud Platform (GCP) persistent disk (PD), AWS Elastic Block Storage (EBS), and Cinder, is a two-step process. First, expand the volume objects in the cloud provider. Second, expand the file system on the node. endif::microshift,openshift-rosa,openshift-rosa-hcp[] ifdef::microshift[] -Expanding PVCs based on volume types that need file system resizing, such as GCE Persistent Disk volumes (gcePD), AWS Elastic Block Store EBS (EBS), and Cinder, is a two-step process. First, expand the volume objects in the cloud provider. Second, expand the file system on the node. +Expanding PVCs based on volume types that need file system resizing, such as Google Cloud Platform (GCP) persistent disk (PD), AWS Elastic Block Store EBS (EBS), and Cinder, is a two-step process. First, expand the volume objects in the cloud provider. Second, expand the file system on the node. endif::microshift[] ifdef::openshift-rosa,openshift-rosa-hcp[] -Expanding PVCs based on volume types that need file system resizing, such as AWS Elastic Block Store EBS (EBS) is a two-step process. First, expand the volume objects in the cloud provider. Second, expand the file system on the node. +Expanding PVCs based on volume types that need file system resizing, such as AWS Elastic Block Store (EBS) is a two-step process. First, expand the volume objects in the cloud provider. Second, expand the file system on the node. endif::openshift-rosa,openshift-rosa-hcp[] Expanding the file system on the node only happens when a new pod is started with the volume. .Prerequisites -* The controlling `StorageClass` object must have `allowVolumeExpansion` set to `true`. +* The controlling storage class has the `allowVolumeExpansion` field set to `true`. ++ +For more information, see section _Enabling volume expansion support_. .Procedure -. Edit the PVC and request a new size by editing `spec.resources.requests`. For example, the following expands the `ebs` PVC to 8 Gi: +* Edit the PVC and request a new size by editing `spec.resources.requests`. For example, the following expands the `ebs` PVC to 8 Gi: + +.Example PVC YAML file [source,yaml] ---- kind: PersistentVolumeClaim @@ -41,16 +45,23 @@ spec: - ReadWriteOnce resources: requests: - storage: 8Gi <1> + storage: 8Gi ---- [.small] -<1> Updating `spec.resources.requests` to a larger amount expands the PVC. ++ +* `spec.resources.requests`: Updating this field to a larger amount expands the PVC. -. After the cloud provider object has finished resizing, the PVC is set to `FileSystemResizePending`. Check the condition by entering the following command: +.Verification +After the cloud provider object has finished resizing, the PVC is set to `FileSystemResizePending`. + +* Check the condition by running the following command: + [source,terminal] ---- $ oc describe pvc ---- -. When the cloud provider object has finished resizing, the `PersistentVolume` object reflects the newly requested size in `PersistentVolume.Spec.Capacity`. At this point, you can create or recreate a new pod from the PVC to finish the file system resizing. Once the pod is running, the newly requested size is available and the `FileSystemResizePending` condition is removed from the PVC. +.Next steps +When the cloud provider object has finished resizing, the `PersistentVolume` object reflects the newly requested size in `PersistentVolume.Spec.Capacity`. + +You can now create or recreate a new pod from the PVC to finish the file system resizing. After the pod is running, the newly requested size is available and the `FileSystemResizePending` condition is removed from the PVC. diff --git a/modules/storage-expanding-flexvolume.adoc b/modules/storage-expanding-flexvolume.adoc index f43436f2f81f..290c0b4c941f 100644 --- a/modules/storage-expanding-flexvolume.adoc +++ b/modules/storage-expanding-flexvolume.adoc @@ -3,35 +3,42 @@ // * storage/expanding-persistent-volumes.adoc //* microshift_storage/expanding-persistent-volumes-microshift.adoc - :_mod-docs-content-type: PROCEDURE [id="expanding-flexvolume_{context}"] = Expanding FlexVolume with a supported driver -When using FlexVolume to connect to your back-end storage system, you can expand persistent storage volumes after they have already been created. This is done by manually updating the persistent volume claim (PVC) in {product-title}. - -FlexVolume allows expansion if the driver is set with `RequiresFSResize` to `true`. The FlexVolume can be expanded on pod restart. +[role="_abstract"] +When using FlexVolume to connect to your back-end storage system, you can expand persistent storage volumes after they have already been created. You do this by manually updating the persistent volume claim (PVC) in {product-title}. Similar to other volume types, FlexVolume volumes can also be expanded when in use by a pod. .Prerequisites -* The underlying volume driver supports resize. -* The driver is set with the `RequiresFSResize` capability to `true`. +* The underlying volume driver supports resize. ++ +For information about which CSI drivers support resizing, see under the _Additional resources_ section "CSI drivers supported by {product-title}". + +* The driver is set with the `RequiresFSResize` capability to `true`. The FlexVolume can then be expanded after restarting the pod. + * Dynamic provisioning is used. + * The controlling `StorageClass` object has `allowVolumeExpansion` set to `true`. ++ +For more information, see section _Enabling volume expansion support_. .Procedure * To use resizing in the FlexVolume plugin, you must implement the `ExpandableVolumePlugin` interface using these methods: -`RequiresFSResize`:: +** `RequiresFSResize` ++ If `true`, updates the capacity directly. If `false`, calls the `ExpandFS` method to finish the filesystem resize. -`ExpandFS`:: +** `ExpandFS` ++ If `true`, calls `ExpandFS` to resize filesystem after physical volume expansion is done. The volume driver can also perform physical volume resize together with filesystem resize. [IMPORTANT] ==== -Because {product-title} does not support installation of FlexVolume plugins on control plane nodes, it does not support control-plane expansion of FlexVolume. +Because {product-title} does not support installation of FlexVolume plugins on control plane nodes, it does not support control plane expansion of FlexVolume. ==== diff --git a/modules/storage-expanding-local-volumes.adoc b/modules/storage-expanding-local-volumes.adoc index b868a5b50697..cbd85f29a91c 100644 --- a/modules/storage-expanding-local-volumes.adoc +++ b/modules/storage-expanding-local-volumes.adoc @@ -3,11 +3,11 @@ // * storage/expanding-persistent-volumes.adoc //* microshift_storage/expanding-persistent-volumes-microshift.adoc - :_mod-docs-content-type: PROCEDURE [id="expanding-local-volumes_{context}"] = Expanding local volumes +[role="_abstract"] You can manually expand persistent volumes (PVs) and persistent volume claims (PVCs) created by using the local storage operator (LSO). .Procedure diff --git a/modules/storage-expanding-recovering-failure.adoc b/modules/storage-expanding-recovering-failure.adoc index 64b0ccb8dc53..49c7e706d61d 100644 --- a/modules/storage-expanding-recovering-failure.adoc +++ b/modules/storage-expanding-recovering-failure.adoc @@ -7,6 +7,7 @@ [id="expanding-recovering-from-failure_{context}"] = Recovering from failure when expanding volumes +[role="_abstract"] 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.