# Elasticsearch change primary shards number

**URL:** <https://discuss.elastic.co/t/elasticsearch-change-primary-shards-number/251716>\
**Category:** Elasticsearch\
**Created:** [October 12, 2020, 5:44am UTC](https://discuss.elastic.co/t/elasticsearch-change-primary-shards-number/251716 "2020-10-12T05:44:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vodka\_pivo](https://avatars.discourse-cdn.com/v4/letter/v/73ab20/32.png) [@vodka\_pivo](https://discuss.elastic.co/u/vodka_pivo)\
**Post date:** [October 12, 2020, 5:44am UTC](https://discuss.elastic.co/t/elasticsearch-change-primary-shards-number/251716/1 "2020-10-12T05:44:16Z")

</div>

Hello! i have 3 node elasticsearch cluster and i have index with  
1 primary and 1 replica shards  
so i want to change the primary shard number from 1 to 2 using this method [Split index API | Elasticsearch Guide [7.9] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.9/indices-split-index.html) but in the doc said that

> The number of primary shards in the target index must be a multiple of the number of primary shards in the source index

but in my case 1 \* 1 = 1  
so how can i do resize from 1 primary shards to 2 primary shards correctly?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 12, 2020, 5:55am UTC](https://discuss.elastic.co/t/elasticsearch-change-primary-shards-number/251716/2 "2020-10-12T05:55:10Z")

</div>

2 is a multiple of 1 so that is fine. Since you are splitting shards they all need to split the same way. You can split a single shard into 2, 3 or 4 etc shards, but can e.g. not go from 2 to 3 or from 2 to 5.

---

<div class="post-metadata">

**Author:** ![vodka\_pivo](https://avatars.discourse-cdn.com/v4/letter/v/73ab20/32.png) [@vodka\_pivo](https://discuss.elastic.co/u/vodka_pivo)\
**Post date:** [October 12, 2020, 7:47am UTC](https://discuss.elastic.co/t/elasticsearch-change-primary-shards-number/251716/3 "2020-10-12T07:47:58Z")

</div>

Thanks! and it is save to delete original index after the split completion?

---

<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:** [November 9, 2020, 7:48am UTC](https://discuss.elastic.co/t/elasticsearch-change-primary-shards-number/251716/4 "2020-11-09T07:48:22Z")

</div>

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