Operating System - HP-UX
1834090 Members
2044 Online
110063 Solutions
New Discussion

Re: add vg to running RAC cluster

 
SOLVED
Go to solution
KevB_1
Advisor

add vg to running RAC cluster

Another ?

How do you add a new shared VG to a running Oracle RAC cluster on ServiceGuard 11.18
9 REPLIES 9
rariasn
Honored Contributor

Re: add vg to running RAC cluster

KevB_1
Advisor

Re: add vg to running RAC cluster

Thanks for that - but would like to do this with the database up just sort of slip this in undercover

can set the VG up as shared - if I just add it to package and cluster config and apply these is this possible ?
Stephen Doud
Honored Contributor

Re: add vg to running RAC cluster

You can add a volume group to a cluster and package while both are running.

Per the thread referenced before, add the OPS_VOLUME_GROUP reference for the VG at the bottom of the cluster ASCII file. You won't need to cmapplyconf the file if you manually 'cluster' the VG:
# vgchange -a n
# vgchange -c y -S y

Note that LVM prohibits modifications to a VG marked for shared activation, so be certain you have created all logical volumes and mirrors in the VG before marking it for shared activation.

Activate a VG marked for shared activation using:
# vgchange -a s

Add the VG[x]="" reference in the legacy package control script.

Identify the shared VG volumes in Oracle configuration files per SOP.


A.11.18 SGeRAC uses this version of the manual "Using Serviceguard Extension for RAC":
http://bizsupport2.austin.hp.com/bc/docs/support/SupportManual/c02039997/c02039997.pdf

It describes both an Oracle 9i and 10g configuration.
KevB_1
Advisor

Re: add vg to running RAC cluster

Thanks Stephen

Do I have to cmapplyconf the package after adding the VG into it or is the fact that it is added to the package conf and I have made the VG clusteraware and shared enough that when the package comes down it will also deactivate this VG and like wise activate when it starts up
nightwich
Valued Contributor

Re: add vg to running RAC cluster

Hi Kev


I would not try this online.

Has I understand you have two options.

First:

create a VG shared by nodes.
Edit the ctl package and configure the new volume.

If you use LVM you need also edit the ascii file of the cluster.


But in this scenario you cannot test if your changes in the service guard are "OK".


Second:
Create VG
Edit ctl package and ascii file.
Test the clusted cmquery cmcheckconf then cmapplyconf.

The second evict that you stay with any miss configuration.

Regards.
KevB_1
Advisor

Re: add vg to running RAC cluster

Thanks for the info

We use raw lvols for the Oracle RAC database - so all the package does is a vgchange -a s on all the VGs when the package is started and a -a n when it halts.

So was wondering if I have a new VG and created all the lvols in it then shared it and made it cluster aware then manually did the vgchange -a s on it so that all the nodes could see it - if I then added it to the package conf does the new vg get deactivated on a package halt or do I have to run a cmapplyconf if the package conf is changed on all the nodes - suppose I am asking when does the package conf get read only on cluster formation or on some activity to the package
nightwich
Valued Contributor

Re: add vg to running RAC cluster

Hi KevB

I think the answer is yes.

If you do any changes in the ascii. conf of the cluster you need to do a cmapplyconf.

If you change the ctl packages for your packages you do not need to give any command the cluster will read that files.


Your best option is to do this configuration outside the cluster ( only setup VG's ) when you have a downtime you do the setup of the packages.

Regards.


Stephen Doud
Honored Contributor
Solution

Re: add vg to running RAC cluster

KevB - you asked:
Do I have to cmapplyconf the package after adding the VG into it or is the fact that it is added to the package conf and I have made the VG clusteraware
and shared enough that when the package comes down it will also deactivate this VG and like wise activate when it starts up

The fact that you mention a package configuration file indicates that you use modular packages. Any changes made to the modular package configuration file must be cmapplyconf'd to insert recognition for the change into the cluster binary file.

Managing Serviceguard (Fifteenth Edition) at http://bizsupport1.austin.hp.com/bc/docs/support/SupportManual/c02056194/c02056194.pdf
Table 7-2 (pages 398-399) gives a summary of actions that one might take with packages, and whether they can be performed while the package is running. Page 399 states that the package should not be running when adding a VG. That's the official statement. Notice the words "should not" as opposed to "must not" - this infers particular circumstances may affect the outcome. There is a specific order of steps that one must follow to successfully add a VG to a package while it's running. Hence, 'should not' indicates a possibility of causing the package to halt if all steps are not performed, or not performed in order. The manual does nor provide the steps, so I did a test.

I created a test modular package with all standard modules. I only had to insure it had a package name and a list of nodes on which it could run, then cmapplyconf'd the package configuration file. Then I started it.

At this point, I added the VG name to the cluster ASCII file (see below) and then manually 'clustered' the VG:
# vgchange -c y
I tested VG activation:
# vgchange -a e

Then deactivated the VG:
# vgchange -a n

It is absolutely important to add a VOLUME_GROUP reference for the VG to the cluster ASCII file. Similarly for SGeRAC 'shared' VGs, add a OPS_VOLUME_GROUP reference to the cluster ASCII file. This insures that future cmapplyconf commands that are performed on the cluster ASCII file will NOT remove cluster identification from the VG.

I then added a VG to the modular package configuration file and cmapplyconf'd it. The cmapplyconf succeeded and the modular package reconfiguration successfully activated the VG in exclusive mode. (Note that the package configuration file vgchange_cmd parameter is set to "vgchange -a e" in my case. In a SGeRAC modular package, it should be "vgchange -a s"

'cmviewcl -v -f line | grep ' returns a line of output, indicating the cluster binary file was now aware that the VG was associated with my package.

Now that the VG was activated, I tested whether I could add a file system while the package was running, unlike a SGeRAC volume, which is raw.

Before this exercise, the VG already had a volume created in it, with a file system in the volume.

With the package running and the VG activated by Serviceguard when it was added to the cluster binary, I added file system reference parameters to the package configuration file and then cmapplyconf'd the package configuration file.
The reconfiguration succeeded and the file system was mounted - see attached package log.

In summary, you can successfully add a VG to a running package, but you have to use caution by doing the right thing at the right time.

KevB_1
Advisor

Re: add vg to running RAC cluster

Thanks for all your info and detailed instructions - Would you believe it but they have let me have some downtime so can use the safer method of bringing the cluster down

Cheers