# Adding replica settings not working

**URL:** <https://discuss.elastic.co/t/adding-replica-settings-not-working/12218>\
**Category:** Elasticsearch\
**Created:** [June 1, 2013, 4:19pm UTC](https://discuss.elastic.co/t/adding-replica-settings-not-working/12218 "2013-06-01T16:19:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ban\_Mido](https://avatars.discourse-cdn.com/v4/letter/b/dec6dc/32.png) [@Ban\_Mido](https://discuss.elastic.co/u/Ban_Mido)\
**Post date:** [June 1, 2013, 4:19pm UTC](https://discuss.elastic.co/t/adding-replica-settings-not-working/12218/1 "2013-06-01T16:19:18Z")

</div>

Hi ,

ES version - 0.90.1  
Cluster - 5 nodes  
Shards - 4

I am trying to add replica to an index.  
But its not working.  
As a matter of fact , none of the shard moving , adding or allocating to a  
node operations are not working.

I did a shard allocation execution using this -  
[http://www.elasticsearch.org/guide/reference/index-modules/allocation/](http://www.elasticsearch.org/guide/reference/index-modules/allocation/)

After this none of the below operation has any effect.

curl -XPUT 'localhost:9200/index/\_settings' -d '  
{  
"index" : {  
"routing.allocation.total\_shards\_per\_node" : 2  
}  
}'

curl -XPUT 'localhost:9200/index/\_settings' -d '  
{  
"index" : {  
"number\_of\_replicas" : 1  
}  
}  
'  
(Here replicas are shown as unassigned but it never gets assigned)

curl -XPUT localhost:9200/index/\_settings -d '{  
"index.routing.allocation.include.\_ip" : "192.168.1.23"  
}'  
( I have tried all include/exclude/require actions here)

Thanks  
Vineeth

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [June 1, 2013, 5:03pm UTC](https://discuss.elastic.co/t/adding-replica-settings-not-working/12218/2 "2013-06-01T17:03:46Z")

</div>

I think you ended up with a confusing state of allocation. remove all allocation level settings (like include or exclude), unless you really need it (don't see why based on the description, seem to be driven by confusion on how to add a replica).

regarding replicas, you simple using th update setting API and change the number of replicas to the number of replicas you want the index to have.

On Sat, Jun 1, 2013 at 6:19 PM, Ban Mido [banmidobeyondtime@gmail.com](mailto:banmidobeyondtime@gmail.com)  
wrote:

> ## Hi , ES version - 0.90.1 Cluster - 5 nodes Shards - 4 I am trying to add replica to an index. But its not working. As a matter of fact , none of the shard moving , adding or allocating to a node operations are not working. I did a shard allocation execution using this - [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/allocation/) After this none of the below operation has any effect. curl -XPUT 'localhost:9200/index/\_settings' -d ' { "index" : { "routing.allocation.total\_shards\_per\_node" : 2 } }' curl -XPUT 'localhost:9200/index/\_settings' -d ' { "index" : { "number\_of\_replicas" : 1 } } ' (Here replicas are shown as unassigned but it never gets assigned) curl -XPUT localhost:9200/index/\_settings -d '{ "index.routing.allocation.include.\_ip" : "192.168.1.23" }' ( I have tried all include/exclude/require actions here) Thanks Vineeth
> 
> 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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:33am UTC](https://discuss.elastic.co/t/adding-replica-settings-not-working/12218/3 "2017-07-06T02:33:28Z")

</div>


