1752781 Members
6694 Online
108789 Solutions
New Discussion юеВ

Re: lvmconf in Linux

 
SOLVED
Go to solution
brian_31
Super Advisor

lvmconf in Linux

I come from the HP-UX world. Could someone please explain the function of the /etc/lvm/lvmconf file in Linux(RHEL 5) and its relation to the Multipathd?

Thanks

Brian.

7 REPLIES 7
Matti_Kurkela
Honored Contributor
Solution

Re: lvmconf in Linux

In HP-UX (11.23 and older), LVM and multipathing (alternate paths for PVs) are tied together. In Linux, they're two separate layers.

When you use the Device-Mapper Multipath system (which includes multipathd), you'll have one device for each path to your multipathed disks (/dev/sd* or whatever), and another device for using the disk in multipathed fashion (/dev/mapper/mpath* if you're using RHEL defaults, but you can customize the names if you want). The difference is sort of like legacy vs. agile devices on HP-UX 11.31, except that you cannot switch the single-path (=legacy) device names off.

The /etc/lvm/lvm.conf file can be used (among other things) to limit the types of disk devices LVM searches for PVs. When you're using multipathing, you'll want LVM to look for multipathed devices only, or at least prefer them over single-path devices for the same disk/LUN. The appropriate lvm.conf configuration items are "filter" and "preferred_names".

See also:
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Logical_Volume_Manager_Administration/lvm_filters.html

Other than this, there is no relation with Linux LVM and multipathing. LVM can use any devices it's allowed to access; it does not care whether they're actually multipathed or not. Its position is kind of similar to Oracle ASM: both will want to see each disk device using a single device name that will "always" work. If the device name is not persistent, both LVM and Oracle ASM will deal with it just fine: both will identify the disks using signatures stored on the disks, not using device names.

MK
MK
brian_31
Super Advisor

Re: lvmconf in Linux

Thanks MK! Oh i see. so the lvm.conf in Linux is an editable file?

Thanks

Brian.
Matti_Kurkela
Honored Contributor

Re: lvmconf in Linux

Yes, it's plain text, editable by the sysadmin and rather extensively commented.

MK
MK
Serviceguard for Linux
Honored Contributor

Re: lvmconf in Linux

Another function of the lvm.conf file is to specify which VGs are activated on start-up. If you have a VG that is used in a cluster, you do not want it activated on boot.
Matti_Kurkela
Honored Contributor

Re: lvmconf in Linux

If you use a _Serviceguard_ cluster, you should configure lvm.conf to activate only local VGs. If you use another cluster suite, the procedure is likely to be different.

For example, RedHat Cluster Suite, when configured to use clvmd (the default and RedHat-recommended configuration), configures LVM to use clvmd locking, which will automatically prevent cluster VG activation until/unless clvmd is running and talking with other nodes. Local VGs will be activated normally.

MK
MK
Serviceguard for Linux
Honored Contributor

Re: lvmconf in Linux

If you use an LVM resource in Red Hat and choose not to use clvm, then the recommendation is to edit lvm.conf

http://www.nxnt.org/2010/09/redhat-cluster-howto/

brian_31
Super Advisor

Re: lvmconf in Linux

Thanks Guys! Good discussion.

Brian.