How to find the t-factor applied to VG
The standard AIX utilities such as "lsvg" doesn’t directly show the volume group type or the volume group factor.
I've written a script that produces a quick report showing several things such as the volume group type, factor size, max PV's, used PV's, Max PP's per PV, PP Size, and max disk size.
This is a shell script and can be used to find the VG information.
Script
for i in ` lsvg -o`
do
MAXPP=`lsvg $i|grep " MAX PVs:" |awk '{print $5}' `
MAXPVs=`lsvg $i|grep " MAX PVs:" |awk '{print $8}' `
TOTALPVs=`lsvg $i|grep "TOTAL PVs:" |awk '{print $3}' `
PPSIZE=`lsvg $i|grep "PP SIZE:" |awk '{print $6}' `
total=`echo "$MAXPVs*$MAXPP" |bc`
maxdisk=`echo "$PPSIZE*$MAXPP" |bc`
if [ "$MAXPVs" -eq 1024 ]
then
type="scale"
elif [ "$total" -ge 22352 ] && [ "$total" -le 32512 ]
then
type="normal"
elif [ "total" -ge 87376 ] && [ "$total" -le 130048 ]
then
type="big"
else
type="error determining VG type"
fi
if [ "$type" = "normal" ] || [ "$type" = "big" ]
then
factor="`echo "$MAXPP/1016"|bc`"
else
factor="N/A"
MAXPP="N/A"
maxdisk=`echo "$PPSIZE*2097152" |bc`
fi
echo "-------------------------------------------------------------------------------------------------------------------------------------------"
print - " VG=$i\tType:$type\tMaxPV's:$MAXPVs\tUsedPV's:$TOTALPVs\tVG factor:$factor\tMaxPP's/PV:$MAXPP\tPPSize(MB):$PPSIZE\tMaxdisk(MB):$maxdisk "
done
Sample Output:
for i in ` lsvg -o`
do
MAXPP=`lsvg $i|grep " MAX PVs:" |awk '{print $5}' `
MAXPVs=`lsvg $i|grep " MAX PVs:" |awk '{print $8}' `
TOTALPVs=`lsvg $i|grep "TOTAL PVs:" |awk '{print $3}' `
PPSIZE=`lsvg $i|grep "PP SIZE:" |awk '{print $6}' `
total=`echo "$MAXPVs*$MAXPP" |bc`
maxdisk=`echo "$PPSIZE*$MAXPP" |bc`
if [ "$MAXPVs" -eq 1024 ]
then
type="scale"
elif [ "$total" -ge 22352 ] && [ "$total" -le 32512 ]
then
type="normal"
elif [ "total" -ge 87376 ] && [ "$total" -le 130048 ]
then
type="big"
else
type="error determining VG type"
fi
if [ "$type" = "normal" ] || [ "$type" = "big" ]
then
factor="`echo "$MAXPP/1016"|bc`"
else
factor="N/A"
MAXPP="N/A"
maxdisk=`echo "$PPSIZE*2097152" |bc`
fi
echo "-------------------------------------------------------------------------------------------------------------------------------------------"
print - " VG=$i\tType:$type\tMaxPV's:$MAXPVs\tUsedPV's:$TOTALPVs\tVG factor:$factor\tMaxPP's/PV:$MAXPP\tPPSize(MB):$PPSIZE\tMaxdisk(MB):$maxdisk "
done
Sample Output:
No comments:
Post a Comment