Deleting snapshots

Virtual Storage Platform One SDS Block Virtual Private Storage Administrator Guide

Version
1.15.x
Audience
anonymous
Part Number
MK-24VSP1SDS003-02

When snapshot volumes are no longer necessary, you can delete them as follows.

When you perform editing, note the following points:

  • If the path (volume path) between the snapshot volume and the compute node is set, the snapshot volume cannot be deleted. Disconnect the snapshot volume from the compute node before deleting it.

  • You can delete a snapshot only when the snapshot is in Prepared, Normal, or Error state.

  • A snapshot that is the copy source of another existing snapshot cannot be deleted.

  • To delete the S-VOL, run the snapshot deletion command.

  • To delete the P-VOL, run the snapshot deletion command to delete all the snapshot volumes (S-VOL) that were created from the P-VOL to be deleted. Then, run the volume deletion command to delete the P-VOL (which is now a normal volume due to S-VOL deletion).

  • To delete the P/S-VOL, run the snapshot deletion command to delete all the snapshot volumes (S-VOL) that were created from the P/S-VOL to be deleted. Then, run the volume deletion command to delete the P/S-VOL (which is now a S-VOL due to S-VOL deletion).
  • Required role: VpsStorage

  1. Verify the ID of the volume (P-VOL or S-VOL).

    If you use the CLI to specify P-VOL and S-VOL by name, check the names of P-VOL and S-VOL.

    REST API: GET /v1/objects/volumes

    CLI: volume_list

  2. Obtain information of the snapshot volumes to be deleted, and verify that snapshotStatus is "Prepared", "Normal" or "Error".

    Run either of the following commands with the volume ID specified.

    If you want to use the CLI, you can specify the name of the volume instead of its ID.

    REST API: GET /v1/objects/volumes/<id>

    CLI: volume_show

    After verification, go to the next step.

  3. Delete the snapshot volumes.

    Run either of the following commands with the S-VOL ID of the volume to be deleted specified.

    If you use the CLI, you can specify the name of the S-VOL instead of its ID.

    REST API: POST /v1/objects/volumes/actions/delete-snapshot/invoke

    CLI: volume_delete_snapshot

    Verify the job ID which is displayed after the command is run.

  4. Verify the state of the job.

    Run either of the following commands with the job ID specified.

    REST API: GET /v1/objects/jobs/<jobId>

    CLI: job_show

    If the job state is "Succeeded", the job is completed.

  5. Obtain a list of information about S-VOLs and verify that S-VOLs are deleted.

    Run either of the following commands with the P-VOL volume ID specified.

    If you use the CLI, you can specify a name instead of the ID of the volume.

    REST API: GET /v1/objects/volumes/<id>/snapshot-volumes

    CLI: snapshot_volume_list

    Note:

    If the snapshotStatus of an S-VOL becomes "Error" and the snapshot deletion command is unsuccessful even if the intended S-VOL is specified, you can delete all S-VOLs created from the P-VOL simultaneously by running the snapshot deletion command with the volume ID of the P-VOL and true specified for masterVolumeId and snapshotTree (for the REST API) and for --master_volume_id and --snapshot_tree (for the CLI), respectively. In performing this operation, if a command that performs an operation on a snapshot volume existing in the tree on the P-VOL is already being run by a prior job, the job might become unsuccessful. The job that runs the snapshot deletion command might also result in failure. If the job results in failure, rerun the command.

    For detailed operations, see POST/v1/objects/volumes/actions/delete-snapshot/invoke in the VSP One SDS Block REST API Reference and volume_delete_snapshot in the VSP One SDS Block CLI Reference.