Modifying the VCS configuration for replication
Resources that must be configured or modified for replication:
-
Log owner group
-
RVG group
-
Oracle database service group
-
RVGSharedPri resource
-
The CVMVolDg resource from the existing Oracle database service group.
About VCS resources for replication
Review the information on the groups and resources required for replication.
Log owner group
A log owner group including the RVGLogowner resources must be created. The RVGLogowner resources are used by the RLINKs for the RVG, and the RVGLogowner resource, for which the RVG and its associated disk group are defined as attributes. The RVG log owner service group has an online local firm dependency on the service group containing the RVG.
RVG group
An RVG group including the RVGShared resource replication objects must be created. Define the RVGShared resource and CVMVolDg resource together within a parallel service group. The group is defined as parallel because it may be online at the same time on all cluster nodes. The CVMVolDg resource does not have volumes specified for the CVMVolume attribute; the volumes are contained in the RVG resource. The CVMVolume attribute for the CVMVolDg resource is empty because all volumes in the RVG are defined by the RVG attribute of the RVGShared resource. The RVG service group has an online local firm dependency on the CVM
service group.
VCS uses RVGLogowner agent to control the RVGLogowner resource, and the RVGShared agent to control the RVGShared resource. Refer to the Veritas Cluster Server Agents for Veritas Volume Replicator Configuration Guide.
Oracle database service group
The RVGSharedPri resource must be added to the existing Oracle database service group. The CVMVolDg resource must be removed from the existing Oracle database service group.
The existing Oracle database service group is a parallel group consisting of the Oracle database resource, CVMVolDg resource, and CFSMount resource (if the database resides in a cluster file system). Define the Oracle service group as a global group by specifying the clusters on the primary and secondary sites as values for the ClusterList group attribute. Refer to the Veritas Cluster Server Agents for Veritas Volume Replicator Configuration Guide for more information on replication resources.
See About the CVMVolDg agent
Configuration before and after modification
Review the illustrations that show the changes to the VCS configuration when you set up the existing Oracle database for replication.
-
Configuration before modification:
-
Configuration after modification:
Note that all of the dependencies between parent and child groups are online local firm. The CVM service group is the same in all illustrations because its definition requires no changes. For Oracle9i, the CVM service group may be different on your configuration, depending on the type of IP you set up for the Listener.
Illustration of dependencies: Configuration before modification for
replication (Oracle9i)
Click the thumbnail above to view full-sized image.
Illustration of dependencies: Configuration before modification for
replication (Oracle 10g)
.
Click the thumbnail above to view full-sized image.
Illustration of dependencies: Configuration after modification for
replication (Oracle9i)
Click the thumbnail above to view full-sized image.
Illustration of dependencies: Configuration after modification for
replication (Oracle 10g)
Click the thumbnail above to view full-sized image.
Modifying the VCS configuration on the primary site
Highlights of the procedure to modify the existing VCS configuration on the primary site include:
-
Configure two service groups:
-
A log owner group including the RVGLogowner resource.
-
An RVG group including the RVGShared resource replication objects.
-
Add the RVGSharedPri resource to the existing Oracle database service group and define this group as a global group by setting the ClusterList and ClusterFailOverPolicy attributes.
-
Move the CVMVolDg resource from the existing Oracle database service group to the newly created RVGShared service group.
To modify VCS on the primary site
-
Log into one of the nodes on the primary cluster.
-
Save the existing configuration to disk and make the configuration read-only while you are make the changes:
# haconf -dump -makero
-
Make sure VCS is not running while you edit main.cf by stopping the VCS engine on all nodes and leave the resources available:
# hastop -all -force
-
Make a backup copy of the main.cf file:
# cd /etc/VRTSvcs/conf/config
# cp main.cf main.orig
-
Use vi or another text editor to edit the main.cf file.
-
Add a failover service group using the appropriate values for your cluster and nodes. Include:
group rlogowner (
SystemList = { galaxy = 0, nebula = 1 }
AutoStartList = { galaxy, nebula }
)
IP logowner_ip (
Device =lan0
Address = "10.10.9.101"
NetMask = "255.255.240.0"
)
NIC nic (
Device =lan0
NetworkType = ether
)
RVGLogowner logowner (
RVG = rac1_rvg
DiskGroup = oradatadg
)
requires group RVGgroup online local firm
logowner requires logowner_ip
logowner_ip requires nic
-
Add the RVG service group using the appropriate values for your cluster and nodes.
Example RVGgroup service group:
group RVGgroup (
SystemList = { galaxy = 0, nebula = 1 }
Parallel = 1
AutoStartList = { galaxy, nebula }
)
RVGShared racdata_rvg (
RVG = rac1_rvg
DiskGroup = oradatadg
)
CVMVolDg racdata_voldg(
CVMDiskGroup = oradatadg
CVMActivation = sw
)
requires group cvm online local firm
racdata_rvg requires racdata_voldg
-
Modify the Oracle service group using the appropriate values for your cluster and nodes:
-
Define the Oracle service group as a global group by specifying the clusters on the primary and secondary sites as values for the ClusterList group attribute (see the bolded attribute in the example that follows).
-
Add the ClusterFailOverPolicy cluster attribute. Symantec recommends using the Manual value. See the bolded attribute in the example.
-
Add the RVGSharedPri resource to the group configuration.
-
Remove the CVMVolDg resource, if it has been configured in your previous configuration. This resource is now part of the RVG service group.
-
Specify the service group to depend (online, local, firm) on the RVG service group.
-
Remove the existing dependency of the Oracle Database service group on the CVM service group. Remove the line:
requires group CVM online local firm
-
Remove the existing dependency between the CFSMount for the oracle database and the CVMVoldg for the Oracle database. Remove the line:
oradata_mnt requires oradata_voldg
Example Oracle database service group configured for replication:
group oradb1_grp
SystemList = { galaxy = 0, nebula = 1 }
ClusterList = { rac_cluster101 = 0, rac_cluster102 = 1 }
Parallel = 1
ClusterFailOverPolicy = Manual
Authority = 1
AutoStartList = { galaxy, nebula }
)
CFSMount oradata_mnt
MountPoint = "/oradata"
BlockDevice = "/dev/vx/dsk/oradatadg/racdb_vol"
)
RVGSharedPri ora_vvr_shpri (
RvgResourceName = racdata_rvg
OnlineRetryLimit = 0
)
Oracle rac_db (
Sid @galaxy = vrts1
Sid @nebula = vrts2
Owner = Oracle
Home = "/oracle/orahome/dbs"
Pfile @galaxy = "/oracle/orahome/dbs/initvrts1.ora"
Pfile @nebula = "/oracle/orahome/dbs/initvrts2.ora"
StartUpOpt = SRVCTLSTART
ShutDownOpt = SRVCTLSTOP
MonScript = "./bin/Oracle/SqlTest.pl"
)
requires group RVGgroup online local firm
oradata_mnt requires ora_vvr_shpri
rac_db requires oradata_mnt
-
Save and close the main.cf file.
-
Verify the syntax of the /etc/VRTSvcs/conf/config/main.cf file:
# hacf -verify /etc/VRTSvcs/conf/config
Modifying the VCS configuration on the secondary site
Highlights of the procedure to modify the existing VCS configuration on the secondary site include:
-
Add the log owner and RVG service groups.
-
Add a service group to manage the Oracle database and the supporting resources.
-
Define the replication objects and agents, such that the cluster at the secondary site can function as a companion to the primary cluster.
The steps are similar to what you performed on the primary site.
To modify VCS on the secondary site
-
Log into one of the nodes on the secondary site as superuser.
-
Save the existing configuration to disk and make the configuration read-only while you are make the changes:
# haconf -dump -makero
-
Ensure VCS is not running while you edit the main.cf by stopping the VCS engine on all systems and leave the resources available:
# hastop -all -force
-
Make a backup copy of the main.cf file:
# cd /etc/VRTSvcs/conf/config
# cp main.cf main.orig
-
Use vi or another text editor to edit the main.cf file.
-
Edit the CVM group on the secondary site.
Review the sample configuration file after the SF Oracle RAC installation to see the CVM configuration.
See Verifying SF Oracle RAC installation using VCS configuration file
In our example, the secondary site has rac_cluster102 consisting of the nodes mercury and jupiter. To modify the CVM service group on the secondary site, use the CVM group on the primary site as your guide.
-
Add a failover service group using the appropriate values for your cluster and nodes. Include:
group rlogowner (
SystemList = { galaxy = 0, nebula = 1 }
AutoStartList = { galaxy, nebula }
)
IP logowner_ip (
Device =lan0
Address = "10.11.9.102"
NetMask = "255.255.240.0"
)
NIC nic (
Device =lan0
NetworkType = ether
)
RVGLogowner logowner (
RVG = rac1_rvg
DiskGroup = oradatadg
)
requires group RVGgroup online local firm
logowner requires logowner_ip
logowner_ip requires nic
-
Add the RVG service group using the appropriate values for your cluster and nodes.
Example RVGgroup service group:
group RVGgroup (
SystemList = { mercury = 0, jupiter = 1 }
Parallel = 1
AutoStartList = { mercury, jupiter }
)
RVGShared racdata_rvg (
RVG = rac1_rvg
DiskGroup = oradatadg
)
CVMVolDg racdata_voldg
CVMDiskGroup = oradatadg
CVMActivation = sw
)
requires group cvm online local firm
racdata_rvg requires racdata_voldg
-
Add an Oracle service group. Use the Oracle service group on the primary site as a model for the Oracle service group on the secondary site.
-
Define the Oracle service group as a global group by specifying the clusters on the primary and secondary sites as values for the ClusterList group attribute.
-
Assign this global group the same name as the group on the primary site; for example, oradb1_grp.
-
Include the ClusterList and ClusterFailOverPolicy cluster attributes. Symantec recommends using the Manual value.
-
Add the RVGSharedPri resource to the group configuration.
-
Remove the CVMVolDg resource, if it has been configured in your previous configuration. This resource is now part of the RVG service group.
-
Specify the service group to depend (online, local, firm) on the RVG service group.
Below is an example of the Oracle group on the secondary site:
.
group oradb1_grp
SystemList = { mercury = 0, jupiter = 1 }
ClusterList = { rac_cluster101 = 0, rac_cluster102 = 1 }
Parallel = 1
OnlineRegryInterval = 300
ClusterFailOverPolicy = Manual
Authority = 1
AutoStartList = { mercury, jupiter }
)
CFSMount oradata_mnt
MountPoint = "/oradata"
BlockDevice = "/dev/vx/dsk/oradatadg/racdb_vol"
)
RVGSharedPri ora_vvr_shpri (
RvgResourceName = racdata_rvg
OnlineRetryLimit = 0
)
Oracle rac_db (
Sid @mercury = vrts1
Sid @jupiter = vrts2
Owner = Oracle
Home = "/oracle/orahome/dbs"
Pfile @mercury = "/oracle/orahome/dbs/initvrts1.ora"
Pfile @jupiter = "/oracle/orahome/dbs/initvrts2.ora"
StartUpOpt = SRVCTLSTART
ShutDownOpt = SRVCTLSTOP
MonScript = "./bin/Oracle/SqlTest.pl"
)
requires group RVGgroup online local firm
oradata_mnt requires ora_vvr_shpri
rac_db requires oradata_mnt
-
Save and close the main.cf file.
-
Verify the syntax of the /etc/VRTSvcs/conf/config/main.cf file:
# hacf -verify /etc/VRTSvcs/conf/config