0

I've just launched an AWS EC2 r3.large instance with Ubuntu. r3.large has 32GB SSD for instance store with it. My problem is that the size of the root volumne /dev/xvda is too small and I can't find an effective way to use all 32GB in my instance-store backed EC2 instance.

  1. If I don't Add Storage when Launching an Instance, I get an /dev/xvda of 10 GB, which I understand is the maximum possible for instance-store root volumes.

  2. If I do Add Storage when Launching an Instance, I get an even smaller /dev/xvda of only 2.2 GB as shown by sudo fdisk -l below.

Disk /dev/xvda: 2.2 GiB, 2361393152 bytes, 4612096 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xef20d59b

Device     Boot Start     End Sectors  Size Id Type
/dev/xvda1 *     2048 4610047 4608000  2.2G 83 Linux


Disk /dev/xvdb: 30 GiB, 32212254720 bytes, 62914560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

My questions are:

  1. How can I get an 10GB root and use the rest of the instance store for /dev/xvdb ? (instead of having a tiny root volume and everything else in /dev/xvdb)

  2. Is there a way to use the space in /dev/xvdb seamlessly in the root volume?

-- UPDATE --

The output of lsblk is:

$ sudo lsblk 
NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
xvda    202:0    0  2.2G  0 disk 
└─xvda1 202:1    0  2.2G  0 part /
xvdb    202:16   0   30G  0 disk 

Also, now I tried to launch new instances without specifying any additional storage (i.e. leaving it as the default), but I can't even get back the 10GB /dev/xvda. EC2 somehow consistently create the 2.2G root, which isn't going to hold the packages I'm going to install.

3
  • What does lsblk show? (edit into question, please) Commented Nov 26, 2017 at 17:52
  • @Michael-sqlbot Please see the update for lsblk.
    – tinlyx
    Commented Nov 26, 2017 at 18:07
  • I would be inclined to try something like UnionFS -- create a separate filesystem on that second (virtual) block device and merge it into your root filesystem. Since they presented to the kernel as two devices, I don't see an obvious way to do it at a lower level. Commented Nov 26, 2017 at 18:29

1 Answer 1

0

From https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/add-instance-store-volumes.html

For instances with an instance store volume for the root volume, the size of this volume varies by AMI, but the maximum size is 10 GB.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .