安装hadoop的时候出现这个问题,所有namenode ,jobtracker等日志都报这个错误:

File /home/hexianghui/tmp/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1 

并且secondarynamenode无法启动起来:  

Exception in thread "main" org.apache.hadoop.hdfs.server.common.InconsistentFSStateException: Directory /usr/local/hadoop-0.20.2/hadooptmp/dfs/namesecondary is in an inconsistent state: checkpoint directory does not exist or is not accessible.
 at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode$CheckpointStorage.recoverCreate(SecondaryNameNode.java:522)
 at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.initialize(SecondaryNameNode.java:145)
 at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.<init>(SecondaryNameNode.java:115)
 at org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode.main(SecondaryNameNode.java:469)

注意到是目录权限的问题, 所有dir路径所在的都在/lxj/tmp下,由于没有/lxj 文件的 权限,更改权限都。hadoop可以使用