# Number of replicas

**URL:** <https://discuss.elastic.co/t/number-of-replicas/9455>\
**Category:** Elasticsearch\
**Created:** [October 24, 2012, 5:55am UTC](https://discuss.elastic.co/t/number-of-replicas/9455 "2012-10-24T05:55:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcin\_Dojwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcin_dojwa/32/2307_2.png) [@Marcin\_Dojwa](https://discuss.elastic.co/u/Marcin_Dojwa)\
**Post date:** [October 24, 2012, 5:55am UTC](https://discuss.elastic.co/t/number-of-replicas/9455/1 "2012-10-24T05:55:07Z")

</div>

Hi,

I have the following situation:

- 3 nodes
- 1 index with 60 shards and 2 replicas
- NO data yet

After starting all nodes I have all 180 shards as 'unassigned' in  
/\_cluster/health. After changing the index setting to have only 1 replica  
all the shards got activated.  
My question is: what is the reason of this and is there any connection  
between number of replicas, number of shards and minimum number of nodes ?

Thank you for help.  
Best regards.  
Marcin Dojwa

--

---

<div class="post-metadata">

**Author:** ![Marcin\_Dojwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcin_dojwa/32/2307_2.png) [@Marcin\_Dojwa](https://discuss.elastic.co/u/Marcin_Dojwa)\
**Post date:** [October 24, 2012, 5:57am UTC](https://discuss.elastic.co/t/number-of-replicas/9455/2 "2012-10-24T05:57:38Z")

</div>

I have default settings for all nodes, all nodes are the same.

2012/10/24 Marcin Dojwa [m.dojwa@livechatinc.com](mailto:m.dojwa@livechatinc.com)

> Hi,
> 
> I have the following situation:
> 
> - 3 nodes
> - 1 index with 60 shards and 2 replicas
> - NO data yet
> 
> After starting all nodes I have all 180 shards as 'unassigned' in  
> /\_cluster/health. After changing the index setting to have only 1 replica  
> all the shards got activated.  
> My question is: what is the reason of this and is there any connection  
> between number of replicas, number of shards and minimum number of nodes ?
> 
> Thank you for help.  
> Best regards.  
> Marcin Dojwa

--

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [October 24, 2012, 11:24am UTC](https://discuss.elastic.co/t/number-of-replicas/9455/3 "2012-10-24T11:24:28Z")

</div>

Interesting. What happens if you change number of replicas back to 2? Can  
you recreate the problem and post complete output of the /\_cluster/health  
command?

On Wednesday, October 24, 2012 1:57:41 AM UTC-4, Marcin Dojwa wrote:

> I have default settings for all nodes, all nodes are the same.
> 
> 2012/10/24 Marcin Dojwa \<[m.d...@livechatinc.com](mailto:m.d...@livechatinc.com) \<javascript:\>\>
> 
> > Hi,
> > 
> > I have the following situation:
> > 
> > - 3 nodes
> > - 1 index with 60 shards and 2 replicas
> > - NO data yet
> > 
> > After starting all nodes I have all 180 shards as 'unassigned' in  
> > /\_cluster/health. After changing the index setting to have only 1 replica  
> > all the shards got activated.  
> > My question is: what is the reason of this and is there any connection  
> > between number of replicas, number of shards and minimum number of nodes ?
> > 
> > Thank you for help.  
> > Best regards.  
> > Marcin Dojwa

--

---

<div class="post-metadata">

**Author:** ![Marcin\_Dojwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcin_dojwa/32/2307_2.png) [@Marcin\_Dojwa](https://discuss.elastic.co/u/Marcin_Dojwa)\
**Post date:** [October 25, 2012, 7:56am UTC](https://discuss.elastic.co/t/number-of-replicas/9455/4 "2012-10-25T07:56:50Z")

</div>

Hi,

After setting it back to 2 replicas all shards gets assigned. It works fine  
now even if I stop all nodes and start them again. The problem was when I  
started new cluster with 3 nodes, 1 index (60 shards and 2 replicas) and NO  
data. All the shards got assigned after changing replicas to 1. Now it  
looks like it works, but I suggest checking this by the author if this is  
not a bigger problem.

This is how it looked like at the beginning.

1. There are 3 nodes with 1 index with 60 shards and 2 replicas (all nodes  
are stopped)

2. After starting 1st node /\_cluster/health:  
{

}

1. After starting 2nd node:  
{

}

1. After starting 3rd node:  
{

}

1. After changing replicas to 1:  
{

}

Best regards.

2012/10/24 Igor Motov [imotov@gmail.com](mailto:imotov@gmail.com)

> Interesting. What happens if you change number of replicas back to 2? Can  
> you recreate the problem and post complete output of the /\_cluster/health  
> command?
> 
> On Wednesday, October 24, 2012 1:57:41 AM UTC-4, Marcin Dojwa wrote:
> 
> > I have default settings for all nodes, all nodes are the same.
> > 
> > 2012/10/24 Marcin Dojwa [m.d...@livechatinc.com](mailto:m.d...@livechatinc.com)
> > 
> > Hi,
> > 
> > > I have the following situation:
> > > 
> > > - 3 nodes
> > > - 1 index with 60 shards and 2 replicas
> > > - NO data yet
> > > 
> > > After starting all nodes I have all 180 shards as 'unassigned' in  
> > > /\_cluster/health. After changing the index setting to have only 1 replica  
> > > all the shards got activated.  
> > > My question is: what is the reason of this and is there any connection  
> > > between number of replicas, number of shards and minimum number of nodes ?
> > > 
> > > Thank you for help.  
> > > Best regards.  
> > > Marcin Dojwa
> > 
> > --

--

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [October 25, 2012, 4:51pm UTC](https://discuss.elastic.co/t/number-of-replicas/9455/5 "2012-10-25T16:51:37Z")

</div>

Did you change discovery.zen.minimum\_master\_nodes? Probably would not  
account for this behavior, just wondering what your value is.

On Thu, Oct 25, 2012 at 12:56 AM, Marcin Dojwa [m.dojwa@livechatinc.com](mailto:m.dojwa@livechatinc.com)wrote:

> Hi,
> 
> After setting it back to 2 replicas all shards gets assigned. It works  
> fine now even if I stop all nodes and start them again. The problem was  
> when I started new cluster with 3 nodes, 1 index (60 shards and 2 replicas)  
> and NO data. All the shards got assigned after changing replicas to 1. Now  
> it looks like it works, but I suggest checking this by the author if this  
> is not a bigger problem.
> 
> This is how it looked like at the beginning.
> 
> 1. There are 3 nodes with 1 index with 60 shards and 2 replicas (all nodes  
> are stopped)
> 
> 2. After starting 1st node /\_cluster/health:  
> {
> 
> }
> 
> 1. After starting 2nd node:  
> {
> 
> }
> 
> 1. After starting 3rd node:  
> {
> 
> }
> 
> 1. After changing replicas to 1:  
> {
> 
> }
> 
> Best regards.
> 
> 2012/10/24 Igor Motov [imotov@gmail.com](mailto:imotov@gmail.com)
> 
> > Interesting. What happens if you change number of replicas back to 2? Can  
> > you recreate the problem and post complete output of the /\_cluster/health  
> > command?
> > 
> > On Wednesday, October 24, 2012 1:57:41 AM UTC-4, Marcin Dojwa wrote:
> > 
> > > I have default settings for all nodes, all nodes are the same.
> > > 
> > > 2012/10/24 Marcin Dojwa [m.d...@livechatinc.com](mailto:m.d...@livechatinc.com)
> > > 
> > > Hi,
> > > 
> > > > I have the following situation:
> > > > 
> > > > - 3 nodes
> > > > - 1 index with 60 shards and 2 replicas
> > > > - NO data yet
> > > > 
> > > > After starting all nodes I have all 180 shards as 'unassigned' in  
> > > > /\_cluster/health. After changing the index setting to have only 1 replica  
> > > > all the shards got activated.  
> > > > My question is: what is the reason of this and is there any connection  
> > > > between number of replicas, number of shards and minimum number of nodes ?
> > > > 
> > > > Thank you for help.  
> > > > Best regards.  
> > > > Marcin Dojwa
> > > 
> > > --
> 
> --

--

---

<div class="post-metadata">

**Author:** ![Marcin\_Dojwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcin_dojwa/32/2307_2.png) [@Marcin\_Dojwa](https://discuss.elastic.co/u/Marcin_Dojwa)\
**Post date:** [October 25, 2012, 6:21pm UTC](https://discuss.elastic.co/t/number-of-replicas/9455/6 "2012-10-25T18:21:14Z")

</div>

Hi, I didn't change this value, it is set to default.

W dniu czwartek, 25 października 2012 użytkownik Ivan Brusic napisał:

> Did you change discovery.zen.minimum\_master\_nodes? Probably would not  
> account for this behavior, just wondering what your value is.
> 
> On Thu, Oct 25, 2012 at 12:56 AM, Marcin Dojwa \<[m.dojwa@livechatinc.com](mailto:m.dojwa@livechatinc.com)\<javascript:\_e({}, 'cvml', 'm.dojwa@livechatinc.com');\>
> 
> > wrote:
> 
> > Hi,
> > 
> > After setting it back to 2 replicas all shards gets assigned. It works  
> > fine now even if I stop all nodes and start them again. The problem was  
> > when I started new cluster with 3 nodes, 1 index (60 shards and 2 replicas)  
> > and NO data. All the shards got assigned after changing replicas to 1. Now  
> > it looks like it works, but I suggest checking this by the author if this  
> > is not a bigger problem.
> > 
> > This is how it looked like at the beginning.
> > 
> > 1. There are 3 nodes with 1 index with 60 shards and 2 replicas (all  
> > nodes are stopped)
> > 
> > 2. After starting 1st node /\_cluster/health:  
> > {
> > 
> > }
> > 
> > 1. After starting 2nd node:  
> > {
> > 
> > --
> 
> --

--

---

<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, 3:07am UTC](https://discuss.elastic.co/t/number-of-replicas/9455/7 "2017-07-06T03:07:11Z")

</div>


