Configuring replication for the secondary site
To create objects for replication on the secondary site, use the vradmin
command with the addsec
option. Setting up replication on the secondary site involves:
Creating the data and SRL volumes on the secondary site
Note the following when creating volumes for the data and SRL:
To create the data and SRL volumes on the secondary site
-
In the disk group created for the Oracle database, create a volume for data; in this case, the rac_vol1 volume on the primary site is 6.6 GB:
# vxassist -g oradatadg make rac_vol1 6600M nmirror=2 c4t2d1 c4t2d2
-
Create the volume for the SRL, using the same name and size of the equivalent volume on the primary site. Create the volume on different disks from the disks for the database volume, but on the same disk group that has the data volume.
# vxassist -g oradatadg make rac1_srl 1500M nmirror=2 c4t2d3 c4t2d4
Editing the /etc/vx/vras/.rdg files
Editing the /etc/vx/vras/.rdg file on the secondary site enables VVR to replicate the disk group from the primary site to the secondary site. On each node, VVR uses the /etc/vx/vras/.rdg file to check the authorization to replicate the RVG on the primary site to the secondary site. The file on each node in the secondary site must contain the primary disk group ID, and likewise, the file on each primary system must contain the secondary disk group ID.
To edit the /etc/vx/vras/.rdg files
-
On a node in the primary site, display the primary disk group ID:
# vxprint -l
diskgroup
.....
-
On each node in the secondary site, edit the /etc/vx/vras/.rdg file and enter the primary disk group ID on a single line.
-
On each cluster node of the primary cluster, edit the file and enter the primary disk group ID on a single line.
Setting up IP addresses for RLINKs on each cluster
Creating objects with the vradmin
command requires resolvable virtual IP addresses that set network RLINK connections as host names of the primary and secondary sites.
To set up IP addresses for RLINKS on each cluster
-
For each RVG running on each cluster, set up a virtual IP address. These IP addresses are part of the RLINK.
-
Set up the virtual IP address on one node in the primary cluster:
The example assumes that the public network interface is lan0:1, the virtual IP address is 10.10.9.101, and the net mask is 255.255.240.0 for the cluster on the primary site.
# ifconfig lan0:1 plumb
# ifconfig lan0:1 inet 10.10.9.101 netmask 255.255.240.0
# ifconfig lan0:1 up
-
Set up the virtual IP address on one node in the secondary cluster:
Use the same commands with appropriate values for the interface, IP address, and net mask on the secondary site.
The example assumes the interface is lan0:1, virtual IP address is 10.11.9.102, and the net mask is 255.255.240.0 on the secondary site.
-
Define the virtual IP addresses to correspond to a virtual cluster host name on the primary site and a virtual cluster host name on the secondary site.
Update the /etc/hosts file on all the nodes on both the primary and secondary sites.
The examples assume rac_clus101_priv has IP address 10.10.9.101 and rac_clus102_priv has IP address 10.11.9.102.
-
Use the
ping
command to verify the links are functional.
Setting up disk group on secondary site for replication
Create the replication objects on the secondary site from the master node on the primary site, using the vradmin
command.
To set up the disk group on the secondary site for replication
-
Issue the command in the following format from the cluster on the primary site:
vradmin -g dg_pri
addsec rvg_pri
pri_host
sec_host
where:
-
dg_pri is the disk group on the primary site that VVR will replicate. For example: oradatadg
-
rvg_pri is the RVG on the primary site. For example: rac1_rvg
-
pri_host is the virtual IP address or resolvable virtual host name of the cluster on the primary site. For example: 10.10.9.101 or rac_clus101_priv
-
sec_host is the virtual IP address or resolvable virtual host name of the cluster on the secondary site. For example: 10.11.9.102 or rac_clus102_priv
For example, the command to add the cluster on the primary site to the RDS is:
# vradmin -g oradatadg addsec rac1_rvg rac_clus101_priv rac_clus102_priv
-
On the secondary site, the command does the following:
-
Creates an RVG within the specified disk group using the same name as the one for the primary site
-
Associates the data and SRL volumes that have the same names as the ones on the primary site with the specified RVG
-
Adds a data change map (DCM) for the data volume
-
Creates cluster RLINKS for the primary and secondary sites with the default names; for example, the "primary" RLINK created for this example is rlk_rac_clus102_priv_rac1_rvg and the "secondary" RLINK created is rlk_rac_clus101_priv_rac1_rvg.
-
Verify the list of RVGs in the RDS by executing the following command.
# vradmin -g oradg -l printrvg
For example:
Reeplicated Data Set: rac1_rvg
Primary:
HostName: 10.180.88.187 <localhost>
RvgName: rac1_rvg
DgName: oradatadg
datavol_cnt: 1
vset_cnt: 0
srl: rac1_srl
RLinks:
name=rlk_10.11.9.102_ rac1_rvg, detached=on,
synchronous=off
Secondary:
HostName: 10.190.99.197
RvgName: rac1_rvg
DgName: oradatadg
datavol_cnt: 1
vset_cnt: 0
srl: rac1_srl
RLinks:
name=rlk_10.10.9.101_ rac1_rvg, detached=on,
synchronous=off
Note
After you start the replication, the value of detached flag changes the status from off to on.