1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/lvms-scaling-storage-expand-pvc.adoc
Prithviraj Patil 410b18981e Update lvms-scaling-storage-expand-pvc.adoc
- Needs to correct the command structure in Expanding a persistent volume claim.
- Here is the documentation link: https://docs.redhat.com/en/documentation/openshift_container_platform/4.16/html/storage/configuring-persistent-storage#lvms-scaling-expand-pvc_logical-volume-manager-storage

Here is the current documentation:

2. Update the value of the spec.resources.requests.storage field to a value that is greater than the current value by running the following command:
~~~
$ oc patch pvc <pvc_name> -n <application_namespace> \
--type=merge -p \ '{ "spec": { "resources": { "requests": { "storage": "<desired_size>" }}}}'
~~~

- In the above commands, the "- -" signs are incorrectly placed below the "$" symbol.
- However, they should be aligned parallel to the "oc" command, where the command begins.*

Here is the updated look:

2. Update the value of the spec.resources.requests.storage field to a value that is greater than the current value by running the following command:
~~~
$ oc patch pvc <pvc_name> -n <application_namespace> \  1
  --type=merge -p \ '{ "spec": { "resources": { "requests": { "storage": "<desired_size>" }}}}'
~~~

- The commands will work as it is, but the structure is incorrect.
- It should be standard format all over the documentation.
- Hence it needs to be changed.
2025-05-30 14:36:19 +00:00

42 lines
1.4 KiB
Plaintext

// Module included in the following assemblies:
//
// storage/persistent_storage/persistent_storage_local/persistent-storage-using-lvms.adoc
:_mod-docs-content-type: PROCEDURE
[id="lvms-scaling-expand-pvc_{context}"]
= Expanding a persistent volume claim
After scaling up the storage of a cluster, you can expand the existing persistent volume claims (PVCs).
To expand a PVC, you must update the `storage` field in the PVC.
.Prerequisites
* Dynamic provisioning is used.
* The `StorageClass` object associated with the PVC has the `allowVolumeExpansion` field set to `true`.
.Procedure
. Log in to the OpenShift CLI (`oc`).
. Update the value of the `spec.resources.requests.storage` field to a value that is greater than the current value by running the following command:
+
[source,terminal]
----
$ oc patch pvc <pvc_name> -n <application_namespace> \ <1>
--type=merge -p \ '{ "spec": { "resources": { "requests": { "storage": "<desired_size>" }}}}' <2>
----
<1> Replace `<pvc_name>` with the name of the PVC that you want to expand.
<2> Replace `<desired_size>` with the new size to expand the PVC.
.Verification
* To verify that resizing is completed, run the following command:
+
[source, terminal]
----
$ oc get pvc <pvc_name> -n <application_namespace> -o=jsonpath={.status.capacity.storage}
----
+
{lvms} adds the `Resizing` condition to the PVC during expansion. It deletes the `Resizing` condition after the PVC expansion.