System Administration
Showing results for 
Search instead for 
Did you mean: 

is there a /etc/lvmtab file in Linux(HP-UX equivalent of /etc/lvmtab)

Go to solution
Honored Contributor

is there a /etc/lvmtab file in Linux(HP-UX equivalent of /etc/lvmtab)

Steven E. Protter
Exalted Contributor

Re: is there a /etc/lvmtab file in Linux(HP-UX equivalent of /etc/lvmtab)


There is no /etc/lvmtab per say.

There is some information that might be useful in /etc/lvm

LVM for Linux was a feature port not a software port. 90% of the commands work the same way, but the developers wanted to improve things when they ported LVM to Linux.

Steven E Protter
Owner of ISN Corporation
Honored Contributor

Re: is there a /etc/lvmtab file in Linux(HP-UX equivalent of /etc/lvmtab)

As SEP already said, there is no exact equivalent.

The Linux LVM is designed to allow dynamic auto-configuration. When the system starts up, the LVM utilities will automatically look at all available disk devices and will automatically discover and activate all VGs that have all the PVs available.

This auto-detection and activation process can be repeated anytime you wish with two simple commands: "vgscan; vgchange -a y".

There is no need to have a static configuration file like /etc/lvmtab, because all the necessary information is stored on disk in the LVM meta-data in the headers of each PV and LV.

In HP-UX, a VG does not include information on the name of the VG or its LVs: this information is carried in the /etc/lvmtab file. If the HP-UX VG is exported, the VG name is lost unless the sysadmin remembers it. The LV names are stored into a "map file": a simple text file that contains the names of the LVs and *optionally* the VGID string.

In Linux, even an exported VG will still "know" its name, and thus you'll need an explicit command (vgrename) for renaming a VG.

IF you want to know about the LVM on a system, look at commands like "vgs", "lvs" and "pvs". In Linux, the "vgdisplay" command can display inactive VGs too.

If you're familiar with HP-UX LVM, the familiarity may mislead you on Linux. Read "man lvm" to get an overview of Linux LVM and its configuration tools, then check out the man pages of individual commands: there are several subtle differences.

Ralph Grothe
Honored Contributor

Re: is there a /etc/lvmtab file in Linux(HP-UX equivalent of /etc/lvmtab)

Hi Santhosh,

in spite of what my prerespondents wrote
the Linux LVM indeed has a configuration file
which not overly surprisingly is called lvm.conf and which resides in /etc/lvm.
Please refer to its manpage (man lvm.conf).
This file may play a vital role if you have to struggle with DRBD or Multipath devices or misbehaving CD/DVD drives.
Especially, its filter directive can save or cause you quite some trouble whenever a pvscan or vgscan is run.
If you issue "lvm dumpconfig" you will get displayed the content of lvm.conf stripped by all comments.

As the others already mentioned
the Linux LVM, though originally modeled after HP-UX LVM by Heinz Mauelshagen at Sistina Software, is merely another layer on top of the generic Linux Device Mapper, which is a more versatile concept and implementation than a mere LVM to host all sorts of devices from Encryption, SW RAID, DRBD, Multipath FC, to LVM (and probably many more I don't know about)
The Device Mapper has many interesting (but also potentially dangerous) settings.
Have a look at man dmsetup or when on RHEL
"rpm -qd device-mapper".

Though Linux LVM keeps similar to HP-UX LVM backup copies of LVM meta data in /etc/lvm/archive and /etc/lvm/backup whenever you run a modifying LVM command (and in case you haven't configured otherwise in /etc/lvm/lvm.conf or haven't used the "-A n" option),
Linux LVM also stores the complete meta data applicable to it on the respective physical volume.
This data can easily be retrieved in e.g. a recovery scenario by reading the first blocks of the PV after its MBR, especially for the important UUID that each device mapper device gets assigned.

You can try something similar to

# dd bs=512 skip=1 count=255 if=$(pvs -o vg_name,pv_name --noheadings --separator=:|awk -F: '

RedHat has a few interesting manuals and howtos for download (also in PDF).

For Linux LVM
Madness, thy name is system administration
Florian Heigl (new acc)
Honored Contributor

Re: is there a /etc/lvmtab file in Linux(HP-UX equivalent of /etc/lvmtab)

Let me point at one more Redhat manual:

The "Online Storage Reconfiguration Guide" has the best tips if something goes wrong.
yesterday I stood at the edge. Today I'm one step ahead.