所有命令或步骤:

首先,在各个节点上安装nfs服务

  yum install -y nfs

  service rpcbind start

  service nfs start

配置开机自启动服务

  chkconfig rpcbind on

  chkconfig nfs on

编辑/etc/exports文件,添加下面一行

  /mnt/share hadoop1(rw,no_root_squash,async) hadoop2(rw,no_root_squash,async) hadoop6(rw,no_root_squash,async) hadoop7(rw,no_root_squash,async)

  表示后面四台主机对共享目录/mnt/share具有读写权限.

  在hdfs-site.xml中添加下面几行

  

     <property>
                <name>dfs.namenode.shared.edits.dir.ns1</name>
                <value>file:///root/softs/hadoop-2.7.3/sharelogs/eidts_ns1</value>
        </property>
        <property>
                <name>dfs.namenode.shared.edits.dir.ns2</name>
                <value>file:///root/softs/hadoop-2.7.3/sharelogs/eidts_ns2</value>
        </property>

  在需要使用共享目录的节点上挂载共享目录

  mount -t nfs hadoop1:/mnt/share sharelogs/

其他具体配置参照hadoop官方文档

相关文章:

  • 2021-03-31
  • 2021-08-08
  • 2022-01-12
  • 2021-12-20
  • 2022-12-23
  • 2021-09-11
  • 2021-07-26
  • 2021-12-10
猜你喜欢
  • 2021-06-22
  • 2022-12-23
  • 2021-10-18
  • 2021-05-27
  • 2022-12-23
  • 2021-05-02
相关资源
相似解决方案