背景
在某些特定场景下,业务系统也许会使得 CVM 的磁盘被频繁占用,出现磁盘不可读写的情况,平台提供 CVM 磁盘 IO Hang 故障动作,用户可以使用该故障动作,验证其系统是否可以稳定地处理此类异常。
注意:
此故障动作只支持 Centos7.2、Debian8.2、Ubuntu16.0.4 以上操作系统。
演练实施
步骤1:演练准备
准备若干待演练的 CVM 实例对象
步骤2:演练编排
1. 登录 云顾问 > 混沌演练控制台,进入演练管理页面,单击新建演练。
2. 单击跳过,新建空白演练。填写演练信息,选择演练目标 CVM 实例。
![](https://qcloudimg.tencent-cloud.cn/image/document/cf31cc17033b1d33e1a26836012bf8f7.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/cf31cc17033b1d33e1a26836012bf8f7.png)
3. 单击立即添加,添加演练动作,选择 IO资源,选择 IO Hang 故障。
![](https://qcloudimg.tencent-cloud.cn/image/document/cc99dfa4d0b7452fedcb5ccbd507a5e6.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/cc99dfa4d0b7452fedcb5ccbd507a5e6.png)
4. 配置故障动作参数。
![](https://qcloudimg.tencent-cloud.cn/image/document/d3b004b46bb6fa80936bdc9918b63f64.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/d3b004b46bb6fa80936bdc9918b63f64.png)
5. 提交创建演练。
![](https://qcloudimg.tencent-cloud.cn/image/document/078dd90e7dde37a6d334622af9cf8915.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/078dd90e7dde37a6d334622af9cf8915.png)
步骤3:执行演练
1. 在演练动作组中,点击执行,开始执行演练,启动故障注入。
![](https://qcloudimg.tencent-cloud.cn/image/document/717c348572702fb57333ff1d4dbb9cc5.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/717c348572702fb57333ff1d4dbb9cc5.png)
2. 点击动作卡片,查看动作执行效果。
![](https://qcloudimg.tencent-cloud.cn/image/document/86d714f052418c3cab8d9cf1890db4cd.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/86d714f052418c3cab8d9cf1890db4cd.png)
通过查询 IO 监控指标图,可以发现 IO 已下降,故障动作生效。![](https://qcloudimg.tencent-cloud.cn/image/document/227944a182981f6259fd523d2b49da45.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/227944a182981f6259fd523d2b49da45.png)
3. 执行恢复动作。从磁盘监控可以看到,IO 已经恢复。![](https://qcloudimg.tencent-cloud.cn/image/document/75d7151227cf8717331521539ddce0da.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/75d7151227cf8717331521539ddce0da.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/df7c33308347e8674967ec5ce29026c2.png)
![](https://qcloudimg.tencent-cloud.cn/image/document/df7c33308347e8674967ec5ce29026c2.png)