Delete a snapshot when you no longer need it, or to clear the way for deleting the volume it was taken from. A protected snapshot must be unprotected first.
Before you begin
Unprotect the snapshot
Skip this section if the snapshot reports protectionStatus: UNPROTECTED.
-
Unprotect the snapshot. This works on a
COMPLETEDsnapshot and on anERRORsnapshot, and also settles a snapshot whoseprotectionStatusisFAILED.terminal origin storage unprotect-snapshot --snapshot-urn <snapshot-urn>With the API, use the
unprotectSnapshotmutation:GraphQL mutation { pvs { unprotectSnapshot(input: { snapshotUrn: "<snapshot-urn>" }) { accepted message } } } -
Check the snapshot until it reports
protectionStatus: UNPROTECTED.terminal origin storage get-snapshot --snapshot-urn <snapshot-urn>
Delete the snapshot
-
Delete the snapshot.
terminal origin storage delete-snapshot --snapshot-urn <snapshot-urn>With the API, use the
deleteSnapshotmutation:GraphQL mutation { pvs { deleteSnapshot(input: { snapshotUrn: "<snapshot-urn>" }) { accepted message } } }A delete request for a snapshot that isn’t
UNPROTECTEDis refused with the messagesnapshot must be unprotected before it can be deleted. -
Check the snapshot until it reports
status: DELETED.terminal origin storage get-snapshot --snapshot-urn <snapshot-urn>A deleted snapshot drops out of
origin storage list-snapshotsat once. You can still look it up by URN, with no time limit.
If this fails
If the deletion is accepted but fails, the snapshot stays in your list as ERROR with a statusReason. Its copy may still exist, and it still blocks deleting its volume. Delete it again. If it’s still protected, unprotect it first.