ES跨版本升级?——难道升级集群发生shard allocation是因为要分配replica节点???
Full cluster restart upgrade
Elasticsearch requires a full cluster restart when upgrading across major versions. Rolling upgrades are not supported across major versions. Consult this table to verify that a full cluster restart is required.
The process to perform an upgrade with a full cluster restart is as follows:
Disable shard allocation——防止分片大量复制数据
When you shut down a node, the allocation process will immediately try to replicate the shards that were on that node to other nodes in the cluster, causing a lot of wasted I/O. This can be avoided by disabling allocation before shutting down a node:
PUT _cluster/settings
{
"persistent": {
"cluster.routing.allocation.enable": "none"
}
}Perform a synced flush
Shard recovery will be much faster if you stop indexing and issue a synced-flush request:
POST _flush/synced
A synced flush request is a “best effort” operation. It will fail if there are any pending indexing operations, but it is safe to reissue the request multiple times if necessary.
Shutdown and upgrade all nodes
Stop all Elasticsearch services on all nodes in the cluster. Each node can be upgraded following the same procedure described in [upgrade-node].
Upgrade any plugins
Elasticsearch plugins must be upgraded when upgrading a node. Use the
elasticsearch-pluginscript to install the correct version of any plugins that you need.Start the cluster——先启动主节点,然后再是数据节点
If you have dedicated master nodes — nodes with
node.masterset totrue(the default) andnode.dataset tofalse— then it is a good idea to start them first. Wait for them to form a cluster and to elect a master before proceeding with the data nodes. You can check progress by looking at the logs.As soon as the minimum number of master-eligible nodes have discovered each other, they will form a cluster and elect a master. From that point on, the
_cat/healthand_cat/nodesAPIs can be used to monitor nodes joining the cluster:GET _cat/health GET _cat/nodes
Use these APIs to check that all nodes have successfully joined the cluster.
Wait for yellow
As soon as each node has joined the cluster, it will start to recover any primary shards that are stored locally. Initially, the
_cat/healthrequest will report astatusofred, meaning that not all primary shards have been allocated.Once each node has recovered its local shards, the
statuswill becomeyellow, meaning all primary shards have been recovered, but not all replica shards are allocated. This is to be expected because allocation is still disabled.Reenable allocation
Delaying the allocation of replicas until all nodes have joined the cluster allows the master to allocate replicas to nodes which already have local shard copies. At this point, with all the nodes in the cluster, it is safe to reenable shard allocation:
PUT _cluster/settings
{
"persistent": {
"cluster.routing.allocation.enable": "all"
}
}The cluster will now start allocating replica shards to all data nodes(难道升级集群发生shard allocation是因为要分配replica节点???). At this point it is safe to resume indexing and searching, but your cluster will recover more quickly if you can delay indexing and searching until all shards have recovered.
You can monitor progress with the
_cat/healthand_cat/recoveryAPIs:GET _cat/health GET _cat/recovery
Once the
statuscolumn in the_cat/healthoutput has reachedgreen, all primary and replica shards have been successfully allocated.
ES跨版本升级?——难道升级集群发生shard allocation是因为要分配replica节点???的更多相关文章
- kubernetes使用kubeadm升级集群
升级前准本 官网: https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-upgrade/查看可升级的组件 [root@h ...
- 项目进阶 之 集群环境搭建(三)多管理节点MySQL集群
上次的博文项目进阶 之 集群环境搭建(二)MySQL集群中,我们搭建了一个基础的MySQL集群,这篇博客咱们继续讲解MySQL集群的相关内容,同时针对上一篇遗留的问题提出一个解决方案. 1.单管理节点 ...
- [转]ZooKeeper 集群环境搭建 (本机3个节点)
ZooKeeper 集群环境搭建 (本机3个节点) 是一个简单的分布式同步数据库(或者是小文件系统) ------------------------------------------------- ...
- HBase的多节点集群详细启动步骤(3或5节点)(分为Zookeeper自带还是外装)
HBase的多节点集群详细启动步骤(3或5节点)分为: 1.HBASE_MANAGES_ZK的默认值是false(zookeeper外装)(推荐) 2.HBASE_MANAGES_ZK的默认值是tru ...
- Hadoop的多节点集群详细启动步骤(3或5节点)
版本1 利用自己写的脚本来启动,见如下博客 hadoop-2.6.0-cdh5.4.5.tar.gz(CDH)的3节点集群搭建 hadoop-2.6.0.tar.gz的集群搭建(3节点) hadoop ...
- ES系列十六、集群配置和维护管理
一.修改配置文件 1.节点配置 1.vim elasticsearch.yml # ======================== Elasticsearch Configuration ===== ...
- 使用 Velero 跨云平台迁移集群资源到 TKE
概述 Velero 是一个非常强大的开源工具,可以安全地备份和还原,执行灾难恢复以及迁移Kubernetes群集资源和持久卷,可以在 TKE 平台上使用 Velero 备份.还原和迁移集群资源,关于如 ...
- KingbaseES V8R3集群维护案例之---在线添加备库管理节点
案例说明: 在KingbaseES V8R3主备流复制的集群中 ,一般有两个节点是集群的管理节点,分为master和standby:如对于一主二备的架构,其中有两个节点是管理节点,三个数据节点:管理节 ...
- Redis随笔(四)Centos7 搭redis3.2.9集群-3主3从的6个节点服务
1.虚拟机环境 使用的Linux环境已经版本: Centos 7 64位系统 主机ip: 192.168.56.180 192.168.56.181 192.168.56.182 每台服务器是1主 ...
随机推荐
- Java学习之道:Java 导出EXCEL
1.Apache POI简单介绍 Apache POI是Apache软件基金会的开放源代码函式库.POI提供API给Java程式对Microsoft Office格式档案读和写的功能. .NET的开 ...
- android 给url添加cookie
前些天因为项目需要写了一个通过网络连接去服务端拿数据的方法,但是需要让程序添加上cookie,因为之前对cookie 没有怎么研究过(包括做web 那会也没有用过或者说很少用),所以 一时用起来不太会 ...
- tcpdump dns流量监控
tcpdump监听数据 为了看清楚DNS通信的过程,下面我们将从主机1:192.168.0.141上运行host命令以查询主机www.jd.com对应的IP地址,并使用tcpdump抓取这一过程中LA ...
- gemm() 与 gesvd() 到矩阵求逆(inverse)(根据 SVD 分解和矩阵乘法求矩阵的逆)
可逆方阵 A 的逆记为,A−1,需满足 AA−1=I. 在 BLAS 的各种实现中,一般都不会直接给出 matrix inverse 的直接实现,其实矩阵(方阵)的逆是可以通过 gemm()和gesv ...
- PHP substr() 函数截取中文字符串乱码
用PHP substr() 函数截取中文字符串乱码,换PHPmb_substr() 函数即可
- 使用CocoaPods更新第三方库出错的解决办法
使用CocoaPods更新第三方库出错的解决办法 执行完pod install或pod update之后,控制台抛出以下警告信息: [!] The xx [Debug] target override ...
- [ios] 如何调用其他app h5界面调用打开app
参考资料:app唤醒app h5唤醒app 有趣的URL Scheme 被唤起端需要做的工作(demoApp): 1.设置URL Scheme 只是一个app的标识 具体是什么自己定 一个Sch ...
- ZBrush中2.5D笔刷
ZBrush®是一个数字雕刻和3维建模软件,它不仅有着强大的3D雕刻功能,对于2.5D笔刷的应用也毫不逊色.本文主要讲解2.5D笔刷的一些使用方法,2.5D笔刷是针对贴图绘画的增效画笔工具和其他一些工 ...
- TensorFlow初学
TensorFlow初学 基本概念 1.激活函数和成本函数 激活函数(activation function):一般是非线性函数,就是每个神经元通过这个函数将原有的来自其他神经的输入做一个非线性变化, ...
- javscript中变量的作用域和提升
示例: var a = 1; function foo() { if (!a) { var a = 10; } alert(a); }; foo(); 上面这段代码在运行时会产生 ...