# Elasticsearch multi path and RAID-0

**URL:** <https://discuss.elastic.co/t/elasticsearch-multi-path-and-raid-0/135254>\
**Category:** Elasticsearch\
**Created:** [June 10, 2018, 7:37am UTC](https://discuss.elastic.co/t/elasticsearch-multi-path-and-raid-0/135254 "2018-06-10T07:37:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![svarup](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@svarup](https://discuss.elastic.co/u/svarup)\
**Post date:** [June 10, 2018, 7:37am UTC](https://discuss.elastic.co/t/elasticsearch-multi-path-and-raid-0/135254/1 "2018-06-10T07:37:00Z")

</div>

ElasticSearch give one option to add multiple data path so my question is, is it beneficial to give multiple path that are configured in RAID-0

Ex: path.data: /mnt/md0, /mnt/md1 are the path we use in elasticsearch.yml and those two path are configured in RAID-0

---

<div class="post-metadata">

**Author:** ![JKhondhu](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@JKhondhu](https://discuss.elastic.co/u/JKhondhu)\
**Post date:** [June 11, 2018, 8:04am UTC](https://discuss.elastic.co/t/elasticsearch-multi-path-and-raid-0/135254/2 "2018-06-11T08:04:17Z")

</div>

Multiple paths in path.data stripes your shards across the paths (at the shard level).  
Using RAID 0 stripes your shards across the disks (at the block level).

In the first case if you lose a disk, you lose the shards on that disk and nothing else.  
In the second case, if you lose a disk, you lose all of your shards on that machine. Therefore the first gives you increased safety, but the trade off is lower performance.

---

<div class="post-metadata">

**Author:** ![svarup](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@svarup](https://discuss.elastic.co/u/svarup)\
**Post date:** [June 11, 2018, 8:18am UTC](https://discuss.elastic.co/t/elasticsearch-multi-path-and-raid-0/135254/3 "2018-06-11T08:18:07Z")

</div>

As you said in the second case, if you lose a disk, you lose all of your shards on that machine. but what if i have replica on other machine with same configuration.

is elasticsearch balance primary and replica shard on this case?

---

<div class="post-metadata">

**Author:** ![JKhondhu](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@JKhondhu](https://discuss.elastic.co/u/JKhondhu)\
**Post date:** [June 11, 2018, 8:23am UTC](https://discuss.elastic.co/t/elasticsearch-multi-path-and-raid-0/135254/4 "2018-06-11T08:23:04Z")

</div>

Please explain this setup more?

---

<div class="post-metadata">

**Author:** ![svarup](https://avatars.discourse-cdn.com/v4/letter/s/ee59a6/32.png) [@svarup](https://discuss.elastic.co/u/svarup)\
**Post date:** [June 11, 2018, 8:28am UTC](https://discuss.elastic.co/t/elasticsearch-multi-path-and-raid-0/135254/5 "2018-06-11T08:28:11Z")

</div>

let say i have 2 node with radi-0 configuration and multiple path set as i said above

node1-path.data: /mnt/md0, /mnt/md1

node-2-path.data: /mnt/md2, /mnt/md3

as you said if any disk on your first node failed then all shards will no longer usable because of RAID-0 configuration i agree on this but i have second node so does elasticsearch balnce the primary shards that are failed in node1 to node2 for fully functional cluster?

---

<div class="post-metadata">

**Author:** ![JKhondhu](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@JKhondhu](https://discuss.elastic.co/u/JKhondhu)\
**Post date:** [June 14, 2018, 1:11pm UTC](https://discuss.elastic.co/t/elasticsearch-multi-path-and-raid-0/135254/6 "2018-06-14T13:11:17Z")

</div>

> [@svarup](#):
>
> but i have second node so does elasticsearch balnce the primary shards that are failed in node1 to node2 for fully functional cluster?

You will have primary and replica shards balanced in all paths. Even if you lose `node1-path.data: /mnt/md0, /mnt/md1` That would have contained primary and replica shards, thus loss of data.

By default, Elasticsearch will not allocate the same index's primaries and replicas on the same node.

---

<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 12, 2018, 1:11pm UTC](https://discuss.elastic.co/t/elasticsearch-multi-path-and-raid-0/135254/7 "2018-07-12T13:11:21Z")

</div>

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