Jump to: navigation, search

Difference between revisions of "LocalStorageVolume"

Line 19: Line 19:
  
 
== Summary ==
 
== Summary ==
     The goal of this blueprint is to implement a driver for cinder. This will allow to create volume in local storage and back up point-in-time snapshots of your data to Swift for durable recovery. This snapshots are incremental backups, meaning that only the blocks on the volume that have changed since your last snapshot will be saved.
+
     The goal of this blueprint is to implement a driver for cinder. This will allow to create volume in local storage and back up point-in-time snapshots of your data to Swift for durable recovery. This snapshots are incremental backups, meaning that only the blocks on the volume that have changed since your last snapshot will be saved.  
 +
 
 +
    Even though the snapshots are saved incrementally, when you delete a snapshot, only the data not needed for any other snapshot is removed. So regardless of which prior snapshots have been deleted, all active snapshots will contain all the information needed to restore the volume. In addition, the time to restore the volume is the same for all snapshots, offering the restore time of full backups with the space savings of incremental.
 +
 
 +
    All in a word, our solutions is local storage + qcow2 image + dependent snapshot + swift.It is like [http://wiki.cloudstack.org/display/RelOps/Local+storage+for+data+volumes  cloudstack:local storage for data volumes], but we have incremental snapshot than cloundstack.
 +
 
 +
== Rationale ==
 +
* 性价比高
 +
* 可靠安全
 +
* 减少网络负载
 +
* 性能高
 +
* 可靠性高
 
* 这只是cinder的一个driver
 
* 这只是cinder的一个driver
 
* 实现高性能的volume
 
* 实现高性能的volume
Line 29: Line 40:
 
* 在线快照
 
* 在线快照
 
* 其他的从AWS EBS中找到
 
* 其他的从AWS EBS中找到
 
== Rationale ==
 
* 性价比高
 
* 可靠安全
 
* 减少网络负载
 
* 性能高
 
* 可靠性高
 
  
 
== Goals ==
 
== Goals ==

Revision as of 09:50, 20 September 2012


<<TableOfContents()>>

Glossary

Qcow2: The QCOW2 image format is one of the disk image formats supported by the QEMU processor emulator.

Incremental Snapshot: This snapshots are incremental backups, meaning that only the blocks on the device that have changed since your last snapshot will be saved.

Pointer Table: The pointer in table is point to a data block. Pointer table is used by the implementation of incremental snapshot.

Summary

   The goal of this blueprint is to implement a driver for cinder. This will allow to create volume in local storage and back up point-in-time snapshots of your data to Swift for durable recovery. This snapshots are incremental backups, meaning that only the blocks on the volume that have changed since your last snapshot will be saved. 
   Even though the snapshots are saved incrementally, when you delete a snapshot, only the data not needed for any other snapshot is removed. So regardless of which prior snapshots have been deleted, all active snapshots will contain all the information needed to restore the volume. In addition, the time to restore the volume is the same for all snapshots, offering the restore time of full backups with the space savings of incremental.
   All in a word, our solutions is local storage + qcow2 image + dependent snapshot + swift.It is like cloudstack:local storage for data volumes, but we have incremental snapshot than cloundstack.

Rationale

  • 性价比高
  • 可靠安全
  • 减少网络负载
  • 性能高
  • 可靠性高
  • 这只是cinder的一个driver
  • 实现高性能的volume
  • 减少网络负载
  • 提高系统可靠性
  • 用户可以从swift下载他的快照
  • 某个region可以基于另外一个region的快照创建volume
  • 增量快照
  • 在线快照
  • 其他的从AWS EBS中找到

Goals

Goal 1: 与AWS EBS一致。

Goal 2: 增量快照。

Goal 3: 高性能。

Use cases

Use case 1: Create volume

  1. cinder-api create a new volume DB item;
  2. cinder-driver do noting.

NOTE: It create the qcow2 image of the volume when the volume is attaching.

Use case 2: Create volume from snapshot

  1. cinder-api create a new volume DB item and set volume['snapshot_id'];
  2. cinder-driver do nothing.

Use case 3: Delete volume

  1. cinder-driver check the status of snapshots of the volume.
  2. cinder-api destroy volume DB item.

Use case 4: Create snapshot

  1. cinder-driver use qemu monitor command to create snapshot in image;
  2. cinder-driver upload incremental snapshot to swift;
  3. cinder-driver delete old snapshot in image.

NOTE: snapshot can be created when the volume state is attached. When the volume is detached, there are not changes in volume, so it don't need to create snapshot.

Use case 5: Delete snapshot

  1. cinder-driver delete snapshot in swift.

Use case 6: Attach volume

  1. cinder-driver create the qcow2 image of the volume.
  2. if the volume is new volume, goto (5);
  3. if the volume is new volume from snapshot, download the snapshot and write it to the qcow2 image, goto (5);
  4. if the volume is old volume, download the last snapshot and write it to the qcow2 image;
  5. update volume['host'] to new host which the instance besides. the volume is attached to the instance.

Use case 7: Detach volume

  1. cinder-driver create a new snapshot DB item, set snapshot['volume_id'] to the volume.
  2. cinder-driver use qemu monitor command to create snapshot in image;
  3. cinder-driver upload incremental snapshot to swift;
  4. cinder-driver delete the qcow2 image of the volume.

Requirements

R1. 支持qcow2

R2. 修改qemu,增量两个命令

... lots more coming here don't worry!

Design Ideas

File:LocalStorageVolume$Naas-Core-Overview.png

  • 使用qemu qcow2的快照机制;
  • 支持在线快照,在qemu增加2个monitor命令.
  • 在swift实现增量快照;

Pre-requisites

Development Resources

Work in Progress

Discussion