use parted on amazon ec2 for ext4 code example Example: aws extend volume ubuntu lsblk sudo growpart /dev/xvda 1