Example of creating a new replication domain by cloning
This is an example of creating a new replication domain based on the data and configuration on a source database server that does not have replication defined. The three additional replication servers in the domain are added by cloning the source server.
This example creates a replication domain and grid that contain four replication servers: serv1, serv2, serv3, serv4. Each server computer has the HCL OneDB™ database server installed. The source server contains the stores_demo database.
- On the serv1 server, set the CDR_QDATA_SBSPACE configuration parameter.
- On the serv1 server, set the value of the ENABLE_SNAPSHOT_CLONE
configuration parameter to
1
in the onconfig file. - On the serv1 server, add the following sqlhosts information
about serv1 and serv2:
gserv1 group - - i=143 serv1 ontlitcp ny.usa.com 1230 g=gserv1 gserv2 group - - i=144 serv2 ontlitcp tokyo.japan.com 1231 g=gserv2
- On both the serv1 and serv2 servers, complete the ifxclone prerequisites
for all servers, such as setting the required configuration parameters
and environment variables.
Set these environment variables:
- INFORMIXDIR
- INFORMIXSERVER
- INFORMIXSQLHOSTS
- ONCONFIG
Set these configuration parameters to the same values on both servers:
- DRAUTO
- DRINTERVAL
- DRTIMEOUT
- LOGBUFF
- LOGFILES
- LOGSIZE
- LTAPEBLK
- LTAPESIZE
- ROOTNAME
- ROOTSIZE
- PHYSBUFF
- PHYSFILE
- STACKSIZE
- TAPEBLK
- TAPESIZE
- On the serv2 server, create all of the chunks that exist on the serv1 server. You can use the --createchunkfile option (-k) of the ifxclone utility to automatically create cooked chunks on the target server.
- On the serv2 server, run the ifxclone command with the
--disposition=RSS option to clone the data and the configuration of the
serv1 server onto the serv2
server:
ifxclone --trusted --source=serv1 --sourceIP=192.168.0.1 --sourcePort=1230 --target=serv2 --targetIP=192.168.0.2 --targetPort=1231 --disposition=RSS --createchunkfile
ifxclone --trusted --source=serv1 --sourceIP=192.168.0.1 --sourcePort=1230 --target=serv2 --targetIP=192.168.0.2 --targetPort=1231 --disposition=RSS
- On the serv1 server, run the cdr check sec2er command
to determine if conversion to replication servers is possible:
$cdr check sec2er -c gserv1 gserv2 Secondary conversion to ER is possible.
- On the serv1 server, run the cdr start sec2er command
to convert both servers to replication servers, create a new replication
domain, create and start replicates based on all the tables on the serv1 server:
cdr start sec2er -c gserv1 gserv2
- On the serv3 and serv4 servers, provision chunk paths and other storage to the same paths and at least the same sizes as on the serv1 server.
- On the serv3 server, run the ifxclone command
with the --disposition=ER option to clone the data
and the configuration of the serv1 server onto the serv3 server:
ifxclone --trusted --source=serv1 --sourceIP=192.168.0.1 --sourcePort=1230 --target=serv3 --targetIP=192.168.0.3 --targetPort=1232 --disposition=ER
- On the serv4 server, run the ifxclone command
with the --disposition=ER option to clone the data
and the configuration of the serv1 server onto the serv4 server:
ifxclone --trusted --source=serv1 --sourceIP=192.168.0.1 --sourcePort=1230 --target=serv4 --targetIP=192.168.0.4 --targetPort=1233 --disposition=ER
- Edit the sqlhosts files on all four servers
so that they each have the following information:
gserv1 group - - i=143 serv1 ontlitcp ny.usa.com 1230 g=gserv1 gserv2 group - - i=144 serv2 ontlitcp tokyo.japan.com 1231 g=gserv2 gserv3 group - - i=145 serv3 ontlitcp rome.italy.com 1232 g=gserv3 gserv4 group - - i=146 serv4 ontlitcp perth.australia.com 1233 g=gserv4