Operating System - HP-UX
1753894 Members
7349 Online
108809 Solutions
New Discussion юеВ

How to Disable autoactivation of VG?

 
Jose Vidal
Advisor

How to Disable autoactivation of VG?

How do I disable automatic activation of a VG after system reboot?
6 REPLIES 6
Jose Vidal
Advisor

Re: How to Disable autoactivation of VG?

Is there a way to control the activation of individual VG's?
Jason Luginbuhl
Frequent Advisor

Re: How to Disable autoactivation of VG?

This happens at startup with the rc sript /sbin/lvmrc. However, this reads the configuration file /etc/lvmrc. There is a flag in this file called AUTO_VG_ACTIVATE that defaults to a 1. Setting this to a zero will disable the automatic activation of any volume group but the root one.
"Unfortunately you can't out-program stupidity"
Rick Garland
Honored Contributor

Re: How to Disable autoactivation of VG?

This will do all VGs that are on the system (except the root VG). If you are looking for just a VG to not be activated, can make a rc script to deactivate the VG as the system comes up or manually issue the command after the system is up.
John Palmer
Honored Contributor

Re: How to Disable autoactivation of VG?

The script /etc/lvmrc has a function called custom_vg_activation which is intended for activating the volume groups that you require.

Set the variable AUTO_VG_ACTIVATE=0 to disable the activation of all volumes in /etc/lvmrc and add the appropriate vgchange and parallel_vg_sync calls as per the comments in the script.

e.g. to activate vg00 and vg01 only, add the following after the comments in function custom_vg_activation:-

/sbin/vgchange -a y -s /dev/vg00
/sbin/vgchange -a y -s /dev/vg01
parallel_vg_sync "/dev/vg00 /dev/vg01"

Regards,

John
Insu Kim
Honored Contributor

Re: How to Disable autoactivation of VG?

The simple way of disabing autoactivation is to modify a file, lvmrc, in the /etc as follows,

AUTO_VG_ACTIVATE=0
Never say "no" first.
Vince Inman
Frequent Advisor

Re: How to Disable autoactivation of VG?

The /etc/lvmrc file by default activates all
VG's it can find. There is a AUTO_VG_ACTIVATE variable that enables this function. It should be set to 0 (zero) to disable this, however you will also have to put the VG's that you do want auto activated (such as vg00) into the function custom_vg_activation() using the vgchange command for each VG that is to be activated.