Decommissioning a Node and Uninstalling Data Fabric Software from the Command Line
About this task
Use the following procedure to remove a node and uninstall Data Fabric software. This procedure detaches the node from the cluster and removes the Data Fabric packages, log files, and configuration files, but does not format the disks.
NOTE
 Before decommissioning a node, make sure any data on the node is replicated and any
            needed services are running elsewhere. If the node you are decommissioning runs a
            critical service, such as CLDB or ZooKeeper, verify that enough instances of that
            service are running on other nodes in the cluster. See Planning
               the Cluster for recommendations about service assignment to nodes. Complete the following steps to permanently decommission a node:
Procedure
- 
            Drain the node of data by moving the node to the 
/decommissionedphysical topology. All data on a node in the/decommissionedtopology is migrated to volumes and nodes in thedatatopology. - Run the following command to check if a given volume is present on the node:
               
maprcli dump volumenodes -volumename <volume> -json | grep <ip:port>NOTERun this command for each non-local volume in your cluster to verify that the node being decommissioned is not storing any volume data. - 
            Change to the 
rootuser (or usesudofor the following commands). - Stop Warden on the node by running the following command:
            
service mapr-warden stop - If ZooKeeper is installed on the node, stop it: 
service mapr-zookeeper stop - 
            Determine which Data Fabric packages are installed
               on the node:
            
dpkg --list | grep mapr(Ubuntu)rpm -qa | grep mapr(Red Hat or CentOS)
 - 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)
 - Remove the 
/opt/maprdirectory to remove any instances ofhostid,hostname,zkdata, andzookeeperleft behind by the package manager. - 
            Remove the 
/maprdirectory to delete any NFS/POSIX client mount points. - 
            Remove any Data Fabric cores in the
                  
/opt/coresdirectory. - 
            If the node you have decommissioned is a CLDB node or a ZooKeeper node, then run
                  
configure.shon all other nodes in the cluster. See Configuring the Node. - 
            Remove the node by running the following command:
            
maprcli node remove -nodes <node-name>