Obtener Información de discos y vg

  AIX

for i in $(lspv |awk ' {print $1}');do
SERIAL=$(lscfg -vl $i|grep Serial|awk 'BEGIN { FS = "." } ; {print $NF}' )
VG=$(lspv |grep -w ^$i |awk '{print $3}')
ORCL=$( /usr/sbin/lquerypv -h /dev/$i |cut -c50-65 |awk '{printf "%s",$0}END{printf "\n"}' |cut -c33-64 |tr -s "." " " )
H1=$( /usr/sbin/lquerypv -h /dev/$i |cut -c50-65 |awk '{printf "%s",$0}END{printf "\n"}' |cut -c73-104 |tr -s "." " " )
H2=$( /usr/sbin/lquerypv -h /dev/$i |cut -c50-65 |awk '{printf "%s",$0}END{printf "\n"}' |cut -c105-136 |tr -s "." " " )
H3=$( /usr/sbin/lquerypv -h /dev/$i |cut -c50-65 |awk '{printf "%s",$0}END{printf "\n"}' |cut -c137-168 |tr -s "." " " )
echo $i $SERIAL $ORCL $H1 $H2 $H3 $VG |awk '{if ( $3 ~ /ORCLDISK/ ) {printf "%-10s %s %-15s %-32s %-32s %-32s\n",$1,$2,$3,$4,$5,$6}else {printf "%-10s %s %-30s\n",$1,$2,$NF}}'
done | sort -k3

hdisk16 600202680B200107A100000000000CCC altinst_rootvg
hdisk0 600202680B200107A100000000000CAC backvrlvg
hdisk5 600202680B200107A1000000000001ASA backvrlvg
hdisk1 600202680B200107A1000000000001CAA datosvg
hdisk10 600202680B200107A100000000000C31 datosvg
hdisk2 600202680B200107A10000000000032D datosvg
hdisk6 600202680B200107A100000000000DAF datosvg
hdisk3 600202680B200107A100000000000CC1 nimvg
hdisk7 600202680B200107A100000000000321 nimvg
hdisk8 600202680B200107A100000000000337 nimvg
hdisk4 600202680B200107A1000000000003D9 vruizlvg
hdisk9 600202680B200107A1000000000004AF rootvg