To decommission a DataNode from a federation, you must add the node to the exclude
file and distribute the updated exclude file among all the NameNodes. Each NameNode
decommissions its block pool. When all the NameNodes finish decommissioning a DataNode, the
DataNode is considered decommissioned.
-
In the exclude file, specify the DataNode to decommission.
If you want to decommission multiple DataNodes, add the corresponding host names
separated by a newline character to the exclude file.
-
Distribute the updated exclude file among all the NameNodes.
distribute-exclude.sh <exclude_file>
-
Refresh all the NameNodes to identify the new exclude file.
The following command uses HDFS configuration to determine the configured
NameNodes in the cluster and refreshes them to identify the new exclude
file:
refresh-namenodes.sh