1754021 Members
7165 Online
108811 Solutions
New Discussion юеВ

lvmtab and lvmconf files

 
Paul Senior_1
Frequent Advisor

lvmtab and lvmconf files

a theory question:-

can anyone clarify why hpux needs both an lvmtab and a set of lvmconf files?
Both appear to be very similar in format

thanks
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor

Re: lvmtab and lvmconf files

Hi Paul:

The '/etc/lvmtab' file is a binary file that lists the disk devices (files) associated with each volume group along with the Volume Group ID (VGID) of the group.

Using 'strings '/etc/lvmtab' will show the volume group names and associated device files. The VGID will not be visable since 'strings' attempts only to create printable ASCII sequeneces from strings of four *printing* characters at a time.

A Perl script or C program is generally necessary to extract the VGID information from the 'lvmtab'.

When a volume group is activated, the 'lvmtab' provides a list of the physical devices that should be present and that constitute a viable volume group.

As a consequence (by default) of most LVM commands running, the volume group header as written to the physical disks is stored by 'vgcfgbackup' in the '/etc/lvmconf' directory. This information allows disk replacement. That is, this header information can be written back to a virgin disk with 'vgcfgrestore'. The information contained in the '/etc/lvmconf' files encompases much more information than the simple set found in the '/etc/lvmtab' file and includes logical volume information as well.

Hence, the '/etc/lvmtab' and '/etc/lvmconf/' files serve different but related needs.

Regards!

...JRF...
Vamsidin
Frequent Advisor

Re: lvmtab and lvmconf files

If a disk fails without warning and you are unable to move the Physical Extents off it to a different Physical Volume you will have lost data unless the Logical Volumes on the PV that failed was mirrored. The correct course of action is to replace the failed PV with an identical one or at least a partition of the same size.

The directory /etc/lvmconf contains backups of the LVM data and structures that make the disks into Physical Volumes and list which Volume Groups that PV belongs to and what Logical Volumes are in the Volume Group.

The '/etc/lvmtab' file is a binary file that lists the disk devices (files) associated with each volume group along with the Volume Group ID (VGID) of the group.

Using 'strings '/etc/lvmtab' will show the volume group names and associated device files.
Torsten.
Acclaimed Contributor

Re: lvmtab and lvmconf files

Hi,

you can have a look into your vgxx.conf file:

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

(note the "-l" switch!)

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Sreer
Valued Contributor

Re: lvmtab and lvmconf files

/etc/lvmconf: this is a configuration file which contains all information about all vgs.
It includes : LVM header information,PV information in the particular VG,LV information.[entire lv information]

Its main use is when a disk is going bad!!!.
That time we can replace that disk and do the vgcfgrestore.Then the newly added disk will become the part of the VG .

Use the command to see lvmconf data.

vgcfgrestore -n /dev/vg00 ├в l



lvmtab: The '/etc/lvmtab' file is a binary file.It lists the disk devicefiles associated with each volume group along with the Volume Group ID (VGID) of the group.

strings /etc/lvmtab ----------this will show the disks in all avialble vgs.