6.2. Volume snapshot classes
Snapshotting is a CSI storage feature supported by LVMS. To enable dynamic snapshotting, at least one VolumeSnapshotClass configuration file must be present on the node.
重要
You must enable thin logical volumes to take logical volume snapshots.
Example VolumeSnapshotClass configuration file
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
name: topolvm-snapclass
annotations:
snapshot.storage.kubernetes.io/is-default-class: "true"
driver: topolvm.io
deletionPolicy: Delete
- 1
- Determines which
VolumeSnapshotClassconfiguration file to use when none is specified byVolumeSnapshot, which is a request for snapshot of a volume by a user. - 2
- Identifies which snapshot provisioner should manage the requests for snapshots of a volume by a user for this class.
- 3
- Determines whether
VolumeSnapshotContentobjects and the backing snapshots are kept or deleted when a boundVolumeSnapshotis deleted. Valid values areRetainorDelete.