Cinder命令總結

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.

 


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章