查看 datanode block 是否均匀

hdfs dfsadmin -report |grep 'DFS Used%'

查看 hdfs 容量

hdfs-site
dfs.datanode.data.dir
dfs.datanode.du.reserved

Configured Capacity:

数据目录的磁盘/卷的总可用容量

Present Capacity:

受同一卷/磁盘中其他非 HDFS 目录的使用情况的影响

hdfs dfsadmin -report |grep 'DFS Remaining'

查看 datanode 是否下线

hdfs dfsadmin -report |grep 'Decommission'

datanode 下线方式

hadoop-env    
# File naming remote slave hosts. $HADOOP_HOME/conf/slaves by default.
# export HADOOP_WORKERS=${HADOOP_HOME}/conf/slaves

-c hdfs-site -n 'dfs.hosts.exclude'
#-c hdfs-site -n 'dfs.replication' -v 2

#hdfs dfsadmin -refreshNodes

加磁盘

#hdfs-site
dfs.datanode.data.dir

# restart dn
hdfs dfsadmin -refreshNodes
yarn rmadmin -refreshNodes