Queries volume groups and returns information to online volume groups.
Logical Volume Manager Library (liblvm.a)
#include <lvm.h>
int lvm_queryvgs ( QueryVGS, Kmid)
struct queryvgs **QueryVGS;
mid_t Kmid;
Note: You must have root user authority to use this subroutine.
The lvm_queryvgs subroutine returns the volume group IDs and major numbers for all volume groups in the system that are online.
The caller passes the address of a pointer to a queryvgs structure, and the Logical Volume Manager (LVM) allocates enough space for the structure and returns the address of the structure in the pointer passed in by the user. The caller also passes in a Kmid parameter, which identifies the entry point of the logical device driver module:
struct queryvgs { long num_vgs; struct { long major_num struct unique_id vg_id; } vgs [LVM_MAXVGS]; }
Field | Description |
---|---|
num_vgs | Contains the number of online volume groups on the system. The vgs is an array of the volume group IDs and major numbers of all online volume groups in the system. |
QueryVGS | Points to the queryvgs structure. |
Kmid | Identifies the address of the entry point of the logical volume device driver module. |
The lvm_queryvgs subroutine returns a value of 0 upon successful completion.
If the lvm_queryvgs
subroutine fails, it returns one of the following error codes:
This subroutine is part of Base Operating System (BOS) Runtime.
List of Logical Volume Subroutines and Logical Volume Programming Overview in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.