# Active\_primary\_shards spontaneously doubled?

**URL:** https://discuss.elastic.co/t/active-primary-shards-spontaneously-doubled/793
**Category:** Elasticsearch
**Created:** [May 17, 2015, 1:46am UTC](https://discuss.elastic.co/t/active-primary-shards-spontaneously-doubled/793 "2015-05-17T01:46:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rott](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@rott](https://discuss.elastic.co/u/rott)
#### Post date: [May 17, 2015, 1:46am UTC](https://discuss.elastic.co/t/active-primary-shards-spontaneously-doubled/793/1 "2015-05-17T01:46:12Z")

</div>

Hi, I have a four-node cluster configured with 8 primary shards and 1 replica. I'm using the Java client, but the equivalent yml file would look like this on each node:

```
cluster.name: clusterA
node.name: ca1
node.master: true
node.data: true
index.number_of_shards: 8
index.number_of_replicas: 1
path.data: /analyticsData
bootstrap.mlockall: true
discovery.zen.minimum_master_nodes: 3
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["node1[9300-9399]", "node2[9300-9399]", "node3[9300-9399]", "node4[9300-9399]"]

```

Of course node.name would differ per node.

Once three nodes are up (due to minimum\_master\_nodes setting), all is well. Fourth node comes up, and all is well; \_cluster/health says:

```
{
    cluster_name: "clusterA",
    status: "green",
    timed_out: false,
    number_of_nodes: 4,
    number_of_data_nodes: 4,
    active_primary_shards: 8,
    active_shards: 16,
    relocating_shards: 0,
    initializing_shards: 0,
    unassigned_shards: 0
}

```

At some point node "ca4" is killed (kill -9, or some other possibly unfriendly way), and restarted. The results:

```
{
    cluster_name: "clusterA",
    status: "green",
    timed_out: false,
    number_of_nodes: 4,
    number_of_data_nodes: 4,
    active_primary_shards: 16,
    active_shards: 32,
    relocating_shards: 0,
    initializing_shards: 0,
    unassigned_shards: 0
}

```

????????

How is this possible? How do we spontaneously have double primary shards? Where do I even start looking for clues to this situation? This is ES 1.1.1.

Thanks.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [May 17, 2015, 11:50pm UTC](https://discuss.elastic.co/t/active-primary-shards-spontaneously-doubled/793/2 "2015-05-17T23:50:08Z")

</div>

Does the number of primaries drop or does it stay the same?

I'd suggest an upgrade to 1.5.2, 1.1.1 is getting a little old.

---

<div class="post-metadata">

### Author: ![rott](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@rott](https://discuss.elastic.co/u/rott)
#### Post date: [May 19, 2015, 1:57am UTC](https://discuss.elastic.co/t/active-primary-shards-spontaneously-doubled/793/3 "2015-05-19T01:57:35Z")

</div>

Well my question turned out to be dumb. I was assisting another team, and lacked complete information. Turns out they were starting one of the nodes against an existing path.data, which of course had two indices. Hence 8 shards \* 2 indices = 16 primary shards. Sigh. Thanks.

---

<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, 12:13am UTC](https://discuss.elastic.co/t/active-primary-shards-spontaneously-doubled/793/4 "2017-07-06T00:13:24Z")

</div>


