11장. Volume Snapshots
A volume snapshot is the state of the storage volume in a cluster at a particular point in time. These snapshots help to use storage more efficiently by not having to make a full copy each time and can be used as building blocks for developing an application.
Volume snapshot class allows an administrator to specify different attributes belonging to a volume snapshot object. The OpenShift Data Foundation operator installs default volume snapshot classes depending on the platform in use. The operator owns and controls these default volume snapshot classes and they cannot be deleted or modified.
You can create many snapshots of the same persistent volume claim (PVC) but cannot schedule periodic creation of snapshots.
- For CephFS, you can create up to 100 snapshots per PVC.
- For RADOS Block Device (RBD), you can create up to 512 snapshots per PVC.
Persistent Volume encryption now supports volume snapshots.
11.1. Creating volume snapshots 링크 복사링크가 클립보드에 복사되었습니다!
You can create a volume snapshot either from the Persistent Volume Claim (PVC) page or the Volume Snapshots page.
Prerequisites
-
For a consistent snapshot, the PVC should be in
Boundstate and not be in use. Ensure to stop all IO before taking the snapshot.
OpenShift Data Foundation only provides crash consistency for a volume snapshot of a PVC if a pod is using it. For application consistency, be sure to first tear down a running pod to ensure consistent snapshots or use any quiesce mechanism provided by the application to ensure it.
Procedure
- From the Persistent Volume Claims page
-
Click Storage
Persistent Volume Claims from the OpenShift Web Console. To create a volume snapshot, do one of the following:
-
Beside the desired PVC, click Action menu (⋮)
Create Snapshot. -
Click on the PVC for which you want to create the snapshot and click Actions
Create Snapshot.
-
Beside the desired PVC, click Action menu (⋮)
- Enter a Name for the volume snapshot.
- Choose the Snapshot Class from the drop-down list.
- Click Create. You will be redirected to the Details page of the volume snapshot that is created.
-
Click Storage
- From the Volume Snapshots page
-
Click Storage
Volume Snapshots from the OpenShift Web Console. - In the Volume Snapshots page, click Create Volume Snapshot.
- Choose the required Project from the drop-down list.
- Choose the Persistent Volume Claim from the drop-down list.
- Enter a Name for the snapshot.
- Choose the Snapshot Class from the drop-down list.
- Click Create. You will be redirected to the Details page of the volume snapshot that is created.
-
Click Storage
Verification steps
- Go to the Details page of the PVC and click the Volume Snapshots tab to see the list of volume snapshots. Verify that the new volume snapshot is listed.
-
Click Storage
Volume Snapshots from the OpenShift Web Console. Verify that the new volume snapshot is listed. -
Wait for the volume snapshot to be in
Readystate.