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.

One Response to “A Short Script to List Mappings of ASM Disks to Physical Devices”

  1. Rakesh Tripathi says:

    Thanks for the script !

Leave a Reply

Your email address will not be published. Required fields are marked *