Saturday, February 18, 2017

Procedure to remove Data nodes

                                                         

                   Procedure to remove Data nodes 


Use the following procedure to remove a node and uninstall the MapR software from the cluster . 

Note : - If the node you are decommissioning runs a critical service such as CLDB or ZooKeeper please stop since this doc only accounts for Data nodes   i.e Fileserver/Nodemanager.  

1) Yarn Containers  :  
First remove the node from the Label for no new task attempts to be scheduled on this node.   
ps -ef | grep container       ( wait for the output to be zero i.e all existing container finish execution)   
2) Decommission the node :  
Complete the following steps to decommission a node i.e drain data out from the node:  
  1. Drain the data by moving the node to the /decommissioned physical topology. All the data on a node in the /decommissioned topology is migrated to volumes topology i.e nodes part of respective volume topo. 
  1. Run the following command to check if a given volume is present on the node: 
             maprcli dump volumenodes -volumename <volume> -json | grep <ip> 
 Note: Run this command for each non-local volume in your cluster to verify that the node being decommissioned is not storing any volume data. Alternatively you can also see from MCS id MFS disks occupying no space.   
3) Node Removal :  Removing the node from CLDB list . 

Note :- Only after Node is completely decommissioned continue next steps . 

1.   Stop warden on the decommissioned : service maps-warden stop 
2.   Remove any local volumes on the node  eg mapr.node9.maprlab.local.local.mapred.  

maprcli volume remove -name < vol name > 

 3. After warden is stopped for 5 minutes issue node remove command to remove the node completely. 
4. Determine which MapR packages are installed on the node 
  • dpkg --list | grep mapr (Ubuntu) 
  • rpm -qa | grep mapr (Red Hat or CentOS) 
5.  Remove the packages by issuing the appropriate command for the operating system, followed by the list of services. Examples: 
  • apt-get purge mapr-core mapr-cldb mapr-fileserver (Ubuntu) 
  • yum erase mapr-core mapr-cldb mapr-fileserver (Red Hat or CentOS) 
6. Remove the /opt/mapr and /opt/cores directory to remove any instances of hostid, hostname and cores left behind by the package manager.

No comments:

Post a Comment