Cinder命令总结

最近一直用cinder,有些命令时不时就忘记,索性整理一下,自己印象也更深刻了,查看xx列表就是-list,详情就是-show,删除就是-delete,一个一个试了一下也算是轻车熟路了。后面一些没怎么用到的就直接拷贝help里面了,懒了。

帮助

cinder help subcommand      //任何不懂得就help
<>                          //必须字段
--                          //可选字段
<volume/snapshot/backup/qos/transfer>       //ID or NAME

列表类

cinder list                 //列出所有volumes
cinder type-list            //列出所有volume类型
cinder snapshot-list        //列出所有快照snapshot
cinder backup-list          //列出所有备份backup
cinder qos-list             //列出所有qos
cinder service-list         //列出所有服务
cinder transfer-list        //列出所有transfer
cinder list-extensions      //列出所有扩展extensions

创建类

cinder create <size> --dispaly-name --volume-type   //创建volume
cinder snapshot-create <volume> --dispaly-name      //创建快照
cinder backup-create <volume> --dispaly-name        //创建备份
cinder qos-create <name> <key=value>                //创建qos
cinder type-create <name>                           //创建类型
cinder transfer-create <volume> --dispaly-name      //创建传输

显示详情类

cinder show <volume>                    //显示volume详情
cinder metadata-show <volume>           //显示volume下元数据
cinder backup-show <backup>             //显示backup详情
cinder qos-show <qos>                   //显示qos详情
cinder snapshot-show <snapshot>         //显示快照详情
cinder snapshot-metadata-show <snapshot>//显示快照元数据详情
cinder transfer-show <transfer>         //显示传输详情
cinder quota-show <tenant_id>           //显示一个租户下面的quota详情

删除类

cinder delete <volume>                  //删除volume
cinder force-delete <volume>            //强制删除volume
cinder backup-delete <backup>           //删除备份
cinder qos-delete <qos_specs> --force <True|False>      //删除qos
cinder quota-delete <tenant_id>         //删除租户下的quota
cinder snapshot-delete <snapshot>       //删除快照
cinder type-delete <id>                 //删除类型
cinder transfer-delete <transfer>       //删除传输

分类浏览

Volume操作

cinder list                                         //列出所有volumes
cinder create <size> --dispaly-name --volume-type   //创建volume
cinder show <volume>                                //显示volume详情
cinder delete <volume>                              //删除volume
cinder migrate [--force-host-copy <True|False>]
                     <volume> <host>                //迁移
cinder rename [--display-description <display-description>]
                     <volume> [<display-name>]      //重命名
cinder reset-state <volume> --state <state>         //重置状态
cinder set-bootable <volume> <TRUE|FALSE>           //可启动
cinder endpoints                                    //发现endpoints
cinder credentials   //Shows user credentials returned from auth.

Backup操作

cinder backup-create <volume> --dispaly-name    //创建备份
cinder backup-delete <backup>                   //删除备份
cinder backup-list                              //列出备份
cinder backup-restore [--volume-id <volume>] <backup>      
                                                //重置备份
cinder backup-show <backup>                     //显示备份详情

Snapshot操作

snapshot-create     Creates a snapshot.
snapshot-delete     Remove one or more snapshots.
snapshot-list       Lists all snapshots.
snapshot-metadata   Sets or deletes snapshot metadata.
snapshot-metadata-show
                    Shows snapshot metadata.
snapshot-metadata-update-all
                    Updates snapshot metadata.
snapshot-rename     Renames a snapshot.
snapshot-reset-state
                    Explicitly updates the snapshot state.
snapshot-show       Shows snapshot details.

Type操作

type-create         Creates a volume type.
type-delete         Deletes a specified volume type.
type-key            Sets or unsets extra_spec for a volume type.
type-list           Lists available 'volume types'.

qos操作

qos-associate       Associates qos specs with specified volume type.
qos-create          Creates a qos specs.
qos-delete          Deletes a specified qos specs.
qos-disassociate    Disassociates qos specs from specified volume type.
qos-disassociate-all
                    Disassociates qos specs from all associations.
qos-get-association
                    Gets all associations for specified qos specs.
qos-key             Sets or unsets specifications for a qos spec.
qos-list            Lists qos specs.
qos-show            Shows a specified qos specs.

quota操作

quota-class-show    Lists quotas for a quota class.
quota-class-update  Updates quotas for a quota class.
quota-defaults      Lists default quotas for a tenant.
quota-delete        Delete the quotas for a tenant.
quota-show          Lists quotas for a tenant.
quota-update        Updates quotas for a tenant.
quota-usage         Lists quota usage for a tenant.

Transfer操作

transfer-accept     Accepts a volume transfer.
transfer-create     Creates a volume transfer.
transfer-delete     Undoes a transfer.
transfer-list       Lists all transfers.
transfer-show       Show transfer details.

Service操作

service-disable     Disables the service.
service-enable      Enables the service.
service-list        Lists all services.

Encryption操作

encryption-type-create
    Creates encryption type for a volume type. Admin only.
encryption-type-delete
    Deletes encryption type for a volume type. Admin only.
encryption-type-list
    Shows encryption type details for volume types. Admin only.
encryption-type-show
    Shows encryption type details for volume type. Admin only.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值