LocalStorageVolume
- Launchpad Cinder blueprint: local-storage-volume
- Created: 19 September 2012
- Last updated: 19 September 2012
- Drafter: Rongze Zhu
- Contributors: Rongze Zhu
<<TableOfContents()>>
Glossary
Qcow2 Image: Qcow2 Image
Incremental Snapshot: incremental snapshot
Pointer Table: Pointer Table
Summary
- 这只是cinder的一个driver
- 实现高性能的volume
- 减少网络负载
- 提高系统可靠性
- 用户可以从swift下载他的快照
- 某个region可以基于另外一个region的快照创建volume
- 增量快照
- 在线快照
- 其他的从AWS EBS中找到
Rationale
- 性价比高
- 可靠安全
- 减少网络负载
- 性能高
- 可靠性高
Goals
Goal 1: 与AWS EBS一致。
Goal 2: 增量快照。
Goal 3: 高性能。
Use cases
Use case 1: Create volume
- cinder-api create a new volume DB item;
- 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
- cinder-api create a new volume DB item and set volume['snapshot_id'];
- cinder-driver do nothing.
Use case 3: Delete volume
- cinder-driver check the status of snapshots of the volume.
- cinder-api destroy volume DB item.
Use case 4: Create snapshot
- cinder-driver use qemu monitor command to create snapshot in image;
- cinder-driver upload incremental snapshot to swift;
- 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
- cinder-driver delete snapshot in swift.
Use case 6: Attach volume
- cinder-driver create the qcow2 image of the volume.
- if the volume is new volume, goto (5);
- if the volume is new volume from snapshot, download the snapshot and write it to the qcow2 image, goto (5);
- if the volume is old volume, download the last snapshot and write it to the qcow2 image;
- update volume['host'] to new host which the instance besides. the volume is attached to the instance.
Use case 7: Detach volume
- Customer invokes NaaS API to create a route between the two subnets
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实现增量快照;