Volume Snapshot

Volume snapshotting provides to you the ability to create point-in-time snapshots of block storage volumes. A volume snapshot is a read-only, consistent copy of a block storage volume at a specific moment. These snapshots are crucial for data protection, enabling users to restore a volume to a previous state or create new volumes based on the snapshot.

Volume Snapshot Characteristics

Key characteristics of volume snapshots:

  • Point-in-time consistency: Snapshots capture the data on a volume at the exact moment the snapshot is created, ensuring data integrity.

  • Read-only: Snapshots cannot be directly modified; they serve as a reference point for creating new volumes or restoring existing ones.

  • Space efficiency: Many block storage drivers implement snapshots using copy-on-write mechanisms, meaning they only consume additional storage space for data blocks that have changed since the snapshot was created.

  • Disaster recovery and data protection: Snapshots are a fundamental component of backup and recovery strategies, allowing for quick restoration of data in case of corruption or accidental deletion.

Snapshot Use Cases

Volume snapshots can be used in two scenarios

  • Creating a new volume: Users can create a new block storage volumes from an existing volume snapshot, effectively cloning the volume's content at the time of the snapshot. This is useful for creating test environments or replicating data.

  • Reverting a volume: You can also revert a volume to a previous snapshot, restoring the volume's content to the state it was in when the snapshot was taken.

Volume and Volume Snapshot Relationship

A volume snapshot is always created from a volume. You can create multiple volume snapshots for a given volume, at various points in time. These essentially act as a point in time copy of the volume at those times, and can be used to restore the volume to a previous well known state if the volume were to experience issues.

You can also use a volume snapshot to create a new volume.

It is therefore possible to create nested volume and volume snapshot hierarchies as shown in the example below.

This is important to take into account specially when you try to delete a volume snapshot.

Create a Volume Snapshot

You can create a volume snapshot by navigating to the Private Cloud Director UI Storage menu, then clicking on Volumes sub menu to see all the volumes. Then you can select a specific volume and select the snapshot action from the action bar.

Snapshotting an In-Use Volume

You can take a snapshot of a volume that is currently attached to a virtual machine and actively being written to. The resulting snapshot in this case will be crash-consistent but is not guaranteed to be application-consistent. This means that the snapshot will not have any corrupted data blocks. However, if there were any writes in flight when the snapshot was created, they may not be part of the snapshot.

For optimal data consistency, it is recommended to quiesce the application or file system on the virtual machine before creating the snapshot, if feasible.

Volume Snapshot Properties

Below are the core properties of a volume snapshot.

  • id – Unique UUID of the snapshot

  • name – User-facing name of the snapshot

  • description – Optional human readable description

  • size – Size of the snapshot in GB (This will be same as source volume at creation time)

  • status – Current state of the snapshot (e.g., creating, available, deleting, error)

  • created_at Timestamp __when the snapshot __was created

  • updated_at – Timestamp when the snapshot was last updated

  • volume_id – The ID of the source volume from which this snapshot was created

Metadata and other extended properties

A volume snapshot also has the following properties to represent it's metadata or other extended properties:

  • metadata – Key/value metadata pairs provided by user or backend

  • os-extended-snapshot-attributes:progress – % completion during creation

  • os-extended-snapshot-attributes:project_id Tenant that owns the snapshot

  • user_id – User who created the snapshot

  • os-extended-snapshot-attributes:provider_id – Internal provider reference for backend storage

Last updated

Was this helpful?