Operating System - HP-UX
1835057 Members
3151 Online
110073 Solutions
New Discussion

how to add a vg into RAC cluster?

 
Rambo_1
Regular Advisor

how to add a vg into RAC cluster?

Hi,
I need to add a vg named "ora_data_new" into package "ora_rac_pkg" .
how to do this ?
Thanks for your help.

B.R
Rambo
3 REPLIES 3
Prashanth.D.S
Honored Contributor

Re: how to add a vg into RAC cluster?

HI Rambo..

NOTE: Change the disk device path asper your requirements.

You may need to change the volume group configuration of RAC shared logical
volumes to add capacity to the data files or to add log files. No
configuration changes are allowed on shared LVM volume groups while they are
activated. The volume group must be deactivated first on all nodes, and marked
as non-shareable. Use the following procedure (examples assume the volume
group is being shared by node 1 and node 2, and they use the volume group
vg_ops):

1) Ensure that the Oracle RAC database is not active on either node.


2) From node 2, record the group minor number for the VG to which you will add
the disk.

# ll /dev/vg_ops/group
crw-rw-rw- 1 oracle dba 64 0x020000 Jun 4 12:39 /dev/vg_ops/group
^
Record eg:0x02 <--


3) From node 2, use the vgchange command to deactivate the volume group:

# vgchange -a n /dev/vg_ops


4) From node 2, use the vgexport command to export the volume group:
This dissociates the volume group from node 2.

# vgexport -m /etc/lvmconf/vg_ops.map.old /dev/vg_ops


5) From node 1, use the vgchange command to deactivate the volume group:

# vgchange -a n /dev/vg_ops


6) Use the vgchange command to mark the volume group as unshareable:

# vgchange -S n -c n /dev/vg_ops


7) Prior to making configuration changes, activate the volume group in normal
(non-shared) mode:

# vgchange -a y /dev/vg_ops


8) Make the disk (c4t4d0 in this example) ready for LVM

# pvcreate -f /dev/rdsk/c4t4d0

If the disk has a PV-link (another I/O adapter to the server) and
I/O bus load balancing is also an issue, vgextend the disk's paths into
/etc/lvmtab in the order that LVM should access them:

# vgextend vg_ops /dev/dsk/c4t4d0
# vgextend vg_ops /dev/dsk/c2t4d0

An alternative to this method of setting the primary path is the pvchange
command:

# pvchange -s /dev/dsk/c2t4d0


9. On the same node, add logical volumes to the volume group as needed

# lvcreate -L -n vg_ops


10) Set the raw logical volume device file's owner to oracle and group to dba,
with a mode of 660.

# chmod 660 /dev/vg_ops/
# chown oracle:dba /dev/vg_ops/


11) Next, still from node 1, deactivate the volume group:

# vgchange -a n /dev/vg_ops


12) Use the vgexport command with the following options to create a new map
file:

# vgexport -ps -m /etc/lvmconf/vg_ops.map /dev/vg_ops


13) Copy the file /etc/lvmconf/vg_ops.map to node 2.

# rcp /etc/lvmconf/vg_ops.map :/etc/lvmconf/vg_ops.map


14) Mark the volume group cluster-aware and sharable again:

# vgchange -S y -c y /dev/vg_ops


15) Re-import the VG on node 2. Start by issuing the following command:

# mkdir /dev/vg_ops


16) Create a control file named group in the directory /dev/vg_ops using the
minor number from step 2

# mknod /dev/vg_ops/group c 64 0x020000


17) Use the vgimport command, specifying the map file you copied from the
configuration node. In the following example, the vgimport command is
issued on the second node for the same volume group that was modified on
the first node:

# vgimport -sv -m /etc/lvmconf/vg_ops.map /dev/vg_ops


18) Activate the volume group in shared mode by issuing the following command
on both nodes:

# vgchange -a s -p /dev/vg_ops


NOTE: Skip this step if you use a package control script to activate and
deactivate the shared volume group as a part of OPS startup and
shutdown.



Best Regards,
Prashanth
Rambo_1
Regular Advisor

Re: how to add a vg into RAC cluster?

Hi Prashanth,
Thanks for you reply,but the answer you gave didn't what I want. I want to add a "OPS_VOLUME_GROUP" to the package named"ora_rac_pkg" in RAC MC/SG. don't want to add a PV to a VG.

Thanks again
B.R
Rambo
Stephen Doud
Honored Contributor

Re: how to add a vg into RAC cluster?

Add the following line to the cluster configuration file:
OPS_VOLUME_GROUP ora_data_new

Mark the VG for appropriate activation:
# vgchange -c y -S y ora_data_new

Locate and edit the package control script for package ora_rac_pkg, that is responsible for activating ora_data_new.

In that file, locate the VG[n] references that list the volume groups that will be activated with this package startup.

Add a reference for ora_data_new; eg:
VG[3]="ora_data_new"

Note the index number (3) must be the next successive number available, as this is part of an array developed in the script.

Duplicate these file modifications on any other server that also activates the VG to start a RAC instance on that data set.

Start/stop the package to verify it works.