AIX PROGRAMMING QUESTION ABOUT TRANSLATING VGID

ITEM: RTA000043695



The lvm routines return vgid but not vgname.  Since commands like               
lsvg and getvgname return vgname I suppose there is a way to do this            
programmatically.  Could you please illustrate how?                             
                                                                                
---------- ---------- ---------- --------- ---------- ----------                
A: The LVM subroutines access the VGDA to get its information.  Since the       
   VGDA does not contain any reference to the VG's name, the LVM                
   subroutines will not be able to return that information.                     
                                                                                
   The only place where the VG name is stored is in the ODM.  In your           
   program, once you obtain the VGID, you can use ODM subroutines to            
   query for the VG name whose ID is the specified VGID.                        
                                                                                
   With a shell script, this can be easily accomplished with the "odmget"       
   command.  Since the ODM contains all of the VGID's for all the              
   volume groups, you may not even need to use the LVM subroutines to           
   accomplish your goal -- just the ODM subroutines.                            
                                                                                
   For more information, please refer to the InfoExplorer section               
   entitled: "Object Data Manager (ODM) Overview for Programmers".              
                                                                                
   Another solution that may be easier to implement, but may not be quite       
   as nice is to use the system() call to either lsvg or getvgname,             
   and dump the output to a file.  From there, you can use C functions to       
   parse this and get the information you require.                              
                                                                                
---------- ---------- ---------- --------- ---------- ----------                
                                                                                
                                                                                
This item was created from library item Q662276      5438N                     
                                                                                
Additional search words:                                                        
AIX ALTERNATE CUSTORG INDEX IX LOGICAL MANAGEMENT MANAGER MAY94 MGR             
OP OZNEW PROGRAMMING QUESTION RISCOSO RISCSYSTEM SOFTWARE SYS                   
TRANSLATING VGID VGNAME VOL VOLUME 5438N                                        
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                               


WWQA: ITEM: RTA000043695 ITEM: RTA000043695
Dated: 11/1996 Category: RISCOSO
This HTML file was generated 99/06/24~12:43:17
Comments or suggestions? Contact us