Strange requirement, but you can tag nodes with a shard allocation filter

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-allocation.html#index-modules-allocation

and then you can create an index with replica level 0 that will be created
only on the tagged nodes. After that you can remove the allocation filter
and increase replica level. Do not forget to check if index recovery and
restarting ES will work as expected.

Jörg



On Tue, Mar 3, 2015 at 1:16 AM, Davinder Deol <[email protected]>
wrote:

> Thanks Jörg for the reply.
>
> I agree Elasticsearch is good in managing primary/replica shards
> allocation.
>
> But we have to need where we want some nodes to never have primary shards
> so I was curious to know is there any node or index level setting which we
> can use for this?
>
> Thanks
>
> On Monday, March 2, 2015 at 1:06:03 PM UTC-8, Jörg Prante wrote:
>>
>> All shards are created equally. Elasticsearch promotes replica
>> automatically to primaries if necessary. So there is no reason for any
>> headache around primary/replica locations, ES manages node disaster
>> automatically.
>>
>> Jörg
>>
>> On Mon, Mar 2, 2015 at 8:46 PM, Davinder Deol <[email protected]>
>> wrote:
>>
>>> We have a requirement where we want to create a node and ask it to join
>>> the cluster. But we don't want this node to have primary shard.
>>>
>>> it is like a Disaster scenario where I have a node running on disaster
>>> server but that node will never have primary shards of my index. It can
>>> only have replica of my index.
>>>
>>> So we looking for a way to configure node or index to control where to
>>> place primary and replica shards?
>>>
>>> Thanks
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "elasticsearch" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/elasticsearch/4c08df2e-3050-49ce-a741-963d2b2a4050%
>>> 40googlegroups.com
>>> <https://groups.google.com/d/msgid/elasticsearch/4c08df2e-3050-49ce-a741-963d2b2a4050%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "elasticsearch" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/bb7d39e6-4bf0-45ff-bf48-ffd59668e8f5%40googlegroups.com
> <https://groups.google.com/d/msgid/elasticsearch/bb7d39e6-4bf0-45ff-bf48-ffd59668e8f5%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAKdsXoER_deDJqO%2Byb9c%2BjSOsQAn_SRBdb1RL6hsb%3DberCUyyg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to