# Exception when re-balancing shadow replica index shards - unable to determine if root directory exists

**URL:** <https://discuss.elastic.co/t/exception-when-re-balancing-shadow-replica-index-shards-unable-to-determine-if-root-directory-exists/47983>\
**Category:** Elasticsearch\
**Created:** [April 21, 2016, 2:13am UTC](https://discuss.elastic.co/t/exception-when-re-balancing-shadow-replica-index-shards-unable-to-determine-if-root-directory-exists/47983 "2016-04-21T02:13:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Youxu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youxu/32/117375_2.png) [@Youxu](https://discuss.elastic.co/u/Youxu)\
**Post date:** [April 21, 2016, 2:13am UTC](https://discuss.elastic.co/t/exception-when-re-balancing-shadow-replica-index-shards-unable-to-determine-if-root-directory-exists/47983/1 "2016-04-21T02:13:08Z")

</div>

I am experimenting shadow replica on my ES 1.7.5 cluster with 3 data nodes.

Following is what I did:

1. Add following settings to elasticsearch.yml  
node.enable\_custom\_paths: true  
node.add\_id\_to\_custom\_path: false  
path.shared\_data: Z:\esindex

Node: Z is mounted drive of the shared files system

1. Create an index with shadow replica with following setting:  
"index": {  
"data\_path": "Z:\esindex",  
"shadow\_replicas": true,  
"number\_of\_shards": 3,  
"number\_of\_replicas": 2  
}

2. Insert docs to index

The shadow replica index worked fine for both index and search, until I added a new data node into cluster which triggered shards re-balancing.

I got following exception:

[2016-04-21 01:59:56,555][WARN][indices.cluster] [data-vm-3] [[testindex\_shadowreplica][0]] marking and sending shard failed due to [failed to create shard]  
org.elasticsearch.index.shard.IndexShardCreationException: [testindex\_shadowreplica][0] failed to create shard  
Caused by: java.nio.file.FileSystemException: Z:\esindex\testindex\_shadowreplica\0\index: Unable to determine if root directory exists

What is wrong here?

---

<div class="post-metadata">

**Author:** ![dakrone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dakrone/32/23351_2.png) [@dakrone](https://discuss.elastic.co/u/dakrone)\
**Post date:** [April 22, 2016, 4:08pm UTC](https://discuss.elastic.co/t/exception-when-re-balancing-shadow-replica-index-shards-unable-to-determine-if-root-directory-exists/47983/2 "2016-04-22T16:08:11Z")

</div>

Hi Youxu,

In the past, when we have seen this, it's an indication that the account that Elasticsearch is running as does not have permission/access to the share that is mounted. Can you verifiy that the right account has ownership and can access/read/write/etc on the share?

---

<div class="post-metadata">

**Author:** ![Youxu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youxu/32/117375_2.png) [@Youxu](https://discuss.elastic.co/u/Youxu)\
**Post date:** [April 25, 2016, 2:06am UTC](https://discuss.elastic.co/t/exception-when-re-balancing-shadow-replica-index-shards-unable-to-determine-if-root-directory-exists/47983/3 "2016-04-25T02:06:40Z")

</div>

Thanks the hint. It sounds reasonable. Will have a look and get back to you.

---

<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:56pm UTC](https://discuss.elastic.co/t/exception-when-re-balancing-shadow-replica-index-shards-unable-to-determine-if-root-directory-exists/47983/4 "2017-07-05T22:56:36Z")

</div>


