# How to change shards number?

**URL:** https://discuss.elastic.co/t/how-to-change-shards-number/8000
**Category:** Elasticsearch
**Created:** [June 7, 2012, 1:43am UTC](https://discuss.elastic.co/t/how-to-change-shards-number/8000 "2012-06-07T01:43:50Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Dong\_Aihua](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dong_aihua/32/2413_2.png) [@Dong\_Aihua](https://discuss.elastic.co/u/Dong_Aihua)
#### Post date: [June 7, 2012, 1:43am UTC](https://discuss.elastic.co/t/how-to-change-shards-number/8000/1 "2012-06-07T01:43:50Z")

</div>

Hi,  
Originally, I have 2 nodes with 2 shards. Now I added new node into the  
cluster, and I want to change the shards to 3.  
But after I modify the configuration, and restart the ES, the shards  
still kept to 2.  
How can I change the shards number?  
Thanks.

-Regards-  
-Jackie-

---

<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: [June 7, 2012, 2:22am UTC](https://discuss.elastic.co/t/how-to-change-shards-number/8000/2 "2012-06-07T02:22:59Z")

</div>

You cannot change the number of shards on a live index.

--  
Ivan

On Wed, Jun 6, 2012 at 6:43 PM, jackiedong [jackiedong168@gmail.com](mailto:jackiedong168@gmail.com) wrote:

> Hi,  
> Originally, I have 2 nodes with 2 shards. Now I added new node into the  
> cluster, and I want to change the shards to 3.  
> But after I modify the configuration, and restart the ES, the shards  
> still kept to 2.  
> How can I change the shards number?  
> Thanks.
> 
> -Regards-  
> -Jackie-

---

<div class="post-metadata">

### Author: ![Dong\_Aihua](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dong_aihua/32/2413_2.png) [@Dong\_Aihua](https://discuss.elastic.co/u/Dong_Aihua)
#### Post date: [June 7, 2012, 5:23am UTC](https://discuss.elastic.co/t/how-to-change-shards-number/8000/3 "2012-06-07T05:23:04Z")

</div>

what's your meaning of "live index"?  
Do you mean once the index is created, the shards can't be changed anymore?

在 2012年6月7日星期四UTC+8上午10时22分59秒，Ivan Brusic写道：

> You cannot change the number of shards on a live index.
> 
> --  
> Ivan
> 
> On Wed, Jun 6, 2012 at 6:43 PM, jackiedong [jackiedong168@gmail.com](mailto:jackiedong168@gmail.com)  
> wrote:
> 
> > Hi,  
> > Originally, I have 2 nodes with 2 shards. Now I added new node into  
> > the  
> > cluster, and I want to change the shards to 3.  
> > But after I modify the configuration, and restart the ES, the shards  
> > still kept to 2.  
> > How can I change the shards number?  
> > Thanks.
> > 
> > -Regards-  
> > -Jackie-

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [June 7, 2012, 5:52am UTC](https://discuss.elastic.co/t/how-to-change-shards-number/8000/4 "2012-06-07T05:52:00Z")

</div>

Yes. That's it.  
So, it's an important number you have to choose before creating your index.

Replica can be modified live.

David 😉  
Twitter : @dadoonet / @elasticsearchfr

Le 7 juin 2012 à 07:23, jackiedong [jackiedong168@gmail.com](mailto:jackiedong168@gmail.com) a écrit :

> what's your meaning of "live index"?  
> Do you mean once the index is created, the shards can't be changed anymore?
> 
> 在 2012年6月7日星期四UTC+8上午10时22分59秒，Ivan Brusic写道：  
> You cannot change the number of shards on a live index.
> 
> --  
> Ivan
> 
> On Wed, Jun 6, 2012 at 6:43 PM, jackiedong [jackiedong168@gmail.com](mailto:jackiedong168@gmail.com) wrote:
> 
> > Hi,  
> > Originally, I have 2 nodes with 2 shards. Now I added new node into the  
> > cluster, and I want to change the shards to 3.  
> > But after I modify the configuration, and restart the ES, the shards  
> > still kept to 2.  
> > How can I change the shards number?  
> > Thanks.
> > 
> > -Regards-  
> > -Jackie-

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [June 10, 2012, 9:34pm UTC](https://discuss.elastic.co/t/how-to-change-shards-number/8000/5 "2012-06-10T21:34:19Z")

</div>

Btw, already with 2 shards and 1 replica, you scale up to 4 nodes without  
needing to change it.

On Thu, Jun 7, 2012 at 7:52 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> Yes. That's it.  
> So, it's an important number you have to choose before creating your index.
> 
> Replica can be modified live.
> 
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr
> 
> Le 7 juin 2012 à 07:23, jackiedong [jackiedong168@gmail.com](mailto:jackiedong168@gmail.com) a écrit :
> 
> what's your meaning of "live index"?  
> Do you mean once the index is created, the shards can't be changed anymore?
> 
> 在 2012年6月7日星期四UTC+8上午10时22分59秒，Ivan Brusic写道：
> 
> > You cannot change the number of shards on a live index.
> > 
> > --  
> > Ivan
> > 
> > On Wed, Jun 6, 2012 at 6:43 PM, jackiedong [jackiedong168@gmail.com](mailto:jackiedong168@gmail.com)  
> > wrote:
> > 
> > > Hi,  
> > > Originally, I have 2 nodes with 2 shards. Now I added new node into  
> > > the  
> > > cluster, and I want to change the shards to 3.  
> > > But after I modify the configuration, and restart the ES, the shards  
> > > still kept to 2.  
> > > How can I change the shards number?  
> > > Thanks.
> > > 
> > > -Regards-  
> > > -Jackie-

---

<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:24am UTC](https://discuss.elastic.co/t/how-to-change-shards-number/8000/6 "2017-07-06T03:24:59Z")

</div>


