Jump to: navigation, search

LocalStorageVolume

Revision as of 08:38, 20 September 2012 by Zrzhit (talk)

<<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

  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. 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实现增量快照;

Pre-requisites

Development Resources

Work in Progress

Discussion