Created
September 8, 2015 16:14
-
-
Save hostmaster/2b9f5154702aee81197b to your computer and use it in GitHub Desktop.
aws resize root volume
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws ec2 stop-instances --instance-ids i-ID | |
aws ec2 detach-volume --volume-id vol-ID | |
aws ec2 create-snapshot --volume-id vol-ID | |
while : ; do aws ec2 describe-snapshots --snapshot-ids snap-ID; sleep 5; done | |
aws ec2 create-volume --snapshot-id snap-ID --availability-zone ${AZ} --size ${SIZE} | |
aws ec2 attach-volume --volume-id vol-NEWID --instance-id i-ID --device /dev/sda1 | |
aws ec2 start-instances --instance-id i-ID | |
aws ec2 describe-instance-status --instance-id i-ID | |
aws ec2 delete-snapshot --snapshot-id snap-ID | |
aws ec2 delete-volume --volume-id vol-ID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment