6

I am trying to create an EC2 large instance. AWS claims to say I shall get 850 GB instance storage if I go for Large Instance. I configure the VM to have the Root Volume size of 100 GB.

But, when I start the EC2 VM and ssh to it, it just shows me 8 GB of storage(df -h).

How do I use the whole of 850 GB. Can you please suggest where am I doing it wrong. Thanks

rahulg
  • 407
  • 1
  • 4
  • 10

1 Answers1

6

The large 850 GB drive space advertised with the instance information is "instance storage". That means that it's the drive space available on the physical hardware of the machine that you are running on.

When you create a new EC2 instance, if your instance is EBS-backed, then by default, this "instance storage" is not available to you. The 8 GB that you are seeing is the default 8 GB EBS volume created for your Linux instance.

To access your desired 100 GB, you have 2 options:

  1. Increase the size of your root EBS volume to 100 GB during the launch wizard. Use 'resize2fs' to access the full volume size after initial boot.
  2. Map the "instance storage" to a device during the launch wizard. You'll need to mount and create your file system on this volume after initial boot.

Alternatively, you can create an "instance-backed" EC2 instance instead of an EBS-backed instance. This will put your root volume on the "instance storage" of the hardware. Beware though that "instance-backed" instances cannot be stopped and you'll lose all data if the instance is terminated.

Matt Houser
  • 10,053
  • 1
  • 28
  • 28
  • Thanks a ton. That resolved many things , but two more doubts. 1) Amazon claims that `instance storage` is not safe for long term use and should prefer using EBS, then what is the point of those 850 GB 2) While creating an instance in `Storage Device Configuration` I set 'EBS Volumes' as well as 'Instance store Volumes', still none of them get listed other than 'Root Volume'. How do I get them mounted? Do I have to mount different Volumes(But they are not listed absolutely anywhere) – rahulg Oct 01 '12 at 16:10
  • 1
    1) The point of the instance storage when using an EBS-backed instance is basically large amounts of temp space. Depending on your application, you can store temporary data there. You won't be charged for that EBS storage and access to that space should be faster than to an EBS volume. – Matt Houser Oct 01 '12 at 17:33
  • 2) Make sure you "Add" your instance storage volumes on the "Storage Device Configuration" page. The volume should appear in the list below as "Ephemeral" along with a device name (such as /dev/sdf). Inside your instance, you will need to use 'mount' and/or /etc/fstab to mount this device into your file system. – Matt Houser Oct 01 '12 at 17:36