Decommissioning DataNodes
This section lists the steps to decommission DataNodes.
To decommission a DataNode from the HDFS cluster, perform the following steps:
- Modify the dfs.exclude file as specified under the
dfs.hosts.exclude value in hdfs-site.xml by adding the
nodes to be decommissioned.
dfs.exclude file <hostname1> <hostname2>
- Run the following command for the changes to take
effect:
hdfs dfsadmin -refreshNodes
- Monitor the decommissioning process by running the following command:
hdfs dfsadmin -report
Note: When the DataNode is DECOMMISSIONED, you can stop the DataNode.