교체작업전 사용중인 모든 인덱스는 replica를 가지고 있어야한다.
그래야 한노드가 떨어져도 클러스터는 yellow 상태를 유지해 검색에 문제가 발생하지 않는다.
그럼 A노드를 제거하고 B노드를 추가해보겠다.
#샤드 움직이지 않게
PUT _cluster/settings
{
"persistent": {
"cluster.routing.allocation.enable": "none"
}
}
./start.sh
./stop.sh
GET _cat/nodes?s=name
샤드가 다시 할당될 수 있도록한다.
primiary는 있기때문에 알아서 replica를 생성할 것이다.
PUT _cluster/settings
{
"persistent": {
"cluster.routing.allocation.enable": null
}
}
PUT /_cluster/settings
{
"transient": {
"indices.recovery.max_bytes_per_sec": "60mb", //default:40mb
"cluster.routing.allocation.node_concurrent_recoveries" : 2 , // default:2
"cluster.routing.allocation.node_concurrent_incoming_recoveries" : 2 //default:2
}
}