
If you are not familiar with the oc command, refer to OpenShift - Getting Started with the oc command.
This assumes you have already created one or more Volume Snapshots. Check out my article OpenShift - Getting Started with Volume Snapshots.
The oc get VolumeSnapshots command can be used to list Volume Snapshots. It is important to recognize that the Volume Snapshot does not actually contain the content of the volume. Instead, the Volume Snapshot Content (more on this in a moment) contains the actual content of the volume. The Volume Snapshot is like the parent resource that ultimately attempts to create the Volume Snapshot Content.
]$ oc get volumesnapshots --namespace my-project
NAME READYTOUSE SOURCEPVC SOURCESNAPSHOTCONTENT RESTORESIZE SNAPSHOTCLASS SNAPSHOTCONTENT CREATIONTIME AGE
my-volume-snapshot true my-pvc 1Gi csi-vsphere-vsc snapcontent-d1e3b556-fb07-40b9-b032-976c9b5a84d7 6m8s 6m12s
And the oc get VolumeSnapshotContent command can be used to list the Volume Snapshot Contents that have been taken.
]$ oc get volumesnapshotcontent --namespace my-project
NAME READYTOUSE RESTORESIZE DELETIONPOLICY DRIVER VOLUMESNAPSHOTCLASS VOLUMESNAPSHOT VOLUMESNAPSHOTNAMESPACE AGE
snapcontent-d1e3b556-fb07-40b9-b032-976c9b5a84d7 true 1073741824 Delete csi.vsphere.vmware.com csi-vsphere-vsc my-volume-snapshot my-project 7m45s
Did you find this article helpful?
If so, consider buying me a coffee over at