View a markdown version of this page

Auto-enable I/O 适用于受损的亚马逊 EBS 音量 - Amazon EBS
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)。

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

Auto-enable I/O 适用于受损的亚马逊 EBS 音量

当 Amazon EBS 确定卷的数据可能不一致时,它会默认禁 I/O 用任何连接的 EC2 实例中的卷。这将导致卷状态检查故障,并新建一个卷状态事件来指明故障的原因。如果不考虑特定卷的一致性,并且您希望该卷在受损时立即可用,则可以通过将该卷配置为自动启用来替代默认行为 I/O。如果您启用 Auto-Enabled IO 卷属性(autoEnableIO在 API 中),则卷和实例 I/O 之间将自动重新启用,卷的状态检查将通过。此外,您还会看到一个事件,该事件告诉您该音量处于可能不一致的状态,但 I/O 已自动启用。如果发生此事件,您应该检查该卷的一致性,如有必要,可对其进行更换。有关更多信息,请参阅 Amazon EBS 卷事件。

Console
查看卷的 Auto-Enabled IO 属性
  1. 打开位于 https://console.aws.amazon.com/ec2/ 的 Amazon EC2 控制台。

  2. 在导航窗格中,选择 Volumes。

  3. 选择卷,然后选择 Status checks(状态检查)选项卡。

    该Auto-enabled I/O字段显示选定音量的当前设置(“启用” 或 “禁用”)。

修改卷的 Auto-Enabled IO 属性
  1. 打开位于 https://console.aws.amazon.com/ec2/ 的 Amazon EC2 控制台。

  2. 在导航窗格中,选择 Volumes。

  3. 选择音量,然后选择 “操作”,“自动启用 I/O管理”。

  4. 要自动启用 I/O 受损音量,请选中 “受Auto-enable I/O 损音量” 复选框。想要禁用该功能,请清除复选框。

  5. 选择更新。

Amazon CLI
查看卷的 autoEnableIO 属性

使用 describe-volume-attribute 命令。

aws ec2 describe-volume-attribute \ --attribute autoEnableIO \ --volume-id vol-01234567890abcdef

下面是示例输出。

{ "AutoEnableIO": { "Value": true }, "VolumeId": "vol-01234567890abcdef" }
要修改一个卷的 autoEnableIO 属性

使用 modify-volume-attribute 命令。

aws ec2 modify-volume-attribute \ --auto-enable-io \ --volume-id vol-01234567890abcdef
PowerShell
查看卷的 autoEnableIO 属性

使用 Get-EC2VolumeAttribute cmdlet。

(Get-EC2VolumeAttribute ` -Attribute autoEnableIO ` -VolumeId vol-01234567890abcdef).AutoEnableIO

下面是示例输出。

True
要修改一个卷的 autoEnableIO 属性

使用 Edit-EC2VolumeAttribute cmdlet。

Edit-EC2VolumeAttribute ` -AutoEnableIO $true ` -VolumeId vol-01234567890abcdef