aws increase volume size code example

Example 1: aws extend volume ubuntu

lsblk
sudo growpart /dev/xvda 1

Example 2: aws modify volume size

#after modifying volume in aws account restart server and volume will be expaneded
#or 
sudo growpart /dev/xvda1 1
#may need to change xvda1 with your file system name to see names run:
df -hT

Example 3: aws cli to increase the volume size

aws ec2 modify-volume --size 150 --volume-id vol-1234567890abcdef0

Example 4: aws resized volume but still not space on ec2

sudo resize2fs /dev/xvda1

Tags:

Misc Example