Setting up file system replication based DR solution on IAS
The disaster recovery solution must be enabled and configured on both IAS systems, the primary, and the secondary.
Before you begin
Procedure
- Enable the disaster recovery solution by running the following steps on both IAS systems:
- Log in to each appliance as apuser.
- Run the following
command:
apdr enable --appliance-name <system_hostname>
- On one system at a time, run the next few steps pertaining to certificate
authentication:
- On the first system, as the apuser create a temporary directory where you
will be temporarily exporting the certificate created during apdr enable
-a:
mkdir <temp directory> - Export the client certificate to the local directory you
created:
apdr certificate --export <temporary directory path you created> - Copy the certificate to the second system in a temporary directory using any method. For
example:
scp <path/client.pem> apuser@<host>:~/tmp/ - On the second system, import the certificate you copied
over:
apdr certificate --import <path>/client.pem - Delete the temporary copy of the certificate from your temporary directories on both systems
after importing it:
rm <temporary directory path>/client.pem - On the second system, verify the certificate was imported
correctly:
In the output, look for Certificates validated on local system.apdr certificate --validate - Restart the DR service on the second system to start it with certificate
authentication:
apdr disable apdr enable - Repeat substeps a-g on the second system, so that both systems can communicate in each direction.
- On the first system, as the apuser create a temporary directory where you
will be temporarily exporting the certificate created during apdr enable
-a:
-
Before setting up DR, ensure that any applications that are running on either IAS are
disconnected. Run the following command on both systems:
apstop -a -
Before configuring the IAS system, you can run the following health check command by logging in
to the primary IAS
system:
The command determines the network bandwidth, retransmissions and latency between the primary and secondary systems.apdr config -p <primary> --primary-ip-list <primary-ip-list> -s <secondary> --secondary-ip-list <secondary-ip-list> --check-onlyNote: The recommended bandwidth between the primary and secondary systems is ~10 Gb/s.Example:[apuser@node0101 ~]# apdr config -p 9.30.0.46 --primary-ip-list 9.30.0.46 -s 9.30.1.156 --secondary-ip-list 9.30.1.156 --check-only Checking primary and secondary nodes Checking the specified ip addresses Getting APDR status Checking network statistics between both the systems Successfully submitted a network diagnostics job STATUS : SUCCEEDED +----------------------+--------------------+-------------------+---------------+ | Route | Bandwidth (gbps) | Retransmissions | Latency (s) | |----------------------+--------------------+-------------------+---------------| | primary to secondary | 9.09 | 399 | 1016 | | secondary to primary | 9.27 | 353 | 1075 | +----------------------+--------------------+-------------------+---------------+ WARNING: The bandwidth between the two DR machines is lower than recommended (~10 gigabits per second). You may still proceed with configuration, however you may experience slower replication than usual due to low bandwidth. - Log in to the primary IAS system and run the following command:
Important: Make sure that you specify names for the primary and secondary systems correctly. All the current database data of the secondary system will be erased as part of the setup. For more details on the apdr config command, see apdr command.
Example output:apdr config --primary <primary> --secondary <secondary> --primary-ip-list <primary-ip-list> --secondary-ip-list <secondary-ip-list> --snapshot-interval <snapshot-interval> --scheduler-starttime <starthour> <startminute>[root@node0101 ~]# apdr config --primary sail74-t07 --secondary sail75-t07 --primary-ip-list 9.32.246.205,9.32.246.206,9.32.246.207 --secondary-ip-list 9.32.246.213,9.32.246.214,9.32.246.215 --snapshot-interval 21600 --scheduler-starttime 23 11 checking results for apdr config: Checking primary and secondary nodes Checking the specified ip addresses Getting APDR status Setting the configuration on both the systems Successfully configured DR at sail74-t07 and sail75-t07 You can now proceed to do the DR setup using the command 'apdr setup'. Make sure you stop the database at Primary and Secondary via 'apstop' before proceeding with setup -
Initiate the DR setup process with the following command on the primary system:
This command initiates the setup between the primary and secondary system and begins the replication of user data from the primary IAS to the secondary IAS.apdr setupExample:[root@node0101 ~]# apdr setup Getting APDR status Starting conversion of Filesystems in both the systems Setting up DR between Primary and Secondary DR setup process between 9.30.96.159 [role=Primary] and 9.30.181.77 [role=Secondary] successfully initiated. Use the command 'apdr setup --status' to monitor the setup progress. -
When the setup has been initiated, you can use the apdr setup --status
--detail command to track the progress of the setup.
Example output:
[root@node0101 ~]# apdr setup --status --detail PRIMARY PROGRESS: CURRENT PROGRESS: /opt/ibm/appliance/storage/scratch/db2archive Done /opt/ibm/appliance/storage/head/home/db2inst1/db2/keystore Done /opt/ibm/appliance/storage/data/db2inst1 Done /opt/ibm/appliance/storage/local/db2inst1 Done SECONDARY PROGRESS: CURRENT PROGRESS: /opt/ibm/appliance/storage/scratch/db2archive Done /opt/ibm/appliance/storage/head/home/db2inst1/db2/keystore Done /opt/ibm/appliance/storage/data/db2inst1 Done /opt/ibm/appliance/storage/local/db2inst1 Done -
After confirming that the setup completed successfully, run the following commands on both,
primary and secondary systems to make AFMDR ready for replication:
apdr disable apdr enable -
When the setup process is completed, you can start the primary system by using the
apstart command.
Important: Don’t start the database on the secondary system.
Results
After the setup is completed, any newly applied data on the primary system is continuously replicated to the secondary every 15 seconds.