The EC2 standard EBS is 8G. Planning a simple single EBS instance, the EBS will also contain / and root partition.
Following the steps in http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html, we can expand the EBS without stopping the instance.
The key steps:
1) Login to AWS Console, locate the EBS and modify the volume size - there is no need to stop the instance (if you are using the current generation of EC2 and EBS - as of Oct, 2017)
2) SSH to the EC2
3) Run lsblk - you will see xvda / xvda1 with different sizes, meaning you need to resize the partition before you can expand the volume
4) Resize the partition - growpart /dev/xvda 1 (note the space between xvda and 1)
5) The resize the filesystem - resize2fs /dev/xvda1
There are other posts saying stopping the instance, and use parted and gdisk.
In our case, it is not necessary.
There are disadvantages of a using single EBS scenario, but the beauty is that OS/APP/DB can be detached and mount on another EC2 quickly with just a few AWS Console manipulation.
Following the steps in http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html, we can expand the EBS without stopping the instance.
The key steps:
1) Login to AWS Console, locate the EBS and modify the volume size - there is no need to stop the instance (if you are using the current generation of EC2 and EBS - as of Oct, 2017)
2) SSH to the EC2
3) Run lsblk - you will see xvda / xvda1 with different sizes, meaning you need to resize the partition before you can expand the volume
4) Resize the partition - growpart /dev/xvda 1 (note the space between xvda and 1)
5) The resize the filesystem - resize2fs /dev/xvda1
There are other posts saying stopping the instance, and use parted and gdisk.
In our case, it is not necessary.
There are disadvantages of a using single EBS scenario, but the beauty is that OS/APP/DB can be detached and mount on another EC2 quickly with just a few AWS Console manipulation.
Comments
Post a Comment