Inherit and Duplicate the Cluster Settings
This section describes the procedure for replicating a cluster with the same settings based on the cluster with the communication path and resource set.
The steps describe preparing a 2-node LifeKeeper cluster and another LifeKeeper cluster to be replicated. The other cluster is not configured with communication paths and resources.
The following are resource and communication path restrictions for the resource and communication path output when using the export command. Before performing the steps, check to see if the environment is supported.
- Make sure the communication path protocol that can be exported is TCP/IP.
# lkcli status -q LOCAL TAG ID STATE PRIO PRIMARY target1 ip-10.1.6.100 ip-10.1.6.100 ISP 1 target1 MACHINE NETWORK ADDRESSES/DEVICE STATE PRIO target2 TCP 10.1.6.88/10.1.6.89 ALIVE 1
- Make sure all resources in the cluster to be exported are supported ARKs with LKCLI. Refer to LKCLI Subcommands for Each ARK for a list of supported ARKs and resource types.
# lkcli resource info --tag ip-10.1.6.100 --- app: comm priority: 1 properties: device: ens192 ipaddr: 10.1.6.100 netmask: 255.255.255.0 pinglist: '' realip: 0 restoremode: Disabled srcaddr: 0 switchback: INTELLIGENT tag: ip-10.1.6.100 typ: ip
Execute the command on target1
- Save the current settings to the file in the cluster where LifeKeeper is configured.
[target1]# lkcli export > src_settings.yml
- Copy the exported file to the cluster to be replicated.
Execute the command on target3.
- For the exported configuration file, edit only the IP address and hostname manually.
[target3]# sed -e "s/10\.1\.6\.88/10\.1\.6\.90/" -e "s/target1/target3/" -e "s/10\.1\.6\.89/10\.1\.6\.91/" -e "s/target2/target4/" src_settings.yml > dest_settings.yml
- Make sure there are no communication path or resources in the cluster to be replicated (check all nodes in the cluster).
If any exist, run the following command to delete: lkcli clean --mode all. Note that the setting won’t be restored after executing the clean command.
[target3]# lkcli status -q LOCAL TAG ID STATE PRIO PRIMARY
Execute the command on target3 and target4
- Import the resources in the replicated system and check that the communication path can be created. Execute this command on all of the nodes in the cluster.
# lkcli import commpath --file dest_settings.yml Performing commpath 'target3:10.1.6.90/10.1.6.91' create... Commpath 'target3:10.1.6.90/10.1.6.91' created successful.
# lkcli status -q LOCAL TAG ID STATE PRIO PRIMARY MACHINE NETWORK ADDRESSES/DEVICE STATE PRIO target4 TCP 10.1.6.90/10.1.6.91 ALIVE 1
*The communication path status will be ALIVE when it is created in both directions between 2 nodes.
- Import the resources in the replicated system and check that the resource can be created. Execute this command only once in the cluster.
# lkcli import resource --file settings.yml BEGIN create of "ip-10.1.6.100" LifeKeeper application=comm on target1. LifeKeeper communications resource type= ip on target1. Creating resource instance with id ip-10.1.6.100 on machine target1 Resource successfully created on target1 BEGIN restore of "ip-10.1.6.100" END successful restore of "ip-10.1.6.100" END successful create of "ip-10.1.6.100". Removing ping list for subnet 172.31.0.0... Performing restoremode change ... restoremode change successful. Building independent resource list Checking existence of extend and canextend scripts Checking extendability for ip-10.1.6.100 Pre Extend checks were successful Extending resource instances for ip-10.1.6.100 Creating dependencies Setting switchback type for hierarchy Creating equivalencies LifeKeeper Admin Lock (ip-10.1.6.100) Released Hierarchy successfully extended Removing ping list for subnet 172.31.0.0...
- The communication path and resource are created.
# lkcli status -q LOCAL TAG ID STATE PRIO PRIMARY target3 ip-10.1.6.100 ip-10.1.6.100 ISP 1 target3 MACHINE NETWORK ADDRESSES/DEVICE STATE PRIO target4 TCP 10.1.6.90/10.1.6.91 ALIVE 1