O043、计算节点宕机了怎么办

博客探讨计算节点宕机后instance的恢复方法。shelve和Migrate要求nova - compute服务正常,而Evacuate可在其无法工作时将节点上的instance迁移到其他计算节点,前提是镜像文件在共享存储上。可通过断电模拟故障后执行Evacuate操作,它通过rebuild实现。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 
Rebuild 可以恢复损坏的instance 。那如果是宿主机坏了怎么办呢?比如硬件故障或者断电造成整台计算机节点无法工作,该节点上运行的instance如何恢复呢?
 
用shelve或者Migrate可不可以?很不幸,这两个操作都要求instance 所在的计算节点的 nova-compute服务正常运行。幸运的是,还有 Evacuate
 
Evacuate 可在 nova-compute 无法工作的情况下将节点上的instance 迁移到其他计算节点上,但有个前提:instance的镜像文件必须放在共享存储上
 
我们可以通过断电模拟计算节点故障,然后执行Evacuate 操作恢复 instance。目前Evacuate只能通过CLI 执行。
 
stack@DevStack-Controller:~$ nova help evacuate
usage: nova evacuate [--password <password>] [--force] <server> [<host>]
 
Evacuate server from failed host.
 
Positional arguments:
  <server>               Name or ID of server.
  <host>                 Name or ID of the target host. If no host is
                         specified, the scheduler will choose one.
 
Optional arguments:
  --password <password>  Set the provided admin password on the evacuated
                         server. Not applicable if the server is on shared
                         storage.
  --force                Force to not verify the scheduler if a host is
                         provided. (Supported by API versions '2.29' -
                         '2.latest')
 
其实 Evacuate 是通过rebuild 操作实现的,因为Evacuate 是用共享存储上的instance的镜像文件重新创建虚机
 
1、先是 nova-scheduler 选择新的计算节点
2、nova-compute 在计算节点上执行rebuild操作
 
 

转载于:https://www.cnblogs.com/www1707/p/10920846.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值