nova组件-rescue/unrescue

rescue中文意思:营救,解救。

有时如果误操作,需要挽救数据,尝试恢复系统。

nova提供这种故障恢复机制,rescue用指定的image作为启动盘引导instance,将instance自身的系统盘作为第二个磁盘挂载到
操作系统上。

nova-api发送message到消息队列,nova-compute接收消息并执行操作。nova用刚刚部署instance时使用的image来rescue instance。

首先根据image创建新的引导盘,并命名为disk.rescue。rescue成功后使用virsh edit *.xml文件查看到原系统盘被挂载到上面。登录instance,使用fdisk -l 查看磁盘分区。

此时instance的状态是rescue,rescue操作让我们有机会修复损坏的操作系统,修复好了,使用unrescue命令从原系统盘重引导instance。

[root@controller log]# nova help rescue
usage: nova rescue [--password <password>] [--image <image>] <server>

Reboots a server into rescue mode, which starts the machine from either the
initial image or a specified image, attaching the current boot disk as
secondary.

Positional arguments:
  <server>               Name or ID of server.

Optional arguments:
  --password <password>  The admin password to be set in the rescue
                         environment.
  --image <image>        The image to rescue with.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值