1

I have created an c3.large instance using amazons default image "amazon-linux-centos-64-bit (ami-673af20e)". When I set it up I created a root volume of only 8GB. So theoretically I should be able to create another 8GB + 16GB SSD volume (c3.large has 2 x 16GB SSD) that I could use for swapping or so. Unfortunately I can't figure out how to do this - so my question is: can I (and if so how) create another volume that takes advantage of the SSD Speed?

Thank you,

Peter

Edit: I tried to find out the phyical size of the device using df:

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1      7,9G  3,0G  4,9G  38% /
tmpfs           1,9G     0  1,9G   0% /dev/shm

Seems the device really only has 8GB.

$ swapon -s
Filename                Type        Size    Used    Priority
$ lsblk
NAME  MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
xvda1 202:1    0    8G  0 disk /
Peavey
  • 113
  • 1
  • 5
  • Can you check what your software indicates the actual disk size is. Keep in mind that there is always some overhead on partitions and even in the actual disk image. Check this page http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html – HTDutchy Dec 25 '13 at 21:09
  • What's the output of `fdisk -l` run as root? – Mark Wagner Dec 26 '13 at 18:52

1 Answers1

2

Instance storage must be setup before you start the instance. There's nothing you can do while the system is running.

You have two options, and either option you choose, pay attention to the step where you setup the volumes:

1) If you didn't install anything substantial on that server, throw it away and create a new one from the scratch.

2) Otherwise, create a Snapshot from its EBS volume, backup the content from your Ephemeral, and create a new instance from the Snapshot.

David Schwartz
  • 31,449
  • 2
  • 55
  • 84
  • "Instance storage must be setup before you start the instance." Really? I've unounted / reformatted instance storage many times. Are you just talking about the root disk? – Mark Wagner Dec 26 '13 at 18:51
  • @MarkWagner He needs to mount it in the first place, which he can't do because it's not attached. You can't attach new instance storage to a running instance. – David Schwartz Dec 26 '13 at 18:55
  • Unless this is an odd instance type, the instance storage is automatically attached to the instance. – Mark Wagner Dec 26 '13 at 19:02
  • @MarkWagner Whatever instance storage (assuming it's permitted by the instance type) [specified in the AMI](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html#Using_AddingDefaultLocalInstanceStorageToAMI) (or [overriden before instance creation](http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ApiReference-cmd-ModifyInstanceAttribute.html)) is attached to the instance when it's created. Any storage not attached at creation time is [forever inaccessible](http://stackoverflow.com/a/10687223/721269) to the running instance. – David Schwartz Dec 27 '13 at 01:17
  • Correct, Once the Instance is created, you can only attach new EBS volume but there is no way to attach instance storage to a running instance. – slayedbylucifer Dec 27 '13 at 07:59