AWS CentOS Resize Disk

How to Resize a Disk from AWS CentoOS Image

 

Then create a new AMI. On boot, the cloud-init "growpart" module will grow the root partition to the total EBS size. Clearly, if that's not what you what, change or ignore that advice.
You can also fix this manually with a repartition and a reboot, but this will not automatically work as a new image.
# fdisk /dev/xvda <<END
u
d
n
p
1
2048
w
END
# reboot
# (after reboot)
# resize2fs /dev/xvda1
# df -h / # should now be entire EBS volume

 

aws_centos_disk_resize

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s