• Call: +1 (858) 429-9131

Root Partition Size Limitation for EC2 Instances on AWS Cloud

Eventhough  AWS is a great cloud computing service , it does have it’s own disadvantages . We are not going to discuss all of  them here but we will look into  one of them  .  If you have launched   EC2 instances  from Amazon Machine Images  ( AMI ) , you might have  seen that the size of the root partition ( / ) is only  10GB  for all  the instances . So to test if  we can have more than 10GB for  root partition ,  we tried  the following

1 ) We  decided to create a  Custom AMI of  our  local system using Loopback file .

2 ) For this , we  created a Loopback file  of size  50GB .

3 ) But when we  tried to  Bundle  the image ,  we  got the following error

[bash]ERROR : The specified image file  LoopBackFileName.img  is too large[/bash]

4 ) When  we tried again with a smaller Loopback image file of size 15Gb , we got the same error .

So currently  for EC2 instances , we cant resize the preconfigured 10GB  limit  for Root Partition ( /  partition )  .  But there are few workarounds for this limitation .

1 ) If you want to install anything  on Root partition , then you can install it on a directory under /  and move the installation directory to an EBS volume and create a softlink  on  /   to the  installation directory in EBS .

2 ) Aws has introduced a new feature called  “Boot From EBS”  which will allow you to have  upto  1TB   for Root Partition . Please check our  blog on  BootFromEBS to  find out how to resize  the root partition in an EC2 instance.   Basically we can have more than 10GB for the root partition by this method.


Associated Links

  • Amazon.com
  • Amazon.com
  • Amazon Machine Image
  • Loopback
  • Disk partitioning

  • 2 Comments

    1. mahesh says:

      Hi,
      Thanks for this article.
      yes I also observed the same thing that when /root partition size exceeds 60% then bundling image task itself fails.
      I observed that my EBS-volume I mounted it on /root e.g. /EBS_Volume
      while bundling it considering /EBS_Volume as directory and bundling that much data as its part of /root ….

      Mounting EBS volume on /root device generally should not affect bundling image process.
      Please tell me what is best way to avoid such things.

    2. shankar says:

      Hello mahesh ,

      The bundling process will fail if the size of / exceeds 10GB . That is why ec2-bundle-vol command excludes /mnt by default

      What is the size of the EBS volume you mounted on /EBS_volume ?

      Please try to bundle by using “–exclude” option with “ec2-bundle-vol” command and let us know if you are still facing any issues ?

      Thanks
      Shankar.S
      Software Engineer
      http://www.migrate2cloud.com

    Leave a Reply