0

I have a master/data Elasticsearch node. It has now reached 90% capacity and I need to provision additional space to continue adding more data.

I have created a new server with 700gb disk space, installed ES & Kibana, and now wish for this second server to provide additional space to / work with the master node.

My problem:

As it says on the ES website:

When you add more nodes to a cluster, it automatically allocates replica shards.

My issue is that I do not wish to replicate the data from the master node, but instead just provide additional space using this second server which can then be queried by the master node.

My question:

What is the best way to achieve this? Is adding a node the incorrect thing to do here?

11
  • A master node doesn't hold any data, its only job is to baby-sit the cluster, but there's no data on it. I guess your single node is a master/data node, is that correct? Commented Sep 4, 2019 at 11:20
  • Yes that is correct Commented Sep 4, 2019 at 11:29
  • Do you have replica shards or only primary? If the latter, then your cluster must currently be yellow, otherwise it is green, correct? Commented Sep 4, 2019 at 11:33
  • Only primary - they are yellow Commented Sep 4, 2019 at 11:44
  • So if you have only primary shards and your cluster is yellow, it means you also have unassigned shards, is that right? Commented Sep 4, 2019 at 11:45

1 Answer 1

1

Using index-level shard allocation filtering, you can constrain a given index (or set of indexes) to stay on a given node (or set of nodes).

Simply run this:

PUT orders,orders_1,orders_2,orders_3,orders_4,orders_5/_settings
{
  "index.routing.allocation.require._name": "your-first-node-name"
}

Note that you can also use ._ip or ._host instead of ._name if you prefer.

Then you can add a new node and let it join the cluster and nothing will rebalance, all your current shards will stay on your current node.

And if you need to create a new index on the second node and want to make sure that it will stay on that node you can specify the same settings at index creation time:

PUT new_orders
{
  "settings": {
      "index.routing.allocation.require._name": "your-second-node-name"
  }
}

The index called new_orders will be created on the second node and stay there.

Sign up to request clarification or add additional context in comments.

1 Comment

This seems perfect, thank you for your help. If I want to add new data to a new index, how do I specify that it should allocate on the new node and not the older, close to capacity master node?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.