Linux – How to use full 32GB of SSD in the c3.large EC2 instance

amazon ec2linuxssd

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 /

Best Answer

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.