Originally posted by: SystemAdmin
Hi,
I'm using AIX 6.1(6100-00-02-0750). I'm trying, in a C program, to list all raw devices, removing (for performance reasons) the calls to "popen(lsvg)" that are currently in place. I'm looking for the C API that gives me the type of a logical volume. This information is available in the "TYPE" column of the output of "lsvg -l VOL":
# lsvg -l rootvg rootvg: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT hd5 boot 1 1 1 closed/syncd N/A hd6 paging 16 16 1 open/syncd N/A hd8 jfs2log 1 1 1 open/syncd N/A hd4 jfs2 4 4 1 open/syncd / hd2 jfs2 79 79 1 open/syncd /usr hd9var jfs2 1 1 1 open/syncd /var # lsvg -l rawvg rawvg: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT rawlv0 raw 30 30 1 closed/syncd N/A
Using liblvm.a::lvm_queryvg() I get the list of LVs associated with the VG. Then, using lvm_querylv(), I get informations about the LV, but nothing about the TYPE. Note that the mount point listed in lsvg output is the one listed in /etc/filesystems, which can be different from the real mount point at the time of lsvg execution. This is not the case with the TYPE column which is always "actual". Where does lsvg takes this information from ?
Executing :
# truss -u liblvm.a:* lsvg -l rootvg
I can read that the lsvg binary calls a function named "lvm_lsvg". This function is not present on my system in /usr/include,
but present in liblvm.a. I did not find any information about it on IBM website. Is it the API that I need ? Where do I get the doc about it ?
#AIX-Forum