MapR 5.0 Documentation : Working with Multiple Clusters

To mirror volumes between clusters, edit the mapr-clusters.conf file on the source volume's cluster and create an entry for each additional cluster that hosts a mirror of the volume. The entry must list the cluster's name, followed by a space-separated list of hostnames and ports for the cluster's CLDB nodes. In addition, use the secure parameter to specify whether the clusters are secure or unsecure.

To set up multiple clusters

  1. On each cluster, make a note of the cluster name and CLDB nodes (the first line in mapr-clusters.conf)
  2. On each webserver and CLDB node, add the remote cluster's CLDB nodes to /opt/mapr/conf/mapr-clusters.conf, using the following format:

    clustername1  <CLDB> <CLDB> <CLDB>
    [ clustername2  <CLDB> <CLDB> <CLDB> ]
    [ ... ]

    For example, suppose you have a cluster, devcluster1, with two CLDB nodes, devcldb1-1 and devcldb1-2. Now you want to add a second cluster called devcluster2 with CLDB nodes devcldb2-1 and devcldb2-2. Edit the mapr-clusters.conf file and add the line for devcluster2 as shown:

    devcluster1 devcldb1-1:7222 devcldb1-2:7222
    devcluster2 devcldb2-1:7222 devcldb2-2:7222

    You must include the port number in the CLDB hostname notation.

  3. Set secure=true if both clusters are secure. Set secure=false if both clusters are not secure.

    Mirroring only works between two secure clusters or between two unsecure clusters. Mirroring does not work when one cluster is secure and the other is unsecure.

  4. On each cluster, restart the mapr-webserver service on all nodes where it is running.

To set up cross-mirroring between clusters

You can cross-mirror between clusters, mirroring some volumes from cluster A to cluster B and other volumes from cluster B to cluster A. To set up cross-mirroring, create entries in mapr-clusters.conf as follows:

  • Entries in mapr-clusters.conf on cluster A nodes:
    • First line contains cluster name and CLDB nodes of cluster A (the local cluster)
    • Second line contains cluster name and CLDB nodes of cluster B (the remote cluster)
  • Entries in mapr-clusters.conf on cluster B nodes:
    • First line contains cluster name and CLDB nodes of cluster B (the local cluster)
    • Second line contains cluster name and CLDB nodes of cluster A (the remote cluster)

For example, the mapr-clusters.conf file for cluster A with three CLDB nodes (nodeA, nodeB, and nodeC) would look like this:

clusterA nodeA:7222 nodeB:7222 nodeC:7222
clusterB nodeD:7222

The mapr-clusters.conf file for cluster B with one CLDB node (nodeD) would look like this:

clusterB nodeD:7222
clusterA nodeA:7222 nodeB:7222 nodeC:7222

By creating additional entries in the mapr-clusters.conf file, you can mirror from one cluster to several others.

When a mirror volume is created on a remote cluster (according to the entries in the mapr-clusters.conf file), the CLDB checks that the local volume exists in the local cluster. If both clusters are not set up and running, the remote mirror volume cannot be created.

To set up a mirror volume, make sure:

  • Each cluster is already set up and running
  • Each cluster has a unique name
  • Every node in each cluster can resolve all nodes in remote clusters, either through DNS or entries in /etc/hosts

 

 

Attachments: