# Locking a shard to one data path

**URL:** <https://discuss.elastic.co/t/locking-a-shard-to-one-data-path/17405>\
**Category:** Elasticsearch\
**Created:** [May 8, 2014, 6:59am UTC](https://discuss.elastic.co/t/locking-a-shard-to-one-data-path/17405 "2014-05-08T06:59:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Salmon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_salmon/32/5330_2.png) [@Michael\_Salmon](https://discuss.elastic.co/u/Michael_Salmon)\
**Post date:** [May 8, 2014, 6:59am UTC](https://discuss.elastic.co/t/locking-a-shard-to-one-data-path/17405/1 "2014-05-08T06:59:37Z")

</div>

As far as I can tell ES distributes segments over all data paths and if you  
have reliable disks i.e. raid 0 etc. then this is a good policy but if you  
are using single disks then failure of a single disk can affect all shards  
on a node. I am pretty sure that ES can recover from such a failure but in  
my case it means that I am going to go from a few TB that needs to be  
copied to tens of TB.

Does anyone have any practical experience of disk failure and recovery?

Are there any settings to force all segments in a shard to be created in  
the same data path?

I guess that I will need to restrict the number of disks per node and have  
more nodes instead.

/Michael

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/ffcf28f9-8963-4a33-8ae9-7b357d6ed997%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ffcf28f9-8963-4a33-8ae9-7b357d6ed997%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 8, 2014, 7:05am UTC](https://discuss.elastic.co/t/locking-a-shard-to-one-data-path/17405/2 "2014-05-08T07:05:20Z")

</div>

If you are using single disk machines, then all your segments will be  
created in the one data path (ie system directory).  
On linux with a package install, that's usually /var/lib/elasticsearch/

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 8 May 2014 16:59, Michael Salmon [michael.salmon@inovia.nu](mailto:michael.salmon@inovia.nu) wrote:

> As far as I can tell ES distributes segments over all data paths and if  
> you have reliable disks i.e. raid 0 etc. then this is a good policy but if  
> you are using single disks then failure of a single disk can affect all  
> shards on a node. I am pretty sure that ES can recover from such a failure  
> but in my case it means that I am going to go from a few TB that needs to  
> be copied to tens of TB.
> 
> Does anyone have any practical experience of disk failure and recovery?
> 
> Are there any settings to force all segments in a shard to be created in  
> the same data path?
> 
> I guess that I will need to restrict the number of disks per node and have  
> more nodes instead.
> 
> /Michael
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/ffcf28f9-8963-4a33-8ae9-7b357d6ed997%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ffcf28f9-8963-4a33-8ae9-7b357d6ed997%40googlegroups.com)[https://groups.google.com/d/msgid/elasticsearch/ffcf28f9-8963-4a33-8ae9-7b357d6ed997%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/ffcf28f9-8963-4a33-8ae9-7b357d6ed997%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEM624ZiKn9BMO9wpyf9b-NLYrduVcUahuei\_PropaTQ\_U2ErQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624ZiKn9BMO9wpyf9b-NLYrduVcUahuei_PropaTQ_U2ErQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:30am UTC](https://discuss.elastic.co/t/locking-a-shard-to-one-data-path/17405/3 "2017-07-06T01:30:54Z")

</div>


