找回密码
 注册
查看: 1961|回复: 0

cinder 相关命令统计

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-9-15 15:00:09 | 显示全部楼层 |阅读模式
创建卷
8 a, p& J' t6 U! s# I- \# Lcinder create test
- Q7 k$ |$ |% K
# N# i0 ^) F) r4 E: S! l cinder create test --volume-type ssd
5 C5 \( i1 U9 Y  m) n8 x) B" Y+ u% m3 m1 a: K, F
cinder create test --volume-type sata
7 h/ X" t6 L8 H/ k& }6 s7 J0 h+ E2 J6 d+ a
列举所有卷: ?$ F3 m, `/ i3 w) U4 \
cinder list
0 M7 B2 C$ y  |+ ~+ f- n
4 O  G! _- p: ~1 K7 Q删除卷
* l9 q8 a% m  N* Vcinder delete $volume_id
3 R: [0 s7 ^8 T' y  L
* H1 W" c; b/ `强制删除卷! h  t- ~! w- E( t
cinder force-delete $volume_id
% x4 i/ Z" S. h2 E
1 o  a8 h& [6 ?2 D重命名卷% h. `3 @: Z- v' M9 [% N1 n# V
cinder rename $volume_id $volume_name! n8 _/ c0 L, m4 _) |
9 q2 \4 ~* }/ a$ |' X
查看卷详情% Z& i. p" ^! n0 i$ Q" p: w* M6 K' _
cinder show $volume_id) J  F, N4 H0 W% L* \

' W& g, ~4 z. p" g' o+ _重置卷状态5 Z4 C1 Z& J2 G
cinder reset-state $volume_id! }( \! t' Z+ B1 ~

: v) w3 `# K' T* l7 q设置metadata/ U7 T4 ^9 a% J: a# @  N- B
cinder metadata $volume set $key=$value% U' k6 s# n; H  f
5 l5 R* Q8 Z: V- S* o% D0 Z
查看metadata
& _3 v3 R! p8 R1 A8 }9 M cinder metadata-show $volume_id
% T* j/ E7 x: D" d$ B! b' V
( K7 k" j1 x2 ?6 M. b取消metadata- f# @8 r. s, A& o! J1 B
cinder metadata $volume unset $key
+ K& K6 H1 F: t6 r+ Q9 p
$ |% `/ H9 Z& {, z+ X创建snapshot8 u. @1 S. E* z
cinder snapshot-create $volume_id
& b1 g& o, \. p
; p  y' V9 f) `. n列举所有snapshot& a$ R# a3 p7 Z! _6 o# h! _, Y  ]
cinder snapshot-list) h- D* a0 V8 Q: w2 n' W
$ g& G9 ?: t8 G9 U. Q' U
删除snapshot4 h: g; L' X1 z8 ]1 Z) m. ?6 [
cinder snapshot-delete $snapshot_id4 C; ]# P" r6 f. }4 T
9 G" ?  u9 O9 K/ _& w
设置snapshot metadata
8 U, r0 [6 n# M% n) k' q cinder snapshot-metadata $snapshot_id set $key=$value" E, g& Y5 J5 K0 Q0 k4 G! y

% a2 ~' k7 c: L查看snapshot metadata6 s: {3 \" A- M/ T, l6 ]$ q0 }) c9 p
cinder snapshot-metadata-show $snapshot_id# V$ h! B" d" v

" e/ h: T& A, b# Y. M1 }取消snapshot metadata: o0 h' ?, ?9 X3 I# y1 z8 \2 F( b
cinder snapshot-metadata $snapshot_id unset $key, l6 S/ y1 z+ e' p- D! d
: Z6 w: ^6 v8 o. k# o* v5 V# w* T
显示卷类型+ |8 x( O4 f4 z, g8 R* B5 m
cinder type-list, n7 a6 L2 q/ F; U- |

$ ]# C+ B! [9 S9 T创建卷类型
/ I- a  ], G( ~: q/ d# ~7 T, [. Scinder type-create $type_name- r- x2 H- }# X$ P2 v3 c8 i1 }
- x! R/ f6 z( X1 |: n: z
删除卷类型& |2 C, ^# u0 O
cinder type-delete $type_id
; @% y! N1 o$ I8 H! u
) t: z3 f0 `  E9 W/ S" a列举后端服务
* C" M. M. B0 wcinder service-list  v0 p8 S7 S  h- F3 O
( D3 C4 |; [% ~* A( n' ~0 q

5 |; R4 d* {+ `, C列表类
* ^8 W) y4 [1 V# ?& ucinder list                 //列出所有volumes
/ b* ^4 ?' Q! `& Q cinder type-list            //列出所有volume类型
* k! O( Q0 J* t0 E4 u0 ^# p9 v8 acinder snapshot-list        //列出所有快照snapshot% A* |+ q" W0 ~/ _4 \& e
cinder backup-list          //列出所有备份backup
" c0 N! c6 N6 J# f& M1 [& M6 y) i cinder qos-list             //列出所有qos( s, ~1 ]  v+ w$ K% a( t" z
cinder service-list         //列出所有服务: U  j  J5 w6 A2 u& s
cinder transfer-list        //列出所有transfer
; T; w' \; v5 {5 I; w, ] cinder list-extensions      //列出所有扩展extensions: [! i8 t+ ]* X. j6 j

* S+ m. G4 e+ q% c; B6 G
- h4 d1 d. D, ]& U2 T/ ~创建类9 h8 u( S. L& p- A1 {% D
cinder create <size> --dispaly-name --volume-type   //创建volume
" ]! {% J! R. `- H0 ?% d& | cinder snapshot-create <volume> --dispaly-name      //创建快照2 Q0 j9 Y' L7 g* A3 c
cinder backup-create <volume> --dispaly-name        //创建备份) O2 C3 Z' I+ C) B$ U
cinder qos-create <name> <key=value>                //创建qos  D( v8 r/ V5 q1 f+ Z5 [+ b# V" V
cinder type-create <name>                           //创建类型% b8 P) h7 _' R$ J; w& n% }8 _1 p& Y
cinder transfer-create <volume> --dispaly-name      //创建传输
) d3 Z/ j( W4 @& a, V' e4 v0 a" m
( n$ ?5 ^" d8 l9 v6 \3 s) |, @, L 显示详情类
: o7 \* m7 x- o% n; U0 ?cinder show <volume>                    //显示volume详情9 @) I# ?( e1 ~& _1 v& o
cinder metadata-show <volume>           //显示volume下元数据3 ]+ x$ _) _$ V8 a& c7 d
cinder backup-show <backup>             //显示backup详情# H$ \* `  K" V! \0 ^6 F
cinder qos-show <qos>                   //显示qos详情2 H/ x& K& {5 j
cinder snapshot-show <snapshot>         //显示快照详情
' b6 ?/ @0 L6 i/ O9 O& b+ ~/ hcinder snapshot-metadata-show <snapshot>//显示快照元数据详情% P" u8 K+ C- S$ ?7 @
cinder transfer-show <transfer>         //显示传输详情* \  A  W3 |9 A" n! t6 `$ o3 ?
cinder quota-show <tenant_id>           //显示一个租户下面的quota详情
- s# Y2 p# T" ?7 m4 k8 x1 j8 q( y2 M- }
删除类3 j" A, `3 j+ @1 E6 o/ c& k7 Z
cinder delete <volume>                  //删除volume
; W: \" t" q  v# D cinder force-delete <volume>            //强制删除volume$ m6 o7 Q0 a, M
cinder backup-delete <backup>           //删除备份4 K  T* z2 b" @# a/ }
cinder qos-delete <qos_specs> --force <True|False>      //删除qos  L( m2 g* ~8 x  r$ A6 [
cinder quota-delete <tenant_id>         //删除租户下的quota, g  n/ @5 a: M( s, f+ c
cinder snapshot-delete <snapshot>       //删除快照
) `" _: u8 |  t6 ycinder type-delete <id>                 //删除类型: E4 J" E6 |4 }- W
cinder transfer-delete <transfer>       //删除传输7 I+ ~: y* C! `
) B! H3 Y( ]8 [# q% s7 S
分类浏览
4 Z3 L0 L/ v% Y( J5 ^! EVolume操作* e2 |2 I# c" n( u/ h! @# [# y. D' A  T
cinder list                                         //列出所有volumes
# W) i1 k% t4 D3 l) \5 u8 R cinder create <size> --dispaly-name --volume-type   //创建volume  V& K! O( D' G1 _. p
cinder show <volume>                                //显示volume详情
. \: p/ n' O' Dcinder delete <volume>                              //删除volume' {" v! u, V, |8 b
cinder migrate [--force-host-copy <True|False>]
: U4 F2 M- X! \& l# a2 j; A                      <volume> <host>                //迁移! k# r+ g& z& b; {" Y
cinder rename [--display-description <display-description>]( ]7 v  ]* K" h* `4 T
                      <volume> [<display-name>]      //重命名% ~  \6 P: [. \4 x
cinder reset-state <volume> --state <state>         //重置状态
% ^, R# z" w" }9 mcinder set-bootable <volume> <TRUE|FALSE>           //可启动' D/ b. b6 o- H1 B( F: V& s2 ]
cinder endpoints                                    //发现endpoints+ f1 |7 s3 P4 h3 V' }1 m
cinder credentials   //Shows user credentials returned from auth.4 R) k& u! _' u

6 c$ i  d/ ?# Z Backup操作
3 S0 x5 I- `. \0 scinder backup-create <volume> --dispaly-name    //创建备份
& c! ?$ a- U2 |3 h. L% Vcinder backup-delete <backup>                   //删除备份
# P0 q8 E0 }/ R# \3 H1 e7 k* a5 kcinder backup-list                              //列出备份
! M, W& u/ r& x2 q" N+ xcinder backup-restore [--volume-id <volume>] <backup>      
! o9 n0 L) R/ @2 Q1 Q                                                 //重置备份" {2 S# ^* R5 d* F7 {9 M
cinder backup-show <backup>                     //显示备份详情" D+ C+ R9 L, R

8 Z# V4 [* y' o, B- p2 Q1 GSnapshot操作# @5 w: y( J2 ]* a( G9 @! Z) i
snapshot-create     Creates a snapshot.
, P- r" \% E+ Q. }8 p- P' R' e7 J3 b snapshot-delete     Remove one or more snapshots.
$ k! I6 v; m( d: F* i3 b8 I$ e( ~! j" O snapshot-list       Lists all snapshots.
( v* O7 W- |3 z! [" l* e- X snapshot-metadata   Sets or deletes snapshot metadata.
! w, j$ }6 M& o snapshot-metadata-show
5 Y8 ]( R  h7 x+ Q: a                     Shows snapshot metadata.
! i: Q4 Z9 Z- @/ V. h9 |9 ~  y snapshot-metadata-update-all
4 F1 a8 @$ L9 [* `+ o0 a, d                     Updates snapshot metadata.
; I/ h. i8 |1 A0 K1 q- F* `# r% F3 O snapshot-rename     Renames a snapshot.. l" w' h' D0 W9 ?2 S
snapshot-reset-state# K  J5 O" q7 A
                     Explicitly updates the snapshot state.% p! [% X7 p( t; e; s
snapshot-show       Shows snapshot details.
. A. S' `' @9 l6 z
* q+ W/ j" C' F- a8 d
6 J5 v  U2 i# M, W! v" W Type操作
$ S. u& P, p' P0 ptype-create         Creates a volume type.
( N, N. E; F" g5 P+ m# ? type-delete         Deletes a specified volume type.1 W# ?% u. r/ ]: D& }
type-key            Sets or unsets extra_spec for a volume type.
% X& E3 X' C* _) { type-list           Lists available 'volume types'./ t) e" p& K% p! X/ Q* ?

% U; J" o  b5 T$ i& K- s- v qos操作
/ g0 Y2 o8 F9 V- B, Wqos-associate       Associates qos specs with specified volume type.  M/ p; T# g( ~$ {9 f+ s
qos-create          Creates a qos specs.
" v# ?2 e) R2 [: S' n/ d$ c qos-delete          Deletes a specified qos specs.
. f9 O* d( }8 o6 y$ g qos-disassociate    Disassociates qos specs from specified volume type.& P& K0 C& K3 h2 F' P
qos-disassociate-all' l! S' ~" d$ ~& t! n* I
                     Disassociates qos specs from all associations.
& W9 o; h* n8 Q& [ qos-get-association
+ i( l1 N: e' X& A1 S' N                     Gets all associations for specified qos specs.$ |$ j& e4 D4 a- F
qos-key             Sets or unsets specifications for a qos spec.
4 w; R: ?! j( o qos-list            Lists qos specs.
- p% {9 F! M2 q  r2 H& p* J qos-show            Shows a specified qos specs.
6 r0 @  ]$ S0 y8 ?
" Y; d1 b5 t+ O- a% Z: Y quota操作
" f8 }7 p( ]2 s, A( }, Aquota-class-show    Lists quotas for a quota class.
9 p9 K" d$ h% I! `+ B, p quota-class-update  Updates quotas for a quota class.0 ]2 q( V8 \# J, k2 C7 g
quota-defaults      Lists default quotas for a tenant.
  {, p$ ]3 r1 X5 ~  A) ~ quota-delete        Delete the quotas for a tenant.
% u& I' J+ D. u% v quota-show          Lists quotas for a tenant.: ^8 ^% y" j! f% e+ n$ X: B; ~7 o# G0 r
quota-update        Updates quotas for a tenant.
+ S7 S% z7 C$ K. Y6 B quota-usage         Lists quota usage for a tenant.& d+ y" G! c; O8 Q- E
3 R8 `! t* y  |0 F
Transfer操作5 T% e9 K6 W2 v+ q1 ~# O8 w
transfer-accept     Accepts a volume transfer.
8 h2 ?$ j: K6 \# E6 F transfer-create     Creates a volume transfer.$ m" b6 \2 C! r7 a9 h/ U3 G7 {
transfer-delete     Undoes a transfer.
) w$ |' o5 V- y! k" P transfer-list       Lists all transfers.7 L4 a2 M' d+ x! y6 H
transfer-show       Show transfer details.
; `* ?* ~% M: {* y% ~: I3 G) e/ Q9 j) x
Service操作$ S' ]7 N# ~( m& x+ K4 l0 x" y
service-disable     Disables the service.8 A: `- s0 e3 T7 O5 i
service-enable      Enables the service.
- {* A, R  J, N8 r service-list        Lists all services." z& C( L) d3 {# p# R; S* U

) d7 c9 k6 D+ r8 O Encryption操作' U* n8 ^( H$ ^$ ^* n4 k& Y$ T
encryption-type-create
$ h3 H  D. F) V! P2 O     Creates encryption type for a volume type. Admin only.
+ x  K$ k1 c9 `+ M& x3 C encryption-type-delete
( x3 j; K$ ^1 t) |3 q     Deletes encryption type for a volume type. Admin only.3 O4 z. O. W, ^! A, O
encryption-type-list* e3 o9 C  G, J; @4 T5 a* s
     Shows encryption type details for volume types. Admin only.
" o1 \) F* R6 @ encryption-type-show
. I* t8 _$ f+ q$ N, R- H' Y     Shows encryption type details for volume type. Admin only.
) _# [. R' q0 `8 T: o& r
$ _) D2 W2 b2 c0 m6 Y2 D( B2 W& ^' Y  v& A* i
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 02:02 , Processed in 0.019752 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表