Agnus Dei (jackal) wrote,
Agnus Dei
jackal

Script for getting AWS drive information

Script for getting AWS drive information
[~]# cat /usr/local/devops/bin/get_aws_drive_info
#!/bin/bash
 
for i in `wget -q -O - http://169.254.169.254/latest/meta-data/block-device-mapping/`; do 
 if [ "$i" == "ami" ] ; then
  continue
 fi
 wget -q -O - http://169.254.169.254/latest/meta-data/block-device-mapping/$i; 
 echo : $i; 
done



Results Example:
[~]# /usr/local/bin/get_aws_drive_info
sdf: ebs1
sdg: ebs2
sdh: ebs3
sdw: ebs4
sdx: ebs5
sdy: ebs6
sdz: ebs7
sdb: ephemeral0
sdc: ephemeral1
/dev/xvda: root

Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 0 comments