List ALL ASM Disks with header ( AIX )

Hello ALL,,

 

Below is script Tested on AIX Environments to List ALL ASM Disks ( Oracle ASM ) with SN , Header of DIsk , Major and Minor ,,

 

cd /dev/
for i in `lspv |grep None |awk '{print $1}'`
do
disk=$i
serial=`lsattr -El $disk | grep unique | awk '{print $2}' | cut -c6-37`
size=`bootinfo -s $disk`
data_g=`lquerypv -h $disk 80 20|awk '{print $6}'|sed 's/\.//g'|sed 's/|//g'|sed 's/ //g'|tr -d '[[:space:]]'`
min=`ls -l $disk|tr "," " "|awk '{print $6}'`
echo $disk"\t\t"Major 13, Minor $min"\t"$serial"\t"$size"\t"$data_g"\t"$mknd
done|sort -k 6
cd -

 

Many Thanks for @Sherif Gamal 🙂

This entry was posted in AIX. Bookmark the permalink.

Leave a Reply

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