<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # 全集群重啟升級 A full cluster restart upgrade requires that you shut all nodes in the cluster down, upgrade them, and restart the cluster. A full cluster restart was required when upgrading to major versions prior to 6.x. Elasticsearch 6.x supports?[rolling upgrades](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/rolling-upgrades.html "Rolling upgrades")?from?Elasticsearch 5.6.查閱[此表](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/setup-upgrade.html#upgrade-paths)來驗證哪些是必須要全集群重啟升級的。 執行全集群重啟升級的過程如下: 1. **禁用分片分配** 當你關閉一個節點時,分配進程在等待一分鐘之后開始將此節點上的分片復制到其它節點中,會造成很多浪費的I/O。這可以在節點關閉前通過禁用分片分配來避免: ``` PUT _cluster/settings { "transient": { "cluster.routing.allocation.enable": "none" } } ``` 2. **執行同步沖刷** 你可以愉快地繼續索引在升級。但是,如果你臨時地關閉一些非不要的索引庫以及執行一次[同步沖刷](../../Indices_APIs/Flush/Synced_Flush.md)請求可以幫助你快速恢復分片: ``` POST _flush/synced ``` 同步沖刷請求是一個”盡力而為“的操作。它可能會因為一些正在進行的索引操作而失敗,但是如果有必要你可以反復的執行它,這是安全的。 3. **停止所有節點** * If you are running Elasticsearch with?`systemd`: ``` sudo systemctl stop elasticsearch.service ``` * If you are running Elasticsearch with SysV?`init`: ``` sudo -i service elasticsearch stop ``` * If you are running Elasticsearch as a daemon: ``` kill $(cat pid) ``` 4. **升級所有的節點** To upgrade using a?[Debian](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/deb.html "Install Elasticsearch with Debian Package")?or?[RPM](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/rpm.html "Install Elasticsearch with RPM")?package: * Use?`rpm`?or?`dpkg`?to install the new package. All files are installed in the appropriate location for the operating system and Elasticsearch config files are not overwritten. To upgrade using a zip or compressed tarball: 1. Extract the zip or tarball to a?*new*?directory. This is critical if you are not using external?`config`?and?`data`?directories. 2. Set the?`ES_PATH_CONF`?environment variable to specify the location of your external?`config`?directory and?`jvm.options`?file. If you are not using an external?`config`?directory, copy your old configuration over to the new installation. 3. Set?`path.data`?in?`config/elasticsearch.yml`?to point to your external data directory. If you are not using an external?`data`?directory, copy your old data directory over to the new installation. 4. Set?`path.logs`?in?`config/elasticsearch.yml`?to point to the location where you want to store your logs. If you do not specify this setting, logs are stored in the directory you extracted the archive to. > 提示 > > When you extract the zip or tarball packages, the`elasticsearch-n.n.n`?directory contains the Elasticsearh`config`,?`data`,?`logs`?and?`plugins`?directories. > We recommend moving these directories out of the Elasticsearch directory so that there is no chance of deleting them when you upgrade Elasticsearch. To specify the new locations, use the?`ES_PATH_CONF`?environment variable and the`path.data`?and?`path.logs`?settings. For more information, see[Important Elasticsearch configuration](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/important-settings.html "Important Elasticsearch configuration"). > The?[Debian](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/deb.html "Install Elasticsearch with Debian Package")?and?[RPM](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/rpm.html "Install Elasticsearch with RPM")?packages place these directories in the appropriate place for each operating system. In production, we recommend installing using the deb or rpm package. 5. **升級所有的插件** 使用`elasticsearch-plugin`腳本安裝你所有需要插件的正確版本。升級Elasticsearch節點時必須升級插件。 6. **啟動集群** 如果你有專門的master節點(在節點配置中設置`node.master`為`true`且`node.data`為`false`),先啟動他們是一個好的主意。在處理數據節點之前等待它們形成一個集群并選舉出一個主節點。你可以通過查看日志來檢查進度。 一旦對方發現了[最小的主節點數](../../Modules/Discovery/Zen_Discovery.md#master-election),它們將在集群中選舉主節點。從這時開始,就可以使用[\_cat/health](../../cat_APIs/cat_health.md)與[\_cat/nodes](../../cat_APIs/cat_nodes.md)API來監控節點加入集群: ``` GET _cat/health GET _cat/nodes ``` 使用這些API來檢查所有節點已經成功地加入到集群。 6. **Wait for all nodes to join the cluster and report a status of yellow.** 一旦節點加入了集群,他將開始恢復本地存儲的分片數據。剛開始[\_cat/health](../../cat_APIs/cat_health.md)會返回`status`為`red`,這表示還有主分片未分配完成。 一旦本地存儲的分片恢復完成,`status`將會變成`yellow`,這表示所有主分片已恢復,但是副本分片沒有分配。這是我們預料到的,因為分片分配被我們之前禁用了。 7. **重新打開分片分配** 延遲副本分片的分配,直到所有節點都加入了集群且完成了本地分片數據的分配。從這時開始,所有節點都已在集群中,重新打開分片分配是安全的: ``` PUT _cluster/settings { "transient": { "cluster.routing.allocation.enable": "all" } } ``` 集群將開始分片副本到所有的數據節點。這是你可以安全的開始新增索引與執行搜索操作,但是如果你在分片恢復之前延遲這些操作將會使得恢復過程變得更快。一旦`_cat/health`輸出的`status`列變成`green`,所有主分片與副本分片都成功分配完成。 你可以使用[\_cat/health](../../cat_APIs/cat_health.md)與[\_cat/revocery](../../cat_APIs/cat_recovery.md)API來監控進度: ``` GET _cat/health GET _cat/recovery ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看