Operating System - HP-UX
1833323 Members
2892 Online
110051 Solutions
New Discussion

how to permently change the status of the volume group in shred moe?

 
prasanth.ps
Frequent Advisor

how to permently change the status of the volume group in shred moe?

Hi All,

We have a two node cluster with service gurad 11.18 and hpux 11i v3.
Its using for oracle rac.

before halting the node we need to change the volume group from shred to node. Same way we need to change the volume group status from none to shared after coming up the cluter.

How to change it permently without manually changing it?
10 REPLIES 10
Stephen Doud
Honored Contributor

Re: how to permently change the status of the volume group in shred moe?

Serviceguard introduces the ability to control LVM's capability to activate a volume group in order to limit the possibility of data corruption.
Normally, LVM volume groups are activated using 'vgchange -a y '. However, without specific activation controls in a cluster environment, there is no way to prevent using the same command on another server that has the volume group referenced in the /etc/lvmtab file. Activating a volume group is precursor to mounting a file system in a volume in the volume group. The standard HP-UX kernel is not enabled to operate in a cluster file system environment, so cannot prevent inappropriate VG activations and file system mounts, which can lead to data corruption.

In the manual titled, "Using Serviceguard Extension for RAC, 7th Edition, September 2008", located at http://docs.hp.com/en/T1859-90059/T1859-90059.pdf, page 117 describes how to make an LVM volume group sharable on multiple nodes at the same time.
Boot-time operations cannot activate a volume group marked for 'shared' activation. Such a VG can only be activated by root using a special vgchange command, or by a Serviceguard package control script. Before such can be accomplished, the VG must be flagged to activate in 'shared' mode. Doing so will place a special activation mode setting in the LVM metadata on each disk in the VG.

The procedure to change the activation mode to 'shared' requires a manual command, 'vgchange -c y -S y ' and to make a volume group "unshared", 'vgchange -c n -S n '

Other than scripting such commands, there is no automated means of changing a volume groups' activation mode to and from "shared" activation.
Suraj K Sankari
Honored Contributor

Re: how to permently change the status of the volume group in shred moe?

Hi,

To shared the vg you have to give this command

vgchange -C y -S y vgname


Suraj
ManojK_1
Valued Contributor

Re: how to permently change the status of the volume group in shred moe?

Hi Prashant,

I am having one query

1) All the datadisks, voting disk, Oracle Cluster Registry are in lvm.

2) Are you using ASM

Manoj K
Thanks and Regards,
Manoj K
prasanth.ps
Frequent Advisor

Re: how to permently change the status of the volume group in shred moe?

Hi All,

We are using ASM disk ON TOP OF slvm.asm DISK IS IN ONE VOLUME GROUP CALLED "VGASM" and the ocr and voting disk is in another volume grouop called "vg0vdocr".

Here oracle clusterware iis using andfd the packages are created by oracle not by SG.

The above query is becuase for shutting down/restarting the server i faced following tasks.

1. Halt the oracle databse.
2. deactivate the shred volume group from the client node first and finally from the server node.
3. HALT THE CLISUETR .
4. sHUT DOWN OR RESTART THE SERVER.
5.after the completion of rebooting process i need to activate the shared volume group to shared mode from server first and next to client node.

Is it possible to do to run some scripts for the step 2 and 5?


Thanx andrgds,

Prasanth.
john123
Trusted Contributor

Re: how to permently change the status of the volume group in shred moe?

Hi Prashanth,

Making the VGs cluster aware and shared is done in the cluster configuration file..
If am not wrong u have to add an entry in the cluster.ascci file "OPS_VOLUME_GROUP /dev/vgXX"
Also apply this configuration..

Regrads
John
Aneesh Mohan
Honored Contributor

Re: how to permently change the status of the volume group in shred moe?

Hi,

> 5.after the completion of rebooting process i need to activate the shared volume group to shared mode from server first and next to client node

Try to do using /etc/lvmrc .


Aneesh

john123
Trusted Contributor

Re: how to permently change the status of the volume group in shred moe?

>Try to do using /etc/lvmrc


lvmrc is normally used for activating the Vgs wchich are not controlled by service guard.

VGs which are in service guard control should be listed in cluster configuration file as "VOLUME_GROUP /dev/vgXX"
And this is how service guard will make the VGs cluster aware (or same as doing vgchange -c y) while the cluster startup

In this case you are using shared VG(SLVM) so instead of "VOLUME_GROUP /dev/vgxx" use "OPS_VOLUME_GROUP /dev/vgxx" By this way service gurad will make the VG cluster aware as well as shareable( or same as doing vgchange -c y -S y )


HTH
John





prasanth.ps
Frequent Advisor

Re: how to permently change the status of the volume group in shred moe?

Hi John,

these entries are there in the cluster.ascii file.I think this entry is for the command "vgchange -c y -S y " as u said.

This is for RAC volume group to be sharable and cluster aware.

Am asking about the command " vgchange -a s "vgname" ".


As per the Oracle docs its says that this command has to be run each time when the cluster starts.


Rgds

Prasanth.
john123
Trusted Contributor

Re: how to permently change the status of the volume group in shred moe?

Hi Prashnath,

vgchange -a s will be done by your package control script

Entries in the package control script should be like below,Make the changes in control script of all the nodes


VGCHANGE="vgchange -a s -p"
VG[0]="/dev/vgXX"

Once you have the above entries the package control script the vgs will be activated as shared in the nodes(This is similar to do vgchnage -a e in non-RAC environment)

HTH
John



prasanth.ps
Frequent Advisor

Re: how to permently change the status of the volume group in shred moe?

Hi John,

Thanx for your reply.

Here we are not using the service guard for package configuration. Oracle clusterware is using for this.

SG is upto the hardware cluster level.
What need to be done in thsi condition?

Thanx and rgds,

Prasanth.