# .security shard unassigned

**URL:** <https://discuss.elastic.co/t/security-shard-unassigned/80273>\
**Category:** Elasticsearch\
**Created:** [March 28, 2017, 10:14am UTC](https://discuss.elastic.co/t/security-shard-unassigned/80273 "2017-03-28T10:14:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joe](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@Joe](https://discuss.elastic.co/u/Joe)\
**Post date:** [March 28, 2017, 10:14am UTC](https://discuss.elastic.co/t/security-shard-unassigned/80273/1 "2017-03-28T10:14:35Z")

</div>

Just starting to implement security in our proof of concept ES 5.1.1 cluster. .security index is yellow with 2 unassigned shards. 25 data-ingest only nodes, 3 master only, 1 client only, (1 kibana only). The security index has 1 primary and 24 replica but 2 are unassigned. How do I correct this?

---

<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:** [March 30, 2017, 1:12am UTC](https://discuss.elastic.co/t/security-shard-unassigned/80273/2 "2017-03-30T01:12:47Z")

</div>

Why do you have so many replicas?

---

<div class="post-metadata">

**Author:** ![Joe](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@Joe](https://discuss.elastic.co/u/Joe)\
**Post date:** [March 30, 2017, 10:22am UTC](https://discuss.elastic.co/t/security-shard-unassigned/80273/3 "2017-03-30T10:22:12Z")

</div>

I dont know why i have so many replicas. I only noticed when we started setting up users. What would be 'normal' replicas for security? How do i get to that? Cluster is working as expected, including security. Just trying to see it green again.

---

<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:** [March 30, 2017, 9:53pm UTC](https://discuss.elastic.co/t/security-shard-unassigned/80273/4 "2017-03-30T21:53:21Z")

</div>

You probably only need one replica, that's default, but it depends on your failure/recovery requirements.

You may also have scaling replicas enabled?

---

<div class="post-metadata">

**Author:** ![Joe](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@Joe](https://discuss.elastic.co/u/Joe)\
**Post date:** [March 31, 2017, 1:12pm UTC](https://discuss.elastic.co/t/security-shard-unassigned/80273/5 "2017-03-31T13:12:54Z")

</div>

As you suggested GET .security showed "auto\_expand\_replicas" : "0-all" (FYI, the default for .security used by the Security module. Are you sure that 0-all isn't required by the Security module??

Assuming the best (yikes), The following changed that to false, reduced the replicas to 3, and the cluster is green.

PUT .security/settings  
{ "index" : { "number\_of\_replicas" : 3, "auto\_expand\_replicas" : "false" } }

---

<div class="post-metadata">

**Author:** ![Joe](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@Joe](https://discuss.elastic.co/u/Joe)\
**Post date:** [March 31, 2017, 1:21pm UTC](https://discuss.elastic.co/t/security-shard-unassigned/80273/6 "2017-03-31T13:21:33Z")

</div>

Important, I never set auto\_expand\_replicas to 0-all, I think that was the default for .security module !!

---

<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:** [April 28, 2017, 1:22pm UTC](https://discuss.elastic.co/t/security-shard-unassigned/80273/7 "2017-04-28T13:22:12Z")

</div>

Closed on April 28, 2017, 1:22pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
