Operating System - HP-UX
1833007 Members
2508 Online
110048 Solutions
New Discussion

Re: lvdisplay using a system call

 
Jdamian
Respected Contributor

lvdisplay using a system call

What is the library name of the LVM ?

Is there an equivalent system call to get info about a lvol (lvdisplay) ? or a VG (vgdisplay) ? or a PV (pvdisplay) ?

What is the header file in which the LVM structures are described ?
1 REPLY 1
Christopher Caldwell
Honored Contributor

Re: lvdisplay using a system call

What is the library name of the LVM ?
Dunno.

Is there an equivalent system call to get info about a lvol (lvdisplay) ?
pstat_getlv
or a VG (vgdisplay) ?
dunno, you can probably synthesize something by looking at all of the devices (ioscan) and determining which are vg's. (I imagine there are easier ways).
or a PV (pvdisplay) ?
pstat_getdisk

What is the header file in which the LVM structures are described ?
Some pieces are described in pstat.h

You can also think about using popen to call the normal command (e.g. vgdisplay). popen will return the output of the command in a stream that you can then parse for your information.