简体   繁体   English

访问实例存储Amazon EC2

[英]Accessing the instance storage Amazon EC2

I know it is a newbie question but the documentation is really not clear about that. 我知道这是一个新手问题,但文档真的不清楚。

I have successfully launched a Cluster Instances Amazon Linux AMI 2011.02.1 cc1.4xlarge instance. 我已成功启动了Cluster Instances Amazon Linux AMI 2011.02.1 cc1.4xlarge实例。 I need to upload and process a 15 GB text file and I don't know how to activate the "additional" storage. 我需要上传和处理15 GB的文本文件,我不知道如何激活“额外”存储。

By default, I have just 8 GB of storage. 默认情况下,我只有8 GB的存储空间。 Can someone help me writing simple and clear instruction on how to activate all the storage (1690 GB) I should have? 有人可以帮我写一些关于如何激活我应该拥有的所有存储空间(1690 GB)的简单明了的指令吗?

Thanks a lot in advance. 非常感谢提前。

Regards, 问候,

Eugenio 欧亨尼奥

You should be able to mount your ephemeral drives by following this guide . 您应该能够按照本指南安装临时驱动器。

Cheers. 干杯。

It's a very common question and there's a large confusion that everyone has around this when starting to work with AWS EC2. 这是一个非常常见的问题,在开始使用AWS EC2时,每个人都有很大的困惑。

There are 2 things to have in mind here : 这里有两件事要记住:

  1. Instance Type 实例类型
  2. AMI (Amazon Machine Image, basically a disk snapshot with some operating system) AMI (亚马逊机器映像,基本上是带有一些操作系统的磁盘快照)

Each AMI has some requirements that will dictate parts of the configuration of your created instance. 每个AMI都有一些要求,这些要求将决定所创建实例的部分配置。

Here we're concerned with the Root Device type of an AMI : 这里我们关注AMI的根设备类型:

EBS-backed AMI EBS支持的AMI

These AMI's only work on instances that have an EBS volume attached. 这些AMI仅适用于附加了EBS卷的实例。 And therefore if you choose an EBS-backed AMI, the wizard will by default add an EBS volume (usually of size 8 GiB) without you noticing , and you'll be charged for this EBS separately in addition to the EC2 hourly charge. 因此,如果您选择EBS支持的AMI, 向导将默认情况下添加EBS卷(通常大小为8 GiB)而您不会注意到 ,除了EC2每小时费用外,您还需要另外收取此EBS的费用。 In this case when you ssh to your instance you will only find 8 GiBs of storage and not the large storage you're promised when you view the EC2 Pricing table at https://aws.amazon.com/ec2/pricing/ . 在当您ssh到您的实例这种情况下,你只能找到存储的8个GIBS,而不是当你在查看EC2定价表你所承诺的大容量存储https://aws.amazon.com/ec2/pricing/ And that is confusing. 这令人困惑。

If you also want to use your -usually large- instance store with these AMIs, then when you create that instance you have to explicitly add a volume and select Instance Store 0 from Volume Type (in Step 4 - Add Storage). 如果您还想使用具有这些AMI的-usually large-instance商店,那么在创建该实例时,您必须显式添加卷并从卷类型中选择Instance Store 0 (在步骤4 - 添加存储中)。 You may have more than 1 drives assigned to your instance type, you need to add all of them in this case (Instance Store 0,1,..etc). 您可能有多个驱动器分配给您的实例类型,在这种情况下您需要添加所有驱动器(Instance Store 0,1,...等)。 These volumes can only be added at creation time. 这些卷只能在创建时添加。 If the volumes were automatically mounted then you'll find them at /media/ephemral* , if not, you'll have to mount them manually. 如果卷是自动安装的,那么你会在/media/ephemral*找到它们,如果没有,你将不得不手动安装它们。

Instance-Store-backed AMI Instance-Store支持的AMI

Those images use the Instance Storage as their root device (the OS will be installed on the instance store at / ). 这些映像使用Instance Storage作为其根设备(操作系统将安装在实例存储中的/ )。 I think the confusion comes from the fact that these AMI's are not instantly viewable in the Quick Start tab of Step 1 at which you choose the AMI. 我认为这种混淆来自这样一个事实,即在您选择AMI的步骤1的“快速启动”选项卡中无法立即查看这些AMI。 All AMIs in the Quick Start tab are EBS-backed, and Instance Store AMIs are very uncommon these days, everyone uses EBS-backed AMIs because of their various speed and persistence benefits, and that's recommended by Amazon as well. “快速入门”选项卡中的所有AMI都支持EBS,而Instance Store AMI现在非常罕见,每个人都使用EBS支持的AMI,因为它们具有各种速度和持久性优势,并且亚马逊也推荐这样做。

If you want an instance-store-backed AMI to avoid dealing with any EBS whatsoever, then in Step 1, choose the tab Community AMIs, and filter them by Root Device Type = Instance Store , then choose your AMI. 如果您希望实例存储支持的AMI避免处理任何EBS,则在步骤1中,选择Community AMI选项卡,并按Root Device Type = Instance Store过滤它们,然后选择您的AMI。 Whether or not you add Instance Store 0 in Step 4 - Add Storage , the instance store will be available. 无论是否在步骤4 - 添加存储中添加Instance Store 0 ,实例存储都将可用。

Check what Amazon Linux AMI type you're launching the image as. 检查您正在启动图像的Amazon Linux AMI类型。 In my experience, if you launch with the "EBS-backed" AMI type, it won't mount the ephemeral storage. 根据我的经验,如果使用“EBS支持的”AMI类型启动,它将无法安装临时存储。 If you switch to the "Instance Store" type, it will mount it for you at /media/ephemeral0 如果切换到“Instance Store”类型,它将在/media/ephemeral0为您安装

http://aws.amazon.com/amazon-linux-ami/ http://aws.amazon.com/amazon-linux-ami/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM