System Administration

Re: what is the purpose of /etc/lvmrc

Go to solution
Super Advisor

what is the purpose of /etc/lvmrc

Hi All,

What is the purpose of /etc/lvmrc?
Honored Contributor

Re: what is the purpose of /etc/lvmrc

It is an initialization file for the the LVM volume groups and volumes. You don't touch this file unles you are using serviceguard.
James R. Ferguson
Acclaimed Contributor

Re: what is the purpose of /etc/lvmrc


If you read the comments in the '/etc/lvmrc' file you will see that it controls what volume groups and when those volume groups get activated.


Respected Contributor

Re: what is the purpose of /etc/lvmrc

This file is used to check if the VGs need to be activated automatically or not.This is the configuration file for /sbin/lvmrc which execute during the system start up.The file contains two variables
the value may be 0 or 1
the value may be PARALLEL or SERIAL
PARALLEL option resync all the VGs at once.
SERIAL option resync VGs one at a time.
Also see the file /etc/lvmrc


R.K. #
Honored Contributor

Re: what is the purpose of /etc/lvmrc

Hi Senthil,

All VGs listed in lvmtab are automatically activated during system startup. This is done in the script /sbin/lvmrc, based upon configuration in /etc/lvmrc.

If you do not trust the information in the lvmtab anymore because it may have become corrupt somehow you can easily recreate it from PVRA and VGRA on the disks through the vgscan(1M) command. But be sure to save a copy before:

# cp /etc/lvmtab /etc/lvmtab.old
# vgscan -v

In Service Guard:
The MC/ServiceGuard software will activate the volume group on the secondary node if the primary node fails. Activating the volume group on the secondary node while the primary node has the volume group activated, too, will cause corruption. Change the AUTO_VG_ACTIVATE variable to prevent automatic volume group activation.

# vi /sbin/lvmrc

If you have other volume groups that are not part of the cluster configuration, the custom_vg_activation function in /sbin/lvmrc can be modified to selectively activate those volume groups.
Don't fix what ain't broke
Honored Contributor

Re: what is the purpose of /etc/lvmrc

This file is used for automatic volume group (VG) activation during startup.

You can tell the system which VG will be activated and which will not be activated during bootup.This is very much necessary where there is a cluster installed.
a warrior never quits
Marlou Everson
Trusted Contributor

Re: what is the purpose of /etc/lvmrc

It does allow Serviceguard to control activating its own volume groups, but I have used /etc/lvmrc many times to move SAN disks from one system to another, usually for switching to a new system. It allows me to control what VG is activated during reboot but keep all the information ready on the old system in case it is necessary to go back to it. It has been necessary due to the programmers not being able to get things to work on the new system.

Johnson Punniyalingam
Honored Contributor

Re: what is the purpose of /etc/lvmrc


This file is sourced by /sbin/lvmrc. This file contains the flags
AUTO_VG_ACTIVATE and RESYNC which are required by the script in /sbin/lvmrc.
These flags must be set to valid values (see below).

The activation of Volume Groups may be customized by setting the
AUTO_VG_ACTIVATE flag to 0 and customizing the function

To disable automatic volume group activation,

Problems are common to all, but attitude makes the difference