Skip to content

Commit fa01007

Browse files
authored
Merge pull request #74295 from lpettyjo/OSDOCS-9508
OSDOCS-9508# Change max snapshot for vSphere
2 parents 02f9ba5 + c64494a commit fa01007

File tree

3 files changed

+136
-0
lines changed

3 files changed

+136
-0
lines changed
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * storage/persistent_storage/persistent-storage-vsphere.adoc
4+
// * storage/persistent_storage/persistent-storage-csi-snapshots.adoc
5+
6+
:_mod-docs-content-type: PROCEDURE
7+
[id="vsphere-change-max-snapshot_{context}"]
8+
= Changing the maximum number of snapshots for vSphere
9+
10+
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.
11+
12+
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.
13+
14+
For more VMWare snapshot performance recommendations, see *_Additional Resources_*.
15+
16+
.Prerequisites
17+
18+
* Access to the cluster with administrator rights.
19+
20+
.Procedure
21+
22+
. Check the current config map by the running the following command:
23+
+
24+
[source, terminal]
25+
----
26+
$ oc -n openshift-cluster-csi-drivers get cm/vsphere-csi-config -o yaml
27+
----
28+
+
29+
.Example output
30+
+
31+
[source, terminal]
32+
----
33+
apiVersion: v1
34+
data:
35+
cloud.conf: |+
36+
# Labels with topology values are added dynamically via operator
37+
[Global]
38+
cluster-id = vsphere-01-cwv8p
39+
40+
[VirtualCenter "vcenter.openshift.com"]
41+
insecure-flag = true
42+
datacenters = DEVQEdatacenter
43+
migration-datastore-url = ds:///vmfs/volumes/vsan:527320283a8c3163-2faa6dc5949a3a28/
44+
45+
kind: ConfigMap
46+
metadata:
47+
creationTimestamp: "2024-03-06T09:46:40Z"
48+
name: vsphere-csi-config
49+
namespace: openshift-cluster-csi-drivers
50+
resourceVersion: "126687"
51+
----
52+
+
53+
In this example, the global maximum number of snapshots is not configured, so the default value of 3 is applied.
54+
55+
. Change the snapshot limit by running the following command:
56+
+
57+
* Set *global* snapshot limit:
58+
+
59+
[source, terminal]
60+
----
61+
$ oc patch clustercsidriver/csi.vsphere.vmware.com --type=merge -p '{"spec":{"driverConfig":{"vSphere":{"globalMaxSnapshotsPerBlockVolume": 10}}}}'
62+
clustercsidriver.operator.openshift.io/csi.vsphere.vmware.com patched
63+
----
64+
+
65+
In this example, the global limit is being changed to 10 (`globalMaxSnapshotsPerBlockVolume` set to 10).
66+
67+
* Set *Virtual Volume* snapshot limit:
68+
+
69+
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.
70+
+
71+
[source, terminal]
72+
----
73+
$ oc patch clustercsidriver/csi.vsphere.vmware.com --type=merge -p '{"spec":{"driverConfig":{"vSphere":{"granularMaxSnapshotsPerBlockVolumeInVVOL": 5}}}}'
74+
clustercsidriver.operator.openshift.io/csi.vsphere.vmware.com patched
75+
----
76+
+
77+
In this example, the Virtual Volume limit is being changed to 5 (`granularMaxSnapshotsPerBlockVolumeInVVOL` set to 5).
78+
79+
* Set *vSAN* snapshot limit:
80+
+
81+
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.
82+
+
83+
[source, terminal]
84+
----
85+
$ oc patch clustercsidriver/csi.vsphere.vmware.com --type=merge -p '{"spec":{"driverConfig":{"vSphere":{"granularMaxSnapshotsPerBlockVolumeInVSAN": 7}}}}'
86+
clustercsidriver.operator.openshift.io/csi.vsphere.vmware.com patched
87+
----
88+
+
89+
In this example, the vSAN limit is being changed to 7 (`granularMaxSnapshotsPerBlockVolumeInVSAN` set to 7).
90+
91+
.Verification
92+
93+
* Verify that any changes you made are reflected in the config map by running the following command:
94+
+
95+
[source, terminal]
96+
----
97+
$ oc -n openshift-cluster-csi-drivers get cm/vsphere-csi-config -o yaml
98+
----
99+
+
100+
.Example output
101+
+
102+
[source, terminal]
103+
----
104+
apiVersion: v1
105+
data:
106+
cloud.conf: |+
107+
# Labels with topology values are added dynamically via operator
108+
[Global]
109+
cluster-id = vsphere-01-cwv8p
110+
111+
[VirtualCenter "vcenter.openshift.com"]
112+
insecure-flag = true
113+
datacenters = DEVQEdatacenter
114+
migration-datastore-url = ds:///vmfs/volumes/vsan:527320283a8c3163-2faa6dc5949a3a28/
115+
116+
[Snapshot]
117+
global-max-snapshots-per-block-volume = 10 <1>
118+
119+
kind: ConfigMap
120+
metadata:
121+
creationTimestamp: "2024-03-06T09:46:40Z"
122+
name: vsphere-csi-config
123+
namespace: openshift-cluster-csi-drivers
124+
resourceVersion: "127118"
125+
uid: f6968303-81d8-4048-99c1-d8211363d0fa
126+
----
127+
<1> `global-max-snapshots-per-block-volume` is now set to 10.

storage/container_storage_interface/persistent-storage-csi-snapshots.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,8 @@ include::modules/persistent-storage-csi-snapshots-create.adoc[leveloffset=+1]
2121
include::modules/persistent-storage-csi-snapshots-delete.adoc[leveloffset=+1]
2222

2323
include::modules/persistent-storage-csi-snapshots-restore.adoc[leveloffset=+1]
24+
25+
include::modules/persistent-storage-csi-vsphere-change-max-snapshot.adoc[leveloffset=+1]
26+
27+
== Additional resources
28+
* link:https://kb.vmware.com/s/article/1025279[Best practices for using VMware snapshots in the vSphere environment]

storage/container_storage_interface/persistent-storage-csi-vsphere.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,9 @@ include::modules/persistent-storage-csi-vsphere-top-aware-infra-top.adoc[levelof
9696

9797
include::modules/persistent-storage-csi-vsphere-top-aware-results.adoc[leveloffset=+2]
9898

99+
include::modules/persistent-storage-csi-vsphere-change-max-snapshot.adoc[leveloffset=+1]
100+
99101
== Additional resources
100102
* xref:../../storage/container_storage_interface/persistent-storage-csi.adoc#persistent-storage-csi[Configuring CSI volumes]
103+
104+
* link:https://kb.vmware.com/s/article/1025279[Best practices for using VMware snapshots in the vSphere environment]

0 commit comments

Comments
 (0)