简体   繁体   中英

Amazon EC2 Storage lacks

I have launched Amazon EC2 instance of "m3.large" type. According to this page , m3.large should have 2vCPUs, 7.5GiB Memory and 1x32GB SSD Storage .

But df -ah returns following results. 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.

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.

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.

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

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.

If this is the case, the above link also shows you how to extend your file system to the maximum space.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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