A Short Script to List Mappings of ASM Disks to Physical Devices

I got a warning mail from our Enterprise Manager Cloud Control, it says “Disk Device emcpowere1 is 98.468% busy.”. I logged into the server to see the busy disk. There were no related mount point points so it should be used by ASM, but because we use ASMLIB, I needed to query each ASM disk to see which physical device it’s mapped to.

If you have a few disks, it won’t take time to check each disk using “oracleasm querydisk -p” but we have over 10 disks so I wrote a short script to query all ASM disks:

I’m sure this script can be converted to a one-liner but I would prefer “readable” scripts. By the way, I used “head -2” to eliminate additional disk aliases, otherwise script could produce such an output:

After I wrote the script, I checked My Oracle Support and see that there was a better script using “kfed” tool. You may check MoS Doc ID 1098682.1 to get the script.

Please share

AWS Big Data Specialist. Oracle Certified Professional (OCP) for EBS R12, Oracle 10g and 11g. Co-author of "Expert Oracle Enterprise Manager 12c" book published by Apress. Awarded as Oracle ACE (in 2011) and Oracle ACE Director (in 2016) for the continuous contributions to the Oracle users community. Founding member, and vice president of Turkish Oracle User Group (TROUG). Presented at various international conferences including Oracle Open World.

1 Comment

Leave Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.