1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00

OSDOCS-9508# Change max snapshot for vSphere

This commit is contained in:
Lisa Pettyjohn
2024-04-05 09:42:34 -04:00
committed by openshift-cherrypick-robot
parent 4a7e6b5511
commit f22b0eae88
3 changed files with 136 additions and 0 deletions

View File

@@ -0,0 +1,127 @@
// Module included in the following assemblies:
//
// * storage/persistent_storage/persistent-storage-vsphere.adoc
// * storage/persistent_storage/persistent-storage-csi-snapshots.adoc
:_mod-docs-content-type: PROCEDURE
[id="vsphere-change-max-snapshot_{context}"]
= Changing the maximum number of snapshots for vSphere
The default maximum number of snapshots per volume in vSphere Container Storage Interface (CSI) is 3. You can change the maximum number up to 32 per volume.
However, be aware that increasing the snapshot maximum involves a performance trade off, so for better performance use only 2 to 3 snapshots per volume.
For more VMWare snapshot performance recommendations, see *_Additional Resources_*.
.Prerequisites
* Access to the cluster with administrator rights.
.Procedure
. Check the current config map by the running the following command:
+
[source, terminal]
----
$ oc -n openshift-cluster-csi-drivers get cm/vsphere-csi-config -o yaml
----
+
.Example output
+
[source, terminal]
----
apiVersion: v1
data:
cloud.conf: |+
# Labels with topology values are added dynamically via operator
[Global]
cluster-id = vsphere-01-cwv8p
[VirtualCenter "vcenter.openshift.com"]
insecure-flag = true
datacenters = DEVQEdatacenter
migration-datastore-url = ds:///vmfs/volumes/vsan:527320283a8c3163-2faa6dc5949a3a28/
kind: ConfigMap
metadata:
creationTimestamp: "2024-03-06T09:46:40Z"
name: vsphere-csi-config
namespace: openshift-cluster-csi-drivers
resourceVersion: "126687"
----
+
In this example, the global maximum number of snapshots is not configured, so the default value of 3 is applied.
. Change the snapshot limit by running the following command:
+
* Set *global* snapshot limit:
+
[source, terminal]
----
$ oc patch clustercsidriver/csi.vsphere.vmware.com --type=merge -p '{"spec":{"driverConfig":{"vSphere":{"globalMaxSnapshotsPerBlockVolume": 10}}}}'
clustercsidriver.operator.openshift.io/csi.vsphere.vmware.com patched
----
+
In this example, the global limit is being changed to 10 (`globalMaxSnapshotsPerBlockVolume` set to 10).
* Set *Virtual Volume* snapshot limit:
+
This parameter sets the limit on the Virtual Volumes datastore only. The Virtual Volume maximum snapshot limit overrides the global constraint if set, but defaults to the global limit if it is not set.
+
[source, terminal]
----
$ oc patch clustercsidriver/csi.vsphere.vmware.com --type=merge -p '{"spec":{"driverConfig":{"vSphere":{"granularMaxSnapshotsPerBlockVolumeInVVOL": 5}}}}'
clustercsidriver.operator.openshift.io/csi.vsphere.vmware.com patched
----
+
In this example, the Virtual Volume limit is being changed to 5 (`granularMaxSnapshotsPerBlockVolumeInVVOL` set to 5).
* Set *vSAN* snapshot limit:
+
This parameter sets the limit on the vSAN datastore only. The vSAN maximum snapshot limit overrides the global constraint if set, but defaults to the global limit if it is not set. You can set a maximum value of 32 under vSAN ESA setup.
+
[source, terminal]
----
$ oc patch clustercsidriver/csi.vsphere.vmware.com --type=merge -p '{"spec":{"driverConfig":{"vSphere":{"granularMaxSnapshotsPerBlockVolumeInVSAN": 7}}}}'
clustercsidriver.operator.openshift.io/csi.vsphere.vmware.com patched
----
+
In this example, the vSAN limit is being changed to 7 (`granularMaxSnapshotsPerBlockVolumeInVSAN` set to 7).
.Verification
* Verify that any changes you made are reflected in the config map by running the following command:
+
[source, terminal]
----
$ oc -n openshift-cluster-csi-drivers get cm/vsphere-csi-config -o yaml
----
+
.Example output
+
[source, terminal]
----
apiVersion: v1
data:
cloud.conf: |+
# Labels with topology values are added dynamically via operator
[Global]
cluster-id = vsphere-01-cwv8p
[VirtualCenter "vcenter.openshift.com"]
insecure-flag = true
datacenters = DEVQEdatacenter
migration-datastore-url = ds:///vmfs/volumes/vsan:527320283a8c3163-2faa6dc5949a3a28/
[Snapshot]
global-max-snapshots-per-block-volume = 10 <1>
kind: ConfigMap
metadata:
creationTimestamp: "2024-03-06T09:46:40Z"
name: vsphere-csi-config
namespace: openshift-cluster-csi-drivers
resourceVersion: "127118"
uid: f6968303-81d8-4048-99c1-d8211363d0fa
----
<1> `global-max-snapshots-per-block-volume` is now set to 10.

View File

@@ -21,3 +21,8 @@ include::modules/persistent-storage-csi-snapshots-create.adoc[leveloffset=+1]
include::modules/persistent-storage-csi-snapshots-delete.adoc[leveloffset=+1]
include::modules/persistent-storage-csi-snapshots-restore.adoc[leveloffset=+1]
include::modules/persistent-storage-csi-vsphere-change-max-snapshot.adoc[leveloffset=+1]
== Additional resources
* link:https://kb.vmware.com/s/article/1025279[Best practices for using VMware snapshots in the vSphere environment]

View File

@@ -96,5 +96,9 @@ include::modules/persistent-storage-csi-vsphere-top-aware-infra-top.adoc[levelof
include::modules/persistent-storage-csi-vsphere-top-aware-results.adoc[leveloffset=+2]
include::modules/persistent-storage-csi-vsphere-change-max-snapshot.adoc[leveloffset=+1]
== Additional resources
* xref:../../storage/container_storage_interface/persistent-storage-csi.adoc#persistent-storage-csi[Configuring CSI volumes]
* link:https://kb.vmware.com/s/article/1025279[Best practices for using VMware snapshots in the vSphere environment]