openstack cinder api对应的命令行接口
a) Create Volume cinder create 1 --display-name admin-volume1 cinder create --display-name VOLNAME SIZE(SIZE的单位为GB)
b) Delete Volume cinder delete volume_id or display-name
c) Attach Volume nova volume-attach <server> <volume> [<device>]
d) Detach Volume nova volume-detach <server> <volume>
e) Create Snapshot cinder snapshot-create --display-name volume5-ss admin-volume5 cinder snapshot-create --display-name SNAPSHOT-VOLNAME VOLNAME-OR-ID
f) Delete Snapshot cinder snapshot-delete VOLNAME-OR-ID
g) Create Volume from snapshot cinder create --snapshot-id bb25fa58-682d-4625-ada0-7f8ddd353179 --display-name vol-from-ss 3
h) Get volume stats cinder show<volume>
i) Clone Volume cinder create --source-volid eeb23bf0-f53e-4062-8162-e261c4774fe4 --display-name clone-from-volume5 3
j) Copy image to volume cinder create --image-id ce0c0809-e540-4cf1-bfe2-820bf46d8b82 --display-name vol-from-img 1
k) Copy volume to image cinder upload-to-image vol-from-img img-copy-from-vol
l) Extend volume cinder extend<volume> <new_size>
如果对上面命令有不明白的地方,可以通过cinder help create这种cinder help subcommand形式来查具体的使用方法。