Find ASM physical disk mapping

When you work in a RAC environment with a list of ASM disks, sometimes you might want to figure out which ASM disk is mapped to which physical device. Below is a simple script that will help you find out ASM disks that are mapped to Linux partitions

ASM Disk mapping script

echo "ASM Disk Mappings"
echo "----------------------------------------------------"
for f in `$ORACLEASM listdisks`
dp=`$ORACLEASM querydisk -p  $f | head -2 | grep /dev | awk -F: '{print $1}'`
echo "$f: $dp"

Sample output

And below is the sample output:

ASM Disk Mappings
CRSDISK1: /dev/sdb3
DATADISK1: /dev/sdb1
FRADISK1: /dev/sdb2

Was this article helpful?

Related Articles

Leave a Comment