简体   繁体   English

Amazon EC2存储缺乏

[英]Amazon EC2 Storage lacks

I have launched Amazon EC2 instance of "m3.large" type. 我已启动“ m3.large”类型的Amazon EC2实例。 According to this page , m3.large should have 2vCPUs, 7.5GiB Memory and 1x32GB SSD Storage . 根据此页面 ,m3.large应该具有2vCPU,7.5GiB内存和1x32GB SSD存储

But df -ah returns following results. 但是df -ah返回以下结果。 It seems that the instance lacks the volume. 实例似乎缺少该卷。

Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1      7.9G  797M  6.7G  11% /
proc               0     0     0    - /proc
sysfs              0     0     0    - /sys
devpts             0     0     0    - /dev/pts
tmpfs           3.6G     0  3.6G   0% /dev/shm
none               0     0     0    - /proc/sys/fs/binfmt_misc

Are there any process required to use full storage? 使用完整存储是否需要任何过程?

The size of the EBS volume is whatever you set it to be, it's not tied to the instance type. EBS卷的大小是您设置的大小,它与实例类型无关。

If you click "Volumes" on the left of the dashboard and find the volume that's attached to your instance, you will probably find that it's only 8GB, which is a common default for Amazon AMIs. 如果单击仪表板左侧的“卷”并找到实例所连接的卷,则可能会发现它只有8GB,这是Amazon AMI的常见默认设置。

When you create a new instance, you are asked if you want to add storage, currently in section 4. This is already filled out with a root volume of 8GB. 创建新实例时,系统会在第4节中询问您是否要添加存储。该存储已经用8GB的根卷填充了。

“添加存储”部分的屏幕截图

For flexibility's sake, it is probably best to add a second volume to increase your storage rather than making the root volume bigger, since you can detach/reattach secondary volumes much much easier. 出于灵活性的考虑,最好添加第二个卷以增加存储量,而不是增大根卷,因为这样可以更轻松地分离/重新连接辅助卷。 Just be sure to keep all your user data on the secondary volume, rather than the primary. 只要确保将所有用户数据保留在辅助卷上即可,而不要保留在主卷上。

In this tutorial , it mentions 在本教程中 ,它提到

If the size does not reflect your newly-expanded volume, you must extend the file system your device so that your instance can use the new space. 如果大小不反映新扩展的卷,则必须扩展设备的文件系统,以便实例可以使用新空间。

To check if your volume partition needs resizing: 要检查您的卷分区是否需要调整大小:

Use the lsblk command to list the block devices attached to your instance. 使用lsblk命令列出附加到您的实例的块设备。

If this is the case, the above link also shows you how to extend your file system to the maximum space. 在这种情况下,上面的链接还显示了如何将文件系统扩展到最大空间。

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

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