# Different shards land in same path.data directory

**URL:** <https://discuss.elastic.co/t/different-shards-land-in-same-path-data-directory/47281>\
**Category:** Elasticsearch\
**Created:** [April 13, 2016, 4:47pm UTC](https://discuss.elastic.co/t/different-shards-land-in-same-path-data-directory/47281 "2016-04-13T16:47:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shadyabhi](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@shadyabhi](https://discuss.elastic.co/u/shadyabhi)\
**Post date:** [April 13, 2016, 4:47pm UTC](https://discuss.elastic.co/t/different-shards-land-in-same-path-data-directory/47281/1 "2016-04-13T16:47:00Z")

</div>

As I understand from the docs, data from a single shard goes to same path.data directory.

So, let's suppose, my path.data looks like ["/disk1", "/disk2"]. and I want maximum throughput for indexing. To achieve that, what I would ideally do is, assign 2 shards per node and expect ES to create these two shards on different path directories. However, I'm observing that both shards are created on "/disk1".

Why is that? Should this change? Is this an optimization that we can do in future versions?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![anhlqn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anhlqn/32/5454_2.png) [@anhlqn](https://discuss.elastic.co/u/anhlqn)\
**Post date:** [April 13, 2016, 6:30pm UTC](https://discuss.elastic.co/t/different-shards-land-in-same-path-data-directory/47281/2 "2016-04-13T18:30:30Z")

</div>

Do the two paths have same amount of free disk space? If not, then ES allocate shards to the one with more free space first.

How big is each shard? If it's too small, ES may ignore it.

---

<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:** [April 13, 2016, 9:59pm UTC](https://discuss.elastic.co/t/different-shards-land-in-same-path-data-directory/47281/3 "2016-04-13T21:59:54Z")

</div>

It doesn't do it to that level. It just makes sure a shard, irrespective of the index it belongs to, is wholly on a path.

It's an interesting idea though, why not raise a feature request for it on github?

---

<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 5, 2017, 10:59pm UTC](https://discuss.elastic.co/t/different-shards-land-in-same-path-data-directory/47281/4 "2017-07-05T22:59:28Z")

</div>


