在 IIAS 上设置基于文件系统复制的 DR 解决方案
在两个 IIAS 系统(主系统和辅助系统)上,都必须启用并配置灾难恢复解决方案。
开始之前
过程
- 通过在两个 IIAS 系统上都运行以下步骤,启用灾难恢复解决方案:
- 以 apuser 身份登录到每个设备。
- 运行以下命令:
apdr enable --appliance-name <system_hostname>
-
在设置 DR 之前,请确保在这两个 IIAS 系统上运行的任何应用程序都已断开连接。在这两个系统上运行以下命令:
apstop -
登录到 IIAS 主系统,并运行以下命令:
示例输出: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 -
在主系统上,使用以下命令来启动 DR 设置过程:
此命令会启动主系统与辅助系统之间的设置,并开始将用户数据从主 IIAS 系统复制到辅助系统。apdr setup示例:[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. -
当已启动设置时,可以使用 apdr setup --status --detail 命令来跟踪设置进度。
示例输出:
[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 -
在确认已成功完成设置之后,在主系统和辅助系统上运行下列命令,以使 AFMDR 可供复制:
apdr disable apdr enable -
设置过程完成后,您可使用 apstart 命令启动主系统。
要点: 请勿在辅助系统上启动数据库。
结果
完成设置之后,每隔 15 秒就会将主系统上新应用的任何数据连续复制到辅助系统。