hadoop/hdfs/name is in an inconsistent state: storage directory(hadoop/hdfs/data/) does not exist or is not accessible

后端 未结 5 1403
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-19 03:21

I have tried all the different solutions provided at stackoverflow on this topic, but of no help Asking again with the specific log and the details

Any help is apprecia

相关标签:
5条回答
  • 2021-02-19 03:44

    Had similar problem, I formatted the namenode then started it

    Hadoop namenode -format
    hadoop-daemon.sh start namenode
    
    0 讨论(0)
  • 2021-02-19 03:48

    Removed the "file:" from the hdfs-site.xml file

    [WRONG HDFS-SITE.XML]

      <property>
      <name>dfs.namenode.name.dir</name>
      <value>file:/home/hduser/mydata/hdfs/namenode</value>
      </property>
      <property>
      <name>dfs.datanode.data.dir</name>
      <value>file:/home/hduser/mydata/hdfs/datanode</value>
      </property>
    

    [CORRECT HDFS-SITE.XML]

      <property>
      <name>dfs.namenode.name.dir</name>
      <value>/home/hduser/mydata/hdfs/namenode</value>
      </property>
    
    
      <property>
      <name>dfs.datanode.data.dir</name>
      <value>/home/hduser/mydata/hdfs/datanode</value>
      </property>
    

    Thanks to Erik for the help.

    0 讨论(0)
  • 2021-02-19 03:58

    Follow the below steps,

    1.Stop all services

    2.Format your namenode

    3.Delete your data node directory

    4.start all services

    0 讨论(0)
  • 2021-02-19 03:59

    1) name node directory you should be owner and give chmod 750 appropriately
    2)stop all services
    3)use hadoop namenode -format to format namenode
    4)add this to hdfs-site.xml

    <property>
        <name>dfs.data.dir</name>
        <value>path/to/hadooptmpfolder/dfs/name/data</value> 
        <final>true</final> 
        </property> 
        <property> 
        <name>dfs.name.dir</name>
        <value>path/to/hadooptmpfolder/dfs/name</value> 
        <final>true</final> 
    </property> 
    

    5) to run hadoop namenode -format add export PATH=$PATH:/usr/local/hadoop/bin/ in ~/.bashrc wherever hadoop is unzip add that in path

    0 讨论(0)
  • 2021-02-19 04:04

    run these commands on terminal

    $ cd ~
    $ mkdir -p mydata/hdfs/namenode
    $ mkdir -p mydata/hdfs/datanode
    

    give permission to both directory 755

    then,

    Add this property in conf/hdfs-site.xml

      <property>
     <name>dfs.namenode.name.dir</name>
     <value>file:/home/hduser/mydata/hdfs/namenode</value>
    </property>
    
    
    <property>
     <name>dfs.datanode.data.dir</name>
     <value>file:/home/hduser/mydata/hdfs/datanode</value>
    </property>
    

    if not work ,then

    stop-all.sh
    start-all.sh
    
    0 讨论(0)
提交回复
热议问题