One of my customers is working with ASM and their database grows really fast. So every one in a while we need to add another ASM disk to the system.
Before I add a new ASM disk, I usually verify that there is indeed a new disk in the system that is not being used. And this includes multiple steps (to check disks and partitions allocated to filesystem and those allocated to ASM).
So, I’ve decided to write a script to do that. Here it is, feel free to use it and let me know if I missed anything. Here are two scripts, one prints all ASM disks with their devices and diskgroup, the other one scans the partitions (for linux, currently working only with asmlib, and only for standard partitions using fdisk) and prints what they are used for.
List physical device and ASM diskgroup for each ASM disk:
List all disks and partitions with their usage: