Operating System - HP-UX
1827286 Members
1735 Online
109717 Solutions
New Discussion

how to leave a VG not activated at boot time?

 
SOLVED
Go to solution
Gary Yu
Super Advisor

how to leave a VG not activated at boot time?

Hi all,

Is it possible to have a non-root VG not activated at boot time? then use vgchange -a y afterwards when needed?

thanks,
Gary
3 REPLIES 3
Stuart Abramson_2
Honored Contributor

Re: how to leave a VG not activated at boot time?

Gary:

Yes.

1. I think that if you leave it out of /etc/fstab, it will not be activated. (But I'm not sure.)

2. You can use /etc/lvmrc to say:

a. Don't activate VGs on boot.
b. Activate these only on boot.

But this means that you will have to specify every OTHER VG that you want to activate:


cd /etc
cp lvmrc lvmrc.old
vi lvmrc
set
AUTO_VG_ACTIVATE=0
set VGs to activate in "custom_vg_activation()"
/sbin/vgchange -a y vg01 # activate vg01
# vg00 is always activated on boot


It's a lot of work and prone to problems in the future.

Why don't you DEactivate the VG in question after boot is completed? that might be easier.
Marco Santerre
Honored Contributor

Re: how to leave a VG not activated at boot time?

Yes you can do that. In /etc/lvmrc, you can go in the function custom_vg_activation and place any VG you want to activate. Don't forget to change AUTO_VG_ACTIVATE to 0
Cooperation is doing with a smile what you have to do anyhow.
S.K. Chan
Honored Contributor
Solution

Re: how to leave a VG not activated at boot time?

You have to do some customization in /etc/lvmrc. If you got ..
AUTO_VG_ACTIVATE=1
.. it will activate all volume group and you can't change that. If you want to customize your own vg activation change the above to 0 and then in the same file (/etc/lvmrc).. in the "custom_vg_activation" function put these ..
custom_vg_activation()
{
/sbin/vgchange -a y -s /dev/vg00
parallel_vg_sync "/dev/vg00"
}
That way ONLY vg00 is activated at boot time.