Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get LV data

Status
Not open for further replies.

gatetec

MIS
Mar 22, 2007
420
US
I need to get the following info of logical volumes on AIX 5.2:

Logical Volume Name
Physical Disk Name
Volume Layout Type
Volume Size (GB or MB)
Volume Size In Use (GB or MB)

I can list all lvs:

lsvg -l `lsvg -o`|egrep -v "\:$|LV NAME"|awk '{print $1}'|sort

But, the other info is here and there -- lslv, etc.

Please let me know the best way or scripts to get the info.

Thx so much
 
create a script like this.....(just one way of getting the information, you may want to reformat)

lsvg -l `lsvg -o`|egrep -v "LV NAME"|cut -d" " -f1 |egrep -v "vg:">temp.txt
for i in `cat temp.txt`
do
for n in `lslv -l $i|cut -d" " -f1|egrep -v "PV|:"`
do
echo `lslv $i|egrep "LOGICAL VOLUME"`
echo `lslv $i|egrep "TYPE"`
echo `lspv $n|egrep "PHYSICAL VOLUME"`
echo `lspv $n|egrep "TOTAL"`
echo `lspv $n|egrep "USED"`
echo `lspv $n|egrep "FREE"`
echo
done
done
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top