You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`snapshotHandle`is the unique identifier of the volume snapshot created on the storage backend. This field is required for the pre-provisioned snapshots. It specifies the CSI snapshot id on the storage system that this `VolumeSnapshotContent` represents.
150
152
153
+
`sourceVolumeMode`is the mode of the volume whose snapshot is taken. The value
154
+
of the `sourceVolumeMode` field can be either `Filesystem` or `Block`. If the
155
+
source volume mode is not specified, Kubernetes treats the snapshot as if the
156
+
source volume's mode is unknown.
157
+
158
+
## Converting the volume mode of a Snapshot {#convert-volume-mode}
159
+
160
+
If the `VolumeSnapshots` API installed on your cluster supports the `sourceVolumeMode`
161
+
field, then the API has the capability to prevent unauthorized users from converting
162
+
the mode of a volume.
163
+
164
+
To check if your cluster has capability for this feature, run the following command:
165
+
166
+
```yaml
167
+
$ kubectl get crd volumesnapshotcontent -o yaml
168
+
```
169
+
170
+
If you want to allow users to create a `PersistentVolumeClaim` from an existing
171
+
`VolumeSnapshot`, but with a different volume mode than the source, the annotation
172
+
`snapshot.storage.kubernetes.io/allowVolumeModeChange: "true"`needs to be added to
173
+
the `VolumeSnapshotContent` that corresponds to the `VolumeSnapshot`.
174
+
175
+
For pre-provisioned snapshots, `Spec.SourceVolumeMode` needs to be populated
176
+
by the cluster administrator.
177
+
178
+
An example `VolumeSnapshotContent` resource with this feature enabled would look like:
0 commit comments