Last active
December 17, 2015 02:19
-
-
Save wilrnh/5534380 to your computer and use it in GitHub Desktop.
Script to create a ton of EBS volumes (eg for a RAID setup); requires awscli available from pip
This file contains 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
for i in {1..8}; do aws ec2 create-volume --availability-zone us-east-1d --size 128 --output text >> _disks; done | |
(i=0; for d in `awk '{print $4}' _disks`; do i=$((i + 1)); aws ec2 create-tags --resources ${d} --tags '{"key":"Name", "value": "_disks"}'; aws ec2 attach-volume --instance-id i-xxxxxxxx --volume-id ${d} --device /dev/sdg${i}; done) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment