AWS更改数据收集系统上的EBS根卷

时间:2017-07-12 06:12:18

标签: amazon-web-services amazon-ec2 amazon-ebs

我有以下用例:

  • 我有一个运行了1000GB io1 SSD EBS根卷的EC2实例
  • 它用于每分钟累积数据的数据收集服务
  • 我喜欢为更便宜的存储系统更改音量(因为该过程的规格不是IOPS密集型)

我已阅读AWS文档并找到以下文章:

  1. https://aws.amazon.com/about-aws/whats-new/2017/02/amazon-elastic-block-store-amazon-ebs-enables-live-volume-modifications-with-elastic-volumes/
  2. http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#console-modify
  3. 这表明(从2017年2月起)对于当前生成实例,可以在控制台中动态进行卷类型更改,而无需停止实例。但是,当我进入我的控制台时,我只能在io1(当前)或gp2(也是SSD)之间进行选择,我想为此实例选择sc1(冷存储)。该视频清晰地显示了此选项(从io1到sc1)。

    options to change volume - no sc1

    我错过了什么吗?从SSD到HDD有限制吗? (我在亚洲悉尼地区)。

    或者,如果该选项不可用且我要求数据收集继续进行,那么我的唯一选择似乎是:

    1. 使用以附加根目录的EBS sc1卷部署的数据收集脚本重新创建类似的实例
    2. 运行数据收集(现在收集双倍)
    3. 停止旧实例并拍摄io1 EBS卷的快照
    4. 使用快照
    5. 创建EBS sc1卷
    6. 将EBS sc1卷附加到新实例(作为附加卷,而不是根目录)
    7. 这是正确的方法吗? (如果我在运行时无法将音量类型更改为sc1)

1 个答案:

答案 0 :(得分:4)

tldr;

The 2 main reasons why amazon will not propose sc1/st1 type when editing the EBS volumes are:

  • the current volume is used as root device of the ec2 instance
  • the current storage is less than 500 Gb

I guess the volume you want to change is used as root device of the instance; in this case you cannot have boot volume of magnetic type st1 or sc1.

Note also the sc1 volume must be at least 500 Gb

You can read more about EBS Volume Types

Unfortunately, you cannot change the root device of a running instance, you can do that while the instance is stopped.

so you can follow your steps proposed but you can make the change of the EBS after it will be detached from the first ec2 instance

  1. re-create a similar instance with the data collection scripts deployed with an EBS sc1 volume as root attached (You cannot have sc1/st1 drive as boot volume; if you want magnetic storage you need to select standard Magnetic storage; but ideally you should have a low volume ssd drive as boot volume and the large magnetic drive as additional ebs volume)
  2. get the data collection running (now collecting double)
  3. stop the old instance and detach the EBS volume
  4. make the modification of the EBS volume (type/storage)
  5. attach the EBS sc1 volume to the new instance (as additional volume, not root)