Execute these commands on the NameNode:
Login as $HDFS_USER /usr/lib/hadoop/bin/hadoop namenode -format /usr/lib/hadoop/bin/hadoop-daemon.sh --config $HADOOP_CONF_DIR start namenode
Execute these commands on the Secondary NameNode :
Login as $HDFS_USER /usr/lib/hadoop/bin/hadoop-daemon.sh --config $HADOOP_CONF_DIR start secondarynamenode
Execute these commands on all DataNodes:
Login as $HDFS_USER /usr/lib/hadoop/bin/hadoop-daemon.sh --config $HADOOP_CONF_DIR start datanode