Operating System - HP-UX
1837984 Members
2904 Online
110124 Solutions
New Discussion

Re: How to activate a volume group automatically ?

 
Julio Quadros_1
Occasional Contributor

How to activate a volume group automatically ?

Hello

I have a cluster of 2 machines running MC Service Guard. I've just added a new disk and created a new volume group on it. On that volume group I created a logical volume and created a new filesystem, mounted on mount point /xpto. I want to make things permanent, ie, when the system comes up i want to have the volume group active and the filesystem mounted. To mount the filesystem, i've edited /etc/fstab and put an entry to do it. Now, how to make the volume group activation permanent ?

Thanks for your help

Julio Quadros
10 REPLIES 10
Martin Johnson
Honored Contributor

Re: How to activate a volume group automatically ?

Is this volume group part of the MC Service Guard application? If so, activation of the volume group should be part of the package.

HTH
Marty
Mike Hassell
Respected Contributor

Re: How to activate a volume group automatically ?

Julio,

I think this is done by default, as long as you have added the filesystem in /etc/fstab you should be set. Unforunately, I can't think of a way you can verify this off the top of my head.

Hope that helps.

-Mike
The network is the computer, yeah I stole it from Sun, so what?
Patrick Wallek
Honored Contributor

Re: How to activate a volume group automatically ?

Julio,

Check out this thread from the Forums:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xc37042308663d611abdb0090277a778c,00.html

By the way, I searched on "auto activate vg" within the Forums and got this result.
Tim D Fulford
Honored Contributor

Re: How to activate a volume group automatically ?

1 - vgchange -c y
2 - edit /etc/cmcluster//.sh & include new vg e.g
VG[0]="vgapp1"
VG[1]="vgnew"

Also put in the mount stuff if required

Tim
-
Julio Quadros_1
Occasional Contributor

Re: How to activate a volume group automatically ?

Thanks a lot from your help. Now i know I have 2 options: either I make the vg part of MC Service Guard, and attach it to a package, or I keep it out of it and in this case, I will need to edit /etc/lvmrc and add a vgchange for my vg in the custom_vg_activation function. Is this correct ?

Thanks

JQ
Rainer von Bongartz
Honored Contributor

Re: How to activate a volume group automatically ?

Is this correct ?


Absolutely

Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
melvyn burnard
Honored Contributor

Re: How to activate a volume group automatically ?

If this vg is NOT part of your SG package configuration, then add the entry into /etc/lvmrc to allow the system to auto activate this specific VG on boot.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Julio Quadros_1
Occasional Contributor

Re: How to activate a volume group automatically ?

Thank you all for you help !

JQ
Sanjay_6
Honored Contributor

Re: How to activate a volume group automatically ?

Hi Julio,

If this VG is part of the SG package, it will be activated by the SG package control file. If not you can include this VG in the /etc/lvmrc file where AUTO_VG_ACTIVATE is set to "0",

The non-SG VG that you want to activate automatically should be added like this,

custom_vg_activation()
{
# e.g. /sbin/vgchange -a y -s
# parallel_vg_sync "/dev/vg00 /dev/vg01"
# parallel_vg_sync "/dev/vg02 /dev/vg03"
/sbin/vgchange -a y -s /dev/vg_name
parallel_vg_sync "/dev/vg_name"
return 0
}

Hope this helps.

Regds


Bart Beeren
Advisor

Re: How to activate a volume group automatically ?

Julio,

if all the information given helped you that much, please be so kind to assign the people who helped you the points they do deserve.

BB
Life isn´t as simple as it seems