Every Debian 8 Jessie AMI that I launch in Amazon Web Services is only putting the root OS onto an 8GB partition regardless of what I set the size to at launch time. I know there is some documentation around how the size is set when an AMI is created. But I spoke to support at AWS and they said that this is unexpected behavior. Also, when I launch another Linux distro (eg Ubuntu) the same way I can set the root partition size at launch time no problem. I then begin to wonder why nobody has mentioned this much on the internet. I've searched around and haven't come up with any real answers. I'm also beginning to wonder if Debian is falling out, if I should go with Ubuntu. I still read on the internet that Debian is #1 choice for production web servers. I've also posted on forums and emailed Debian but I have yet to have a solid response about their EC2 AMIs.


Solution 1:

According to the folks at bootstrap-vz it is an issue with growpart on Debian Jessie (#784004).

For detailed information on this exact issue please read the Github issue:

Debian 8 AMI only using 8GB partition #267

In the meantime, it only takes two simple commands to easily resize the partition:

:# sudo parted /dev/xvda resizepart 2
Warning: Partition /dev/xvda2 is being used. Are you sure you want to continue?
Yes/No? Yes
End?  [8590MB]? 20GB <===== PUT SIZE OF EBS HERE
Information: You may need to update /etc/fstab.

:# sudo resize2fs /dev/xvda2
resize2fs 1.42.12 (29-Aug-2014)
Filesystem at /dev/xvda2 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 2
The filesystem on /dev/xvda2 is now 4882556 (4k) blocks long.