Remove unused volume?

volumeid=(
vol-xxxxxxxxxxxxxxxxxxx
vol-xxxxxxxxxxxxxxxxxxx
vol-xxxxxxxxxxxxxxxxxxx
vol-xxxxxxxxxxxxxxxxxxx
vol-xxxxxxxxxxxxxxxxxxx
)
COUNTER=0
for (( i=0; i<${#volumeid[@]}; i++ ));
do
COUNTER=$((COUNTER+1))
echo "++++";
echo $COUNTER". Removing the volume with the Volume ID: " ${volumeid[$i]};
aws ec2 delete-volume --volume-id ${volumeid[$i]};
done

Comments

Popular posts from this blog

Logical volume vmxxxx_img is used by another device - Error on LVM removal

Open VZ cheat Sheet

Cheat sheet for Hardware RAID health check - Megaraid, Adaptec, 3wareraid and HPraid.