To Add Nodes to a Cluster
Prepare all nodes.
Although MapR recommends using a Domain Name System (DNS), if you do not, ping the new node from an existing node and vice versa. Use the host name instead of an IP address. If you do not get a response, and if you rule out a network problem, a possible fix is to edit the
/etc/hostsfiles of all nodes in the cluster. All nodes need to be listed in all
- Plan which packages to install based on services you want to run on the new nodes.
For example, you can base your plan partially on a MapReduce mode, installing the list of packages by mode.
- Install MapR Software:
- Configure all new nodes by running
configure.sh, as shown in the example in the next section. If you added a ZooKeeper role to a node, run the following command on all nodes with the new ZooKeeper list:
- On all new nodes, format disks for use by MapR even if you plan to re-use a node from another cluster.
Format the disks from a re-used node to remove data from the old cluster.
- If you manually modified configuration files on the existing nodes and those changes apply to the new nodes, copy only those changes to the respective files on the new nodes.
Start ZooKeeper on all new nodes that have ZooKeeper installed:
Start Warden on all new nodes:
- Restart services that you reconfigured.
Running configure.sh alone does not reconfigure services, such as ZooKeeper. Reconfigured services also require a restart. For example, restart ZooKeeper on each node, one at a time after running
configure.sh. Restart the lead ZooKeeper last. Restarting ZooKeeper adds the new nodes into the existing ZooKeeper quorum. Services that need to connect to CLDB do not always discover a newly added CLDB node without restarting warden.
- Set up node topology for the new nodes.
- On any new nodes running NFS, set up NFS for HA.
This example assumes you are adding a new node to a cluster that is running the CLDB and ZooKeeper on three other nodes: node_a,node_b,node_c. To configure a new node_d, which is not a CLDB or ZooKeeper node, run the following command:
To configure a ZooKeeper node, use the
-no-autostart option and the -Z option followed by the list of ZooKeeper nodes.