AWS EC2 本地存储 Volumes/nvme 卷

AWS EC2 Local Storage Volumes/nvme volume

我正在使用“m5d.8xlarge”ec2 实例,它带有 2*600G SSD 卷,直接连接。它们出现在 OS 上,但在控制台上没有提及,因为我无法检索有关它们的任何信息。

它还显示卷的序列号为 AWS-*** 而不是正常的 EBS 卷 vol***。

I read that these are ephemeral or something; I want to have any AWS official docs that thoroughly explain how this local storage works, as we are hosting prod workload on it, appreciate if someone can explain or provide docs.

"m5d.8xlarge" ec2 instances comes with 2 ephimeral storage which are instance store volume.

实例存储卷 (docs) 直接附加到底层硬件以减少延迟并增加 IOPS 和数据吞吐量。

但是有一个警告,如果您的 ec2 实例被终止、停止、休眠或停止,或者底层硬件由于某些故障而关闭,则存储在这些临时存储上的所有数据都将丢失。 通常实例存储卷用于缓冲区、缓存。

为了确认你可以按照这个https://aws.amazon.com/premiumsupport/knowledge-center/ec2-linux-instance-store-volumes/ :-

  1. ssh 进入 ec2 实例
  2. 安装 nvme-cli 工具 -> sudo yum instal nvme-cli
  3. sudo nvme list - 列出所有实例存储卷

如果你希望数据持久化,你应该选择 EBS 或 EFS

EBS docs, EFS docs

In short If you want to access data with super low latency and you can afford to loose data go for instance store but if it is business critical data for example database workload go for EBS, YOu can still achieve very high IOPS and throughput using IO1,IO2 volume types or if you have a want to go even further use nitro ec2 instance type which gives maximum 64000 IOPS.

使用 EBS 卷类型来提高 IOPS 和吞吐量 https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html