# The soft link of the ElasticSearch data directory is faulty

**URL:** <https://discuss.elastic.co/t/the-soft-link-of-the-elasticsearch-data-directory-is-faulty/303099>\
**Category:** Elasticsearch\
**Created:** [April 24, 2022, 12:12pm UTC](https://discuss.elastic.co/t/the-soft-link-of-the-elasticsearch-data-directory-is-faulty/303099 "2022-04-24T12:12:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yisay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yisay/32/104732_2.png) [@Yisay](https://discuss.elastic.co/u/Yisay)\
**Post date:** [April 24, 2022, 12:12pm UTC](https://discuss.elastic.co/t/the-soft-link-of-the-elasticsearch-data-directory-is-faulty/303099/1 "2022-04-24T12:12:34Z")

</div>

I want to move the Elasticsearch data file to another directory,  
Here is my command to operate  
cp -ar aa/node/0/indices/indices\_name bb/indices\_name  
rm -rm aa/node/0/indices/indices\_name  
ln -s bb/indices\_name aa/node/0/indices  
I migrated the data to the bb directory and soft chained the directory back to the data directory of Elasticsearch.  
After the Elasticsearch index is enabled, the directory corresponding to the soft link cannot be identified properly.

---

<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 26, 2022, 1:48am UTC](https://discuss.elastic.co/t/the-soft-link-of-the-elasticsearch-data-directory-is-faulty/303099/2 "2022-04-26T01:48:40Z")

</div>

Welcome to our community! 😃

> [@Yisay](#):
>
> After the Elasticsearch index is enabled, the directory corresponding to the soft link cannot be identified properly.

What do you mean by this?

---

<div class="post-metadata">

**Author:** ![Yisay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yisay/32/104732_2.png) [@Yisay](https://discuss.elastic.co/u/Yisay)\
**Post date:** [April 28, 2022, 1:13am UTC](https://discuss.elastic.co/t/the-soft-link-of-the-elasticsearch-data-directory-is-faulty/303099/5 "2022-04-28T01:13:45Z")

</div>

I restarted Elasticsearch, the data directory was not mounted. After Elasticsearch was started, I mounted the directory, but Elasticsearch could not correctly identify the data directory. Index status is red

---

<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 28, 2022, 2:01am UTC](https://discuss.elastic.co/t/the-soft-link-of-the-elasticsearch-data-directory-is-faulty/303099/6 "2022-04-28T02:01:52Z")

</div>

> [@Yisay](#):
>
> After Elasticsearch was started, I mounted the directory

That won't work. It needs to be mounted before you start Elasticsearch.

---

<div class="post-metadata">

**Author:** ![Yisay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yisay/32/104732_2.png) [@Yisay](https://discuss.elastic.co/u/Yisay)\
**Post date:** [April 29, 2022, 1:44am UTC](https://discuss.elastic.co/t/the-soft-link-of-the-elasticsearch-data-directory-is-faulty/303099/9 "2022-04-29T01:44:03Z")

</div>

> [@warkolm](#):
>
> That won't work. It needs to be mounted before you start Elasticsearch.

In this case, besides restarting, is there any other way to restore the problematic index?

---

<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:** [May 27, 2022, 1:44am UTC](https://discuss.elastic.co/t/the-soft-link-of-the-elasticsearch-data-directory-is-faulty/303099/10 "2022-05-27T01:44:17Z")

</div>

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