Operating System - HP-UX
1748180 Members
4187 Online
108759 Solutions
New Discussion юеВ

Re: Is it possible to get the lvol size from the VGDA using xd/adb ?

 
likid0
Honored Contributor

Is it possible to get the lvol size from the VGDA using xd/adb ?

Hi,

We need to get the lvol info(lvol size) if possible from the /etc/lvmconf/*.conf files on the server.

Just like we can get the VGID from the .conf or lvmtab file:

/etc/lvmconf#xd -An -j1024 -N32 -tx vg00L.conf
4c564d52 45433031 28896e35 3d8b4d96
28896e35 3d8b4d96 5207ff 0

The sames as the VGID is stored in the VGDA, Lvol info is stored in the VGDA, Is it possible to extract some info of the logical volumes, size, start and end blocks ?.

This would be non-boot vg's with version 1 of lvm.

Regards

Windows?, no thanks
3 REPLIES 3
Dennis Handly
Acclaimed Contributor

Re: Is it possible to get the lvol size from the VGDA using xd/adb ?

likid0
Honored Contributor

Re: Is it possible to get the lvol size from the VGDA using xd/adb ?

Hi Dennis,

Thanks for the link to that post it has interesting stuff in it, but my need is different, I'm in the middle of a migration and I only have access to the /etc/ of the source servers(they are run by another company), so I was thinking maybe there is a way to get the lenght of the logical volumes from the copy of the VGDA that resides in the /etc/lvmconf/*.conf files, using xdb,etc.

 

Regards.

Windows?, no thanks
pooderbill
Valued Contributor

Re: Is it possible to get the lvol size from the VGDA using xd/adb ?

The only decoder for an lvmconf file is vgcfgrestore, like this:

 

# vgcfgrestore -n vg00 -l -v
Volume Group Configuration information in "/etc/lvmconf/vg00.conf"
VG Name /dev/vg00
---- Physical volumes : 2 ----
/dev/rdsk/c1t0d0 (Bootable)
/dev/rdsk/c2t0d0 (Bootable)

But this requires root to run the command. And it does not contain the lvol information.
Another critical file in the lvmconf directory that is often not created is a serial number map file.
This is done with:

vgexport -m <mapfile> -s -p vgsomething

but this only has the lvol names (very important) but not the sizes.

The only way to get all the information you need is with vgdisplay -v which can be run by any user.