Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Currently, Volume Snapshots in Cloudstack take a considerable amount of time to complete thereby blocking other operations on the VM. This is because, the volume snapshot operation involves 2 steps - creating a snapshot of the volume on primary storage and then backing it up on secondary storage. This feature will separate the creation of the snapshot on primary and its copying onto secondary.

...

Author
Description
Date
Harika Punna
First RevisionMay 2nd May, 2017


Glossary

  • Snapshot - snapshot Snapshot refers to volume snapshot if not specified specifically.

Use case

  • User The user wants to separate the creation and backup operation of volume snapshot.

...

  • All errors at various levels of operations will be logged in management-server.log.
  • If the creation of snapshot fails before its done on Primary, the error handling will be same as the one happening now i.e. will be notified about of the error that has happened.
  • If the backing up of a snapshot on secondary fails, the snapshot will move to Error state, which later will be cleaned by storage GC thread and its related entries in snapshot_store_ref table will be deleted as and when retry fails.
  • In case of While backing up of a snapshot, If the management server stopping, while backing up of snapshotis stopping/stopped, on the restart of the server, the snapshot will be moved to Error state and then be cleaned by GC thread.

...

  • If the snapshot is successfully created on primary i.e. when the status in snapshots table is "CreatedOnPrimary", the backup process starts and the result of snapshot creation will be returned. 
  • No operation will be performed on the snapshot which is on primary and is in backingup backing up state.
  • The backup process if fails , runs for "backup.max.attempts", with interval between attempts "backup.retry.interval". If within these number of attempts, the creation of backup is not successful, then the snapshot will be deleted from primary even.
  • A separate thread pool will be maintained for backup task.

    Configuration parameters: 

    Param Name
    Default Value
    backup.max.attempts3
    backup.retry.interval300 seconds



     

...

An additional param will be added to CreateSnapshotCmd, on whose value the decision of, if to separate the snapshot and copy operations or if to continue with the existing one is decided.

API
ParametersParameter
createSnapshot

asyncBackup(optional)

 

...

A checkbox will be added to the "Create Volume Snapshot" dialog box, which when checked, snapshot and copy operations will be separated and if left unchecked the existing flow continues.

 

Hypervisors supported

 Xenserver XenServer, KVM


Parallel operations that can happen during backing up of snapshot

...