0

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?

ai0307
  • 4,037
  • 2
  • 13
  • 21
  • might related to [this](http://stackoverflow.com/questions/23092436/ssd-drives-not-accessible-in-ec2-ubuntu-instances) – noname Jun 16 '15 at 08:38
  • @noname you are correct. The comment [on this answer](http://stackoverflow.com/a/23305375/1695906) gives more info. The 32 GB is the *ephemeral disk*. It is not EBS, it's an internal hard drive on the vm's host, for temp files, swap space, anything you need a disk for that won't persist across instance stop/start or host machine failure. Some instance classes auto-format as ext2 and mount this, others do not. Try `lsblk` and see if you have a `/dev/xvdb`. – Michael - sqlbot Jun 16 '15 at 11:46

2 Answers2

1

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.

Screenshot of Add Storage section

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.

Mike
  • 4,852
  • 1
  • 29
  • 48
  • Thank you Mike, I figured out how to add storage. But what does "second volume" mean? Volumes mounted on other directories than root volume? – ai0307 Jun 16 '15 at 08:48
  • In the screenshot, there is a button underneath called "Add New Volume". It will basically act like you've plugged another hard disk into your machine. You may need to manually mount it, though, using the device name (which will look like `/dev/xvda`). If you're not familiar with doing that sort of thing, though, it would be easier to just stick to the root volume. If you spend much time with EC2 in future, though, it will probably be worth the investment to learn how that sort of thing works. – Mike Jun 16 '15 at 09:03
1

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.

noname
  • 369
  • 3
  • 14