首页 > 其他分享 >openstack重置状态

openstack重置状态

时间:2024-01-30 15:37:13浏览次数:32  
标签:状态 -- 重置 volume state snapshot cinder openstack property

1. cinder volume snapshot 快照

openstack volume snapshot set
    [--name <name>]
    [--description <description>]
    [--no-property]
    [--property <key=value> [...] ]
    [--state <state>]
    <snapshot>

----------------------------------------------------------
--name <name>¶
New snapshot name

--description <description>¶
New snapshot description

--no-property¶
Remove all properties from <snapshot> (specify both --no-property and --property to remove the current properties before setting new properties.)

--property <key=value>¶
Property to add or modify for this snapshot (repeat option to set multiple properties)

--state <state>¶
New snapshot state. (“available”, “error”, “creating”, “deleting”, or “error_deleting”) (admin only) (This option simply changes the state of the snapshot in the database with no regard to actual status, exercise caution when using)

Volume version 2 only

<snapshot>
Snapshot to modify (name or ID)

cinder snapshot-reset-state [--state <state>]  <snapshot> [<snapshot> ...]

------------------------------------------------
--state <state>
 Valid values are “available”, “error”, “creating”, “deleting”, and “error_deleting”. NOTE: This command simply changes the state of the Snapshot in the DataBase with no regard to actual status, exercise caution when using. Default=available.

openstack volume snapshot unset [-h]
                                  [--property <key>]
                                  <snapshot>

2. cinder volume卷

#Change the status using the following command 
openstack volume set --state [desired_state] [volume_uuid]
# Verify if the volume state has changed
openstack volume show [volume_uuid]
OpenStack volumes can be in the following states: "available”, “error”, “creating”, “deleting”, “in-use”, “attaching”, “detaching”, “error_deleting” or “maintenance”.

 

 

 

cinder reset-state --attach-status detached $volume-ID  #修改卷状态为detached,解绑
cinder reset-state volume-id --state xxx #设置卷状态
cinder backup-create volume-id --name yy --force #创建全量备份 cinder delete $volume-ID #删除卷,建议从云管操作
cinder set-bootable volume-id True|False #设置卷状态为可启动
cinder backup-restore --volume-id xxx snapshot-id #还原卷备份
cinder upload-to-image --force --disk-format qcow2 volume-id image-name #上传卷到镜像池

 

标签:状态,--,重置,volume,state,snapshot,cinder,openstack,property
From: https://www.cnblogs.com/santia-god/p/17997216

相关文章

  • iOS App审核状态和审核时间管理指南
    引言对于一款开发完成并准备上架的iOS应用程序来说,通过苹果公司的审核是非常重要的一步。苹果公司会对应用程序进行严格的检查,以确保应用程序的质量和安全性。本文将介绍iOS应用程序审核的流程和时间,希望能够帮助开发者更好地了解和处理审核过程中的问题。添加图片注释,不超......
  • 使用Java处理HTTP状态码:一场代码与数字的奇妙之旅
    在互联网的世界里,HTTP状态码就如同交通信号灯,告诉我们请求是否成功,或者出了什么问题。当我们在Java中与Web服务器打交道时,了解这些状态码是必不可少的。今天,就让我们一起踏上这段代码与数字的奇妙之旅,看看如何使用Java来处理这些HTTP状态码。首先,我们要明白HTTP状态码的作用。简单......
  • 删除表格某一行数据后,刷新列表,当前页码需要重置为1吗?给出最佳实践
    删除表格某一行数据后,刷新列表,当前页码需要重置为1吗?给出最佳实践在删除表格中某一行数据后,是否需要将当前页码重置为1,取决于具体的应用场景和用户体验需求。以下是一些考量因素以及最佳实践:考量因素:数据总量与分页逻辑:如果删除操作导致当前页面的数据不足以填充整个页面(例如,......
  • 在K8S中,PV生命周期状态有哪些?
    在Kubernetes中,PersistentVolume(PV)对象具有以下几种生命周期状态:Available(可用):PV在被创建并设置为可供绑定的状态时处于Available状态。在此状态下,PV尚未与任何PersistentVolumeClaim(PVC)关联或绑定。Bound(已绑定):当管理员或Kubernetes自动将PV与一个匹配的Persis......
  • 在K8S中,什么是有状态应用和无状态应用?
    在Kubernetes(简称K8S)中,有状态应用(StatefulApplication)和无状态应用(StatelessApplication)是根据应用程序对数据处理方式以及实例间的关系来区分的两种类型:无状态应用(StatelessApplication):数据处理:无状态应用不保存任何与客户端会话相关的持久化数据,每个请求的处理独立......
  • 前端开发时,点击重置按钮,列表会回到第一页查询呢,还是查询当前页,只是把输入框的条件清空
    点击重置按钮时,列表的行为取决于具体的应用需求和设计。通常有以下两种常见情况:回到第一页并清空查询条件:当用户点击重置按钮后,应用会清除所有输入框中的查询条件,并将列表刷新回第一页的数据(通常是默认排序或无条件查询的结果)。这种设计在用户想要从头开始检索数据或者需要查看......
  • tcp连接全过程各种状态详解
    // from netinet/tcp.henum{  TCP_ESTABLISHED = 1, // 代表一个打开的连接  TCP_SYN_SENT, // 再发送连接请求后等待匹配的连接请求(客户端)  TCP_SYN_RECV, // 再收到和发送一个连接请求后等待对方对连接请求的确认(服务器)  TCP_FIN_WAIT1, // 等待......
  • 设计模式:策略模式/状态模式
    设计模式是通用的、可复用的代码设计方案,也可以说是针对某类问题的解决方案,因此,掌握好设计模式,可以帮助我们编写更健壮的代码。wiki中将设计模式分为四类,分别是:创建模式(creationalpatterns)结构模式(structuralpatterns)行为模式(behavioralpatterns)并发模式(concurrencypatt......
  • 组件复写:搜索人员栏,状态默认为全部
    要复写的位置如下: 整体代码:ecodeSDK.overwritePropsFnQueueMapSet('WeaSelect',{//组件名fn:(newProps)=>{//newProps代表组件参数//进行位置判断if(newProps.ecId!='_Route@mb5ed9_WeaSwitch@cbdl58@8_SelectItem@dv4xjh_WeaSelect@3vudrr'){......
  • 浅谈电厂电能管理及开关状态在线监测系统的开发
    【摘要】:基于某大型电厂的分层分布式电能管理及开关状态在线监测系统的实际案例,介绍了发电厂电能管理系统的开发情况、网络结构及系统功能,探讨了开关状态在线监测技术的原理和实现,实际证明,系统通用生强、开放性和可维护性好。【关键词】:电能管理;开关状态;在线监测0.前言近年来......