一、问题描述
某生产环境中发现YupDB运行的Hadoop集群中有个datanode不能正常启动,查看datanode的日志发现:
org.apache.hadoop.util.DiskChecker$DiskErrorException: Too many failed volumes - current valid volumes: 11, volumes configured: 12, volumes failed: 1, volume failures tolerated: 0
原因是该datanode有一块磁盘不能正常读写,而集群中配置了每个节点最大允许磁盘损坏的数量为0,导致不能正常启动。hdfs-site.xml中相关配置如下:
<property>
<name>dfs.datanode.failed.volumes.tolerated</name>
<value>0</value>