# Creating shards dynamically and rebalancing primary shards

**URL:** <https://discuss.elastic.co/t/creating-shards-dynamically-and-rebalancing-primary-shards/5968>\
**Category:** Elasticsearch\
**Created:** [November 25, 2011, 8:07am UTC](https://discuss.elastic.co/t/creating-shards-dynamically-and-rebalancing-primary-shards/5968 "2011-11-25T08:07:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![avinash\_nalluri](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@avinash\_nalluri](https://discuss.elastic.co/u/avinash_nalluri)\
**Post date:** [November 25, 2011, 8:07am UTC](https://discuss.elastic.co/t/creating-shards-dynamically-and-rebalancing-primary-shards/5968/1 "2011-11-25T08:07:38Z")

</div>

1.How to create shards dynamically?  
Suppose we create index with 2 shards and 1 replica and index some  
data into the shards.After that If we want to create two more shards  
for the same index at run time, How to do it dynamically?

2.I created index with two shards and one replica.I have two nodes and  
each node has one primary shard and replica of another node's primary  
shard.If I make any one of node down,then this node's primary shard  
is being allocated on the another node.Now if I make up the node which  
I made down previously ,only replicas are creating.

Thanks,  
Avinash

---

<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:47am UTC](https://discuss.elastic.co/t/creating-shards-dynamically-and-rebalancing-primary-shards/5968/2 "2017-07-06T03:47:28Z")

</div>


