You can add or remove roles from a node after it has been deployed in a cluster. This process involves installing or uninstalling packages on the node, and then updating the cluster to recognize the new role for this node.

Adding a role to an existing node:

The process of adding a role to a node is similar to the initial installation process for nodes. For further detail see Installing MapR Software.

  1. Install the package(s) corresponding to the new role(s) using apt-get or yum.
  2. Run configure.sh with a list of the CLDB nodes and ZooKeeper nodes in the cluster. If this node does not have any of the CLDB, ZooKeeper, or Fileserver roles, go to step 5.
  3. If you added the CLDB or ZooKeeper role, you must run configure.sh -R on all other nodes in the cluster.
  4. If you added the Fileserver role, run disksetup to format and prepare disks for use as storage.
  5. Restart the warden:

    % service mapr-warden restart

When the warden restarts, it picks up the new configuration and starts the services that support the new role, making them active in the cluster.

Removing a role from an existing node:

  1. Stop the service for the role you want to remove from the MapR Control System (MCS) or with the maprcli command-line tool. The following example stops the HBase master service:

    % maprcli node services -hbmaster stop -nodes mapr-node1

    Icon

    When you are removing the NFS role, unmount any existing client mounts before stopping the NFS service. Be aware that removing the NFS role from a node will affect any Virtual IP (VIP) pools that include this node.

  2. Purge the role packages with the apt-get, yum, or zypper commands, as suitable for your operating system.
  3. Run the configure.sh script with the -R option.
  4. When you remove the CLDB or ZooKeeper role from a node, run configure.sh -R on all nodes in the cluster.

    Icon

    When you remove the ZooKeeper role from a node, be sure to consider the quorum requirements of your cluster.

The warden picks up the new configuration automatically. When it is convenient, restart the warden:

# service mapr-warden restart

Removing the mapr-filesystem role requires additional steps. Refer to Removing the Fileserver Role.