Ozone搭建

节点规划

cdh01/29.3.219.51

om scm recon s3g

cdh02~cdh04/29.3.219.52~54

datanode

目录

/srv/data01/ozone

/metadata

/datanode

/hdds /ratis dn-crl.db

/om

om.db  /ratis

/scm

scm.db /ratis

/recon

ozone.db /om /scm

/var/log/ozone

/var/run/ozone

配置

ozone-env.sh

ozone-site.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration>
    <property>
        <name>ozone.metadata.dirs</name>
        <value>/srv/data01/ozone/metadata</value>
        <tag>OZONE, OM, SCM, CONTAINER, STORAGE, REQUIRED</tag>
        <description>
      This setting is the fallback location for SCM, OM, Recon and DataNodes
      to store their metadata. This setting may be used only in test/PoC
      clusters to simplify configuration.

      For production clusters or any time you care about performance, it is
      recommended that ozone.om.db.dirs, ozone.scm.db.dirs and
      dfs.container.ratis.datanode.storage.dir be configured separately.
      </description>
    </property>


    <property>
        <name>ozone.om.http-address</name>
        <value>0.0.0.0:19874</value>
    </property>
    <property>
        <name>ozone.om.https-address</name>
        <value>0.0.0.0:19875</value>
    </property>
    <property>
        <name>ozone.om.address</name>
        <value>0.0.0.0:19862</value>
        <tag>OM, REQUIRED</tag>
        <description>
      The address of the Ozone OM service. This allows clients to discover
      the address of the OM.
    </description>
    </property>
    <property>
        <name>ozone.om.ratis.port</name>
        <value>19873</value>
    </property>
  <property>
    <name>ozone.om.db.dirs</name>
    <value>/srv/data01/ozone/om</value>
    <tag>OZONE, OM, STORAGE, PERFORMANCE</tag>
    <description>
      Directory where the OzoneManager stores its metadata. This should
      be specified as a single directory. If the directory does not
      exist then the OM will attempt to create it.

      If undefined, then the OM will log a warning and fallback to
      ozone.metadata.dirs. This fallback approach is not recommended for
      production environments.
    </description>
  </property>
  <property>
    <name>ozone.om.ratis.storage.dir</name>
    <value>/srv/data01/ozone/om/ratis</value>
    <tag>OZONE, OM, STORAGE, MANAGEMENT, RATIS</tag>
    <description>This directory is used for storing OM's Ratis metadata like
      logs. If this is not set then default metadata dirs is used. A warning
      will be logged if this not set. Ideally, this should be mapped to a
      fast disk like an SSD.
      If undefined, OM ratis storage dir will fallback to ozone.metadata.dirs.
      This fallback approach is not recommended for production environments.
    </description>
  </property>
    <property>
    <name>ozone.om.ratis.snapshot.dir</name>
    <value>/srv/data01/ozone/om/ratis</value>
    <tag>OZONE, OM, STORAGE, MANAGEMENT, RATIS</tag>
    <description>This directory is used for storing OM's snapshot
      related files like the ratisSnapshotIndex and DB checkpoint from leader
      OM.
      If undefined, OM snapshot dir will fallback to ozone.metadata.dirs.
      This fallback approach is not recommended for production environments.
    </description>
  </property>


  
    <property>
    	<name>ozone.scm.http-address</name>
    	<value>0.0.0.0:19876</value>
    </property>
    <property>
    	<name>ozone.scm.https-address</name>
    	<value>0.0.0.0:19877</value>
    </property>
    <property>
        <name>ozone.scm.client.address</name>
        <value>0.0.0.0:19860</value>
        <tag>OZONE, SCM, REQUIRED</tag>
        <description>
      The address of the Ozone SCM client service. This is a required setting.

      It is a string in the host:port format. The port number is optional
      and defaults to 9860.
    </description>
    </property>
    <property>
        <name>ozone.scm.ratis.port</name>
        <value>19894</value>
    </property>
    <property>
    	<name>ozone.scm.datanode.port</name>
    	<value>19861</value>
    </property>
    <property>
    	<name>ozone.scm.block.client.port</name>
    	<value>19863</value>
    </property>
    <property>
        <name>ozone.scm.names</name>
        <value>29.3.219.51</value>
        <tag>OZONE, REQUIRED</tag>
        <description>
      The value of this property is a set of DNS | DNS:PORT | IP
      Address | IP:PORT. Written as a comma separated string. e.g. scm1,
      scm2:8020, 7.7.7.7:7777.
      This property allows datanodes to discover where SCM is, so that
      datanodes can send heartbeat to SCM.
    </description>
    </property>
  <property>
    <name>ozone.scm.db.dirs</name>
    <value>/srv/data01/ozone/scm</value>
    <tag>OZONE, SCM, STORAGE, PERFORMANCE</tag>
    <description>
      Directory where the StorageContainerManager stores its metadata.
      This should be specified as a single directory. If the directory
      does not exist then the SCM will attempt to create it.

      If undefined, then the SCM will log a warning and fallback to
      ozone.metadata.dirs. This fallback approach is not recommended for
      production environments.
    </description>
  </property>
  <property>
    <name>ozone.scm.ha.ratis.storage.dir</name>
    <value>/srv/data01/ozone/scm/ratis</value>
    <tag>OZONE, SCM, HA, RATIS</tag>
    <description>Storage directory used by SCM to write Ratis logs.</description>
  </property>
  <property>
    <name>ozone.scm.ha.ratis.snapshot.dir</name>
    <value>/srv/data01/ozone/scm/ratis</value>
    <tag>SCM, OZONE, HA, RATIS</tag>
    <description>The ratis snapshot dir location.</description>
  </property>


  <property>
  	<name>hdds.rest.http-address</name>
  	<value>0.0.0.0:19880</value>
  </property>
  <property>
  	<name>hdds.datanode.http-address</name>
  	<value>0.0.0.0:19882</value>
  </property>
  <property>
  	<name>hdds.datanode.https-address</name>
  	<value>0.0.0.0:19883</value>
  </property>
  <property>
  	<name>dfs.container.ratis.server.port</name>
  	<value>19856</value>
  </property>
  <property>
  	<name>dfs.container.ratis.admin.port</name>
  	<value>19857</value>
  </property>
  <property>
  	<name>dfs.container.ratis.ipc</name>
  	<value>19858</value>
  </property>
  <property>
  	<name>dfs.container.ipc</name>
  	<value>19859</value>
  </property>
  <property>
    <name>hdds.metadata.dir</name>
    <value>/srv/data01/ozone/datanode</value>
  </property>
  <property>
    <name>hdds.datanode.dir</name>
    <value>/srv/data01/ozone/datanode</value>
    <tag>OZONE, CONTAINER, STORAGE, MANAGEMENT</tag>
    <description>Determines where on the local filesystem HDDS data will be
      stored. Defaults to dfs.datanode.data.dir if not specified.
      The directories should be tagged with corresponding storage types
      ([SSD]/[DISK]/[ARCHIVE]/[RAM_DISK]) for storage policies. The default
      storage type will be DISK if the directory does not have a storage type
      tagged explicitly.
    </description>
  </property>
  <property>
    <name>dfs.container.ratis.datanode.storage.dir</name>
    <value>/srv/data01/ozone/datanode/ratis</value>
    <tag>OZONE, CONTAINER, STORAGE, MANAGEMENT, RATIS</tag>
    <description>This directory is used for storing Ratis metadata like logs. If
      this is
      not set then default metadata dirs is used. A warning will be logged if
      this not set. Ideally, this should be mapped to a fast disk like an SSD.
    </description>
  </property>



	<property>
    	<name>ozone.recon.http-address</name>
    	<value>0.0.0.0:19888</value>
    </property>
    <property>
    	<name>ozone.recon.https-address</name>
    	<value>0.0.0.0:19889</value>
    </property>
    <property>
    	<name>ozone.recon.address</name>
    	<value>29.3.219.51:19891</value>
    </property>
    <property>
    	<name>ozone.recon.datanode.address</name>
    	<value>29.3.219.51:19891</value>
    </property>
  <property>
    <name>ozone.recon.db.dir</name>
    <value>/srv/data01/ozone/recon</value>
    <tag>OZONE, RECON, STORAGE, PERFORMANCE</tag>
    <description>
      Directory where the Recon Server stores its metadata. This should
      be specified as a single directory. If the directory does not
      exist then the Recon will attempt to create it.

      If undefined, then the Recon will log a warning and fallback to
      ozone.metadata.dirs. This fallback approach is not recommended for
      production environments.
    </description>
  </property>
  <property>
    <name>ozone.recon.om.db.dir</name>
    <value>/srv/data01/ozone/recon/om</value>
    <tag>OZONE, RECON, STORAGE</tag>
    <description>
      Directory where the Recon Server stores its OM snapshot DB. This should
      be specified as a single directory. If the directory does not
      exist then the Recon will attempt to create it.

      If undefined, then the Recon will log a warning and fallback to
      ozone.metadata.dirs. This fallback approach is not recommended for
      production environments.
    </description>
  </property>
  <property>
    <name>ozone.recon.scm.db.dirs</name>
    <value>/srv/data01/ozone/recon/scm</value>
  </property>


  <property>
	<name>ozone.s3g.http-address</name>
	<value>0.0.0.0:19878</value>
  </property>

</configuration>

部署脚步

pscp -h hosts ./ozone-1.3.0.tar.gz ~/

pssh -h hosts 'sudo tar -zxvf ~/ozone-1.3.0.tar.gz -C /opt/bigdata/'
pssh -h hosts 'sudo mv /opt/bigdata/ozone-1.3.0  /opt/bigdata/bd-ozone-1.3.0'
pssh -h hosts 'sudo chown -R root:root /opt/bigdata/bd-ozone-1.3.0'
pssh -h hosts 'sudo ln -s /opt/bigdata/bd-ozone-1.3.0 /opt/bigdata/ozone'
pssh -h hosts 'sudo ln -s /opt/bigdata/ozone/bin/ozone /usr/bin/ozone' 
pssh -h hosts 'echo "export OZONE_HOME=/opt/bigdata/ozone" >> ~/.bashrc' 
pssh -h hosts 'source ~/.bashrc'
pssh -h hosts ’ozone version’


#—————
for ((i=1; i<=12; i++)) do
 disk=`printf "/srv/data%02d/ozone" $i`
 pssh -h ./hosts -l hadoop -P "sudo mkdir -p $disk; sudo chown -R hadoop:hadoop $disk"
done

pssh -h hosts 'sudo mkdir -p /var/log/ozone'
pssh -h hosts 'sudo chown -R hadoop:hadoop /var/log/ozone'
pssh -h hosts ‘sudo mkdir -p /var/run/ozone’
pssh -h hosts 'sudo chown -R hadoop:hadoop /var/run/ozone'


pscp -h hosts ./ozone-site.xml ~/
pscp -h hosts ./ozone-env.sh ~/
pssh -h hosts 'sudo mv ~/ozone-site.xml /opt/bigdata/ozone/etc/hadoop'
pssh -h hosts 'sudo mv ~/ozone-env.sh /opt/bigdata/ozone/etc/hadoop'

常用命令

ozone scm --init
ozone --daemon start scm

ozone om --init

ozone --daemon start om


ozone --daemon start datanode
ozone admin datanode list


ozone --daemon start s3g
ozone --daemon start recon


ozone sh bucket create /s3v/test
ozone sh key put /s3v/test/Key README.md

ozone sh key get /s3v/test/Key  README-FROM-Ozone.md

ozone freon randomkeys --numOfVolumes=1 --numOfBuckets=1 --numOfKeys=10000 --keySize=10240
ozone sh volume list

ozone sh bucket list /s3v

ozone sh key list /s3v/test/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值