文章目录
cinder命令总结
1. backup命令
cinder--
backup-create <volume> --dispaly-name 创建卷备份
backup-delete <volume> 删除一个或多个备份
backup-export 导出备份元数据记录
backup-import 导入备份元数据记录。
backup-list 列出所有备份。
backup-reset-state 显式更新备份状态。
backup-restore 重置备份
backup-show 显示备份细节。
2.type命令
type-access-add Adds volume type access for the given project.
type-access-list Print access information about the given volume type.
type-access-remove Removes volume type access for the given project.
type-create Creates a volume type. 创建卷类型。
type-default List the default volume type. 列出默认卷类型。
type-delete Deletes a volume type.
type-key Sets or unsets extra_spec for a volume type. 设置或取消卷类型的额外规范。
type-list Lists available 'volume types'. 列出可用的“卷类型”
type-show Show volume type details.
type-update Updates volume type name, description, and/or
is_public.
3.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. 列出租户的配额使用情况。
4.Snapshot命令
snapshot-create Creates a snapshot.
snapshot-delete Removes one or more snapshots.
snapshot-list Lists all snapshots. 列出所有快照。
snapshot-manage Manage an existing snapshot.
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.
snapshot-unmanage Stop managing a snapshot. 停止管理快照。
5.qos命令
qos-associate Associates qos specs with specified volume type. 将qos规范与指定的卷类型关联。
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 its associations.
qos-get-association
Lists all associations for specified qos specs.
qos-key Sets or unsets specifications for a qos spec. 设置或取消qos规范的规范。
qos-list Lists qos specs.
qos-show Shows qos specs details.
6.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 Shows transfer details. 显示转移的细节。
7.service命令
service-disable Disables the service. 禁用该服务。
service-enable Enables the service.
service-list Lists all services. Filter by host and service binary.
8.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 a volume type. Admin
only.
encryption-type-update
Update encryption type information for a volume type
9.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.
10.其它命令
create Creates a volume.
credentials Shows user credentials returned from auth.
delete Removes one or more volumes.
(Admin Only).
endpoints Discovers endpoints registered by authentication
service.
extend Attempts to extend size of an existing volume.
extra-specs-list Lists current volume types and extra specs.
failover-host
force-delete Attempts force-delete of volume, regardless of state.
freeze-host
get-capabilities Show backend volume stats and properties. Admin only.
get-pools Show pool information for backends. Admin only.
image-metadata Sets or deletes volume image metadata.
image-metadata-show
Shows volume image metadata.
list Lists all volumes.
manage Manage an existing volume.
metadata Sets or deletes volume metadata.
metadata-show Shows volume metadata.
metadata-update-all
Updates volume metadata.
migrate Migrates volume to a new host.
rate-limits Lists rate limits for a user.
readonly-mode-update
Updates volume read-only access-mode flag.
rename Renames a volume.
replication-promote
Promote a secondary volume to primary for a
relationship.
replication-reenable
Sync the secondary volume with primary for a
relationship.
reset-state Explicitly updates the volume state in the Cinder
database.
retype Changes the volume type for a volume.
set-bootable Update bootable status of a volume.
show Shows volume details.
thaw-host
unmanage Stop managing a volume.
upload-to-image Uploads volume to Image Service as an image.
bash-completion
cinder例题
#创建卷类型
cinder type-create Paul #Paul是云硬盘类型名称
#创建卷
cinder create 10 --name lvm --volume-type lvm
#size为10GB, lvm为创建的云硬盘名称;lvm是云硬盘类型名称