# Marking index location in read only mode

**URL:** <https://discuss.elastic.co/t/marking-index-location-in-read-only-mode/271416>\
**Category:** Elasticsearch\
**Created:** [April 27, 2021, 4:44pm UTC](https://discuss.elastic.co/t/marking-index-location-in-read-only-mode/271416 "2021-04-27T16:44:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhishek\_Shinde](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@Abhishek\_Shinde](https://discuss.elastic.co/u/Abhishek_Shinde)\
**Post date:** [April 27, 2021, 4:44pm UTC](https://discuss.elastic.co/t/marking-index-location-in-read-only-mode/271416/1 "2021-04-27T16:44:38Z")

</div>

I wanted to know, how to close existing index location (ready-only mode) and open new index location for writing the index data? Consider a use case that, I want to chage my storage type in which old data will remain on the existing drive and new data will write to a new location. I wanted to read the data from old as well as new index location at the same time.

---

<div class="post-metadata">

**Author:** ![ggio](https://avatars.discourse-cdn.com/v4/letter/g/51bf81/32.png) [@ggio](https://discuss.elastic.co/u/ggio)\
**Post date:** [April 27, 2021, 4:57pm UTC](https://discuss.elastic.co/t/marking-index-location-in-read-only-mode/271416/2 "2021-04-27T16:57:27Z")

</div>

Hi,

If I understood correctly, you can make your old index in read-only mode.

`PUT /my_old_index/_settings { "settings": { "index.blocks.write": true } }`

Writing operations will be blocked and you can start to write documents in your new index

---

<div class="post-metadata">

**Author:** ![Abhishek\_Shinde](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@Abhishek\_Shinde](https://discuss.elastic.co/u/Abhishek_Shinde)\
**Post date:** [April 27, 2021, 5:31pm UTC](https://discuss.elastic.co/t/marking-index-location-in-read-only-mode/271416/3 "2021-04-27T17:31:59Z")

</div>

Does that mean you can't put index "location" in read only mode. You can put only Index in read only mode in Elasticsearch?

---

<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, 2021, 1:24am UTC](https://discuss.elastic.co/t/marking-index-location-in-read-only-mode/271416/4 "2021-04-28T01:24:52Z")

</div>

You cannot have a single node that has this type of storage setup. You will need multiple nodes to do this.

You should also look at using [ILM][ILM: Manage the index lifecycle | Elasticsearch Guide [7.12] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.html)) to handle this for you automatically.

---

<div class="post-metadata">

**Author:** ![Abhishek\_Shinde](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@Abhishek\_Shinde](https://discuss.elastic.co/u/Abhishek_Shinde)\
**Post date:** [April 28, 2021, 3:20am UTC](https://discuss.elastic.co/t/marking-index-location-in-read-only-mode/271416/5 "2021-04-28T03:20:27Z")

</div>

Can't we add disk to a node i.e. comma separated field in path.data to expand the storage on a existing node.

Note: It's a single node elastic cluster per installation of our application.

---

<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, 2021, 3:29am UTC](https://discuss.elastic.co/t/marking-index-location-in-read-only-mode/271416/6 "2021-04-28T03:29:38Z")

</div>

Yes but Elasticsearch will treat it exactly the same as the other path.

---

<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 26, 2021, 3:30am UTC](https://discuss.elastic.co/t/marking-index-location-in-read-only-mode/271416/7 "2021-05-26T03:30:16Z")

</div>

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