# Multiple path.data and stripping

**URL:** https://discuss.elastic.co/t/multiple-path-data-and-stripping/9976
**Category:** Elasticsearch
**Created:** [December 6, 2012, 6:10pm UTC](https://discuss.elastic.co/t/multiple-path-data-and-stripping/9976 "2012-12-06T18:10:03Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Kubes](https://avatars.discourse-cdn.com/v4/letter/k/a9adbd/32.png) [@Kubes](https://discuss.elastic.co/u/Kubes)
#### Post date: [December 6, 2012, 6:10pm UTC](https://discuss.elastic.co/t/multiple-path-data-and-stripping/9976/1 "2012-12-06T18:10:03Z")

</div>

All,

1. If one adds additional devices post to a running server will es balance  
(move) the existing index to "even" out the drives (both space and io)?

2. Can indexes be moved to a new drive?

Thanks

--

---

<div class="post-metadata">

### Author: ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)
#### Post date: [December 7, 2012, 3:43pm UTC](https://discuss.elastic.co/t/multiple-path-data-and-stripping/9976/2 "2012-12-07T15:43:55Z")

</div>

1. When you add new devices, Elasticsearch will not move existing files to  
the additional device immediately, existing files will remain on the old  
devices. However, as new files are created Elasticsearch will create them  
on a device with the most available space, which means that all new files  
will be created on new devices until they fill up. So, basically, the  
process of creating new segments and merging old segments that  
elasticsearch goes through as it indexes new data will eventually balance  
things out.

2. Yes, you can shut down node move indices to the new drive, replace  
path.data in config and start the node.

On Thursday, December 6, 2012 1:10:03 PM UTC-5, Kubes wrote:

> All,
> 
> 1. If one adds additional devices post to a running server will es balance  
> (move) the existing index to "even" out the drives (both space and io)?
> 
> 2. Can indexes be moved to a new drive?
> 
> Thanks

--

---

<div class="post-metadata">

### Author: ![Kubes](https://avatars.discourse-cdn.com/v4/letter/k/a9adbd/32.png) [@Kubes](https://discuss.elastic.co/u/Kubes)
#### Post date: [December 7, 2012, 4:28pm UTC](https://discuss.elastic.co/t/multiple-path-data-and-stripping/9976/3 "2012-12-07T16:28:32Z")

</div>

Thanks for the info.

A few more questions nn "moving" index

I have added the 2nd drive via the path.data. Now tt look like ES now has  
created an directory for every index on the additional (new) drive. In  
each has the shard directory (shard number) with the index, \_state and  
translog subdirectories. There is a state file.

So to move a index from initial drive (Drive A) to the new (Drive B), and I  
just shutdown ES and move the file structure of that index, overwriting  
what is on Drive B?

Thanks

On Fri, Dec 7, 2012 at 10:43 AM, Igor Motov [imotov@gmail.com](mailto:imotov@gmail.com) wrote:

> 1. When you add new devices, Elasticsearch will not move existing files to  
> the additional device immediately, existing files will remain on the old  
> devices. However, as new files are created Elasticsearch will create them  
> on a device with the most available space, which means that all new files  
> will be created on new devices until they fill up. So, basically, the  
> process of creating new segments and merging old segments that  
> elasticsearch goes through as it indexes new data will eventually balance  
> things out.
> 
> 2. Yes, you can shut down node move indices to the new drive, replace  
> path.data in config and start the node.
> 
> On Thursday, December 6, 2012 1:10:03 PM UTC-5, Kubes wrote:
> 
> > All,
> > 
> > 1. If one adds additional devices post to a running server will es  
> > balance (move) the existing index to "even" out the drives (both space and  
> > io)?
> > 
> > 2. Can indexes be moved to a new drive?
> > 
> > Thanks
> > 
> > --

--

---

<div class="post-metadata">

### Author: ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)
#### Post date: [December 7, 2012, 4:44pm UTC](https://discuss.elastic.co/t/multiple-path-data-and-stripping/9976/4 "2012-12-07T16:44:24Z")

</div>

Now, since you already started the node, it might be tricky. If you indexed  
something after node was started, Elasticsearch autorefreshed some data, or  
segment merge occurred it might have created some files in the new  
directory. So, you cannot simply overwrite directories on drive B if they  
have some files in them, you might loose some data. You need to carefully  
"merge" them together to make sure that you don't loose any files (the  
state-??? file will be in both structures, you can just keep one of them).

On Friday, December 7, 2012 11:28:32 AM UTC-5, Kubes wrote:

> Thanks for the info.
> 
> A few more questions nn "moving" index
> 
> I have added the 2nd drive via the path.data. Now tt look like ES now has  
> created an directory for every index on the additional (new) drive. In  
> each has the shard directory (shard number) with the index, \_state and  
> translog subdirectories. There is a state file.
> 
> So to move a index from initial drive (Drive A) to the new (Drive B), and  
> I just shutdown ES and move the file structure of that index, overwriting  
> what is on Drive B?
> 
> Thanks
> 
> On Fri, Dec 7, 2012 at 10:43 AM, Igor Motov \<[imo...@gmail.com](mailto:imo...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > 1. When you add new devices, Elasticsearch will not move existing files  
> > to the additional device immediately, existing files will remain on the old  
> > devices. However, as new files are created Elasticsearch will create them  
> > on a device with the most available space, which means that all new files  
> > will be created on new devices until they fill up. So, basically, the  
> > process of creating new segments and merging old segments that  
> > elasticsearch goes through as it indexes new data will eventually balance  
> > things out.
> > 
> > 2. Yes, you can shut down node move indices to the new drive, replace  
> > path.data in config and start the node.
> > 
> > On Thursday, December 6, 2012 1:10:03 PM UTC-5, Kubes wrote:
> > 
> > > All,
> > > 
> > > 1. If one adds additional devices post to a running server will es  
> > > balance (move) the existing index to "even" out the drives (both space and  
> > > io)?
> > > 
> > > 2. Can indexes be moved to a new drive?
> > > 
> > > Thanks
> > > 
> > > --

--

---

<div class="post-metadata">

### Author: ![Kubes](https://avatars.discourse-cdn.com/v4/letter/k/a9adbd/32.png) [@Kubes](https://discuss.elastic.co/u/Kubes)
#### Post date: [December 7, 2012, 4:54pm UTC](https://discuss.elastic.co/t/multiple-path-data-and-stripping/9976/5 "2012-12-07T16:54:23Z")

</div>

Again Thansk.

The "good news" is that these are logstash indexes, which are by date and  
are not written to post the date. So I think the move will still be okay,  
as there is no "index/\*" files for any shard.

But for future reference how does one "merge". (In ES or via the OS).  
Could we export/import? (again how). Sorry these might newbie  
questions....

On Fri, Dec 7, 2012 at 11:44 AM, Igor Motov [imotov@gmail.com](mailto:imotov@gmail.com) wrote:

> Now, since you already started the node, it might be tricky. If you  
> indexed something after node was started, Elasticsearch autorefreshed some  
> data, or segment merge occurred it might have created some files in the  
> new directory. So, you cannot simply overwrite directories on drive B if  
> they have some files in them, you might loose some data. You need to  
> carefully "merge" them together to make sure that you don't loose any files  
> (the state-??? file will be in both structures, you can just keep one of  
> them).
> 
> On Friday, December 7, 2012 11:28:32 AM UTC-5, Kubes wrote:
> 
> > Thanks for the info.
> > 
> > A few more questions nn "moving" index
> > 
> > I have added the 2nd drive via the path.data. Now tt look like ES now  
> > has created an directory for every index on the additional (new) drive. In  
> > each has the shard directory (shard number) with the index, \_state and  
> > translog subdirectories. There is a state file.
> > 
> > So to move a index from initial drive (Drive A) to the new (Drive B), and  
> > I just shutdown ES and move the file structure of that index, overwriting  
> > what is on Drive B?
> > 
> > Thanks
> > 
> > On Fri, Dec 7, 2012 at 10:43 AM, Igor Motov [imo...@gmail.com](mailto:imo...@gmail.com) wrote:
> > 
> > > 1. When you add new devices, Elasticsearch will not move existing files  
> > > to the additional device immediately, existing files will remain on the old  
> > > devices. However, as new files are created Elasticsearch will create them  
> > > on a device with the most available space, which means that all new files  
> > > will be created on new devices until they fill up. So, basically, the  
> > > process of creating new segments and merging old segments that  
> > > elasticsearch goes through as it indexes new data will eventually balance  
> > > things out.
> > > 
> > > 2. Yes, you can shut down node move indices to the new drive, replace  
> > > path.data in config and start the node.
> > > 
> > > On Thursday, December 6, 2012 1:10:03 PM UTC-5, Kubes wrote:
> > > 
> > > > All,
> > > > 
> > > > 1. If one adds additional devices post to a running server will es  
> > > > balance (move) the existing index to "even" out the drives (both space and  
> > > > io)?
> > > > 
> > > > 2. Can indexes be moved to a new drive?
> > > > 
> > > > Thanks
> > > > 
> > > > --
> > 
> > --

--

---

<div class="post-metadata">

### Author: ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)
#### Post date: [December 7, 2012, 5:13pm UTC](https://discuss.elastic.co/t/multiple-path-data-and-stripping/9976/6 "2012-12-07T17:13:19Z")

</div>

For the future reference, it's better not to merge 🙂 . Just don't start  
the server after adding a new drive before you move all data you want to  
move. There is really no support for merging, moving, exporting or  
importing at the moment. It's all have to be done on OS level. The only  
elasticsearch-based solution that I can think of is to reroute shards from  
the node that you want to upgrade to other nodes, replace the drives and  
then reroute shards back to this node.

On Friday, December 7, 2012 11:54:23 AM UTC-5, Kubes wrote:

> Again Thansk.
> 
> The "good news" is that these are logstash indexes, which are by date and  
> are not written to post the date. So I think the move will still be okay,  
> as there is no "index/\*" files for any shard.
> 
> But for future reference how does one "merge". (In ES or via the OS).  
> Could we export/import? (again how). Sorry these might newbie  
> questions....
> 
> On Fri, Dec 7, 2012 at 11:44 AM, Igor Motov \<[imo...@gmail.com](mailto:imo...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > Now, since you already started the node, it might be tricky. If you  
> > indexed something after node was started, Elasticsearch autorefreshed some  
> > data, or segment merge occurred it might have created some files in the  
> > new directory. So, you cannot simply overwrite directories on drive B if  
> > they have some files in them, you might loose some data. You need to  
> > carefully "merge" them together to make sure that you don't loose any files  
> > (the state-??? file will be in both structures, you can just keep one of  
> > them).
> > 
> > On Friday, December 7, 2012 11:28:32 AM UTC-5, Kubes wrote:
> > 
> > > Thanks for the info.
> > > 
> > > A few more questions nn "moving" index
> > > 
> > > I have added the 2nd drive via the path.data. Now tt look like ES now  
> > > has created an directory for every index on the additional (new) drive. In  
> > > each has the shard directory (shard number) with the index, \_state and  
> > > translog subdirectories. There is a state file.
> > > 
> > > So to move a index from initial drive (Drive A) to the new (Drive B),  
> > > and I just shutdown ES and move the file structure of that index,  
> > > overwriting what is on Drive B?
> > > 
> > > Thanks
> > > 
> > > On Fri, Dec 7, 2012 at 10:43 AM, Igor Motov [imo...@gmail.com](mailto:imo...@gmail.com) wrote:
> > > 
> > > > 1. When you add new devices, Elasticsearch will not move existing files  
> > > > to the additional device immediately, existing files will remain on the old  
> > > > devices. However, as new files are created Elasticsearch will create them  
> > > > on a device with the most available space, which means that all new files  
> > > > will be created on new devices until they fill up. So, basically, the  
> > > > process of creating new segments and merging old segments that  
> > > > elasticsearch goes through as it indexes new data will eventually balance  
> > > > things out.
> > > > 
> > > > 2. Yes, you can shut down node move indices to the new drive, replace  
> > > > path.data in config and start the node.
> > > > 
> > > > On Thursday, December 6, 2012 1:10:03 PM UTC-5, Kubes wrote:
> > > > 
> > > > > All,
> > > > > 
> > > > > 1. If one adds additional devices post to a running server will es  
> > > > > balance (move) the existing index to "even" out the drives (both space and  
> > > > > io)?
> > > > > 
> > > > > 2. Can indexes be moved to a new drive?
> > > > > 
> > > > > Thanks
> > > > > 
> > > > > --
> > > 
> > > --

--

---

<div class="post-metadata">

### Author: ![Kubes](https://avatars.discourse-cdn.com/v4/letter/k/a9adbd/32.png) [@Kubes](https://discuss.elastic.co/u/Kubes)
#### Post date: [December 7, 2012, 6:33pm UTC](https://discuss.elastic.co/t/multiple-path-data-and-stripping/9976/7 "2012-12-07T18:33:02Z")

</div>

Perfect.  
Thanks.

On Fri, Dec 7, 2012 at 12:13 PM, Igor Motov [imotov@gmail.com](mailto:imotov@gmail.com) wrote:

> For the future reference, it's better not to merge 🙂 . Just don't start  
> the server after adding a new drive before you move all data you want to  
> move. There is really no support for merging, moving, exporting or  
> importing at the moment. It's all have to be done on OS level. The only  
> elasticsearch-based solution that I can think of is to reroute shards from  
> the node that you want to upgrade to other nodes, replace the drives and  
> then reroute shards back to this node.
> 
> On Friday, December 7, 2012 11:54:23 AM UTC-5, Kubes wrote:
> 
> > Again Thansk.
> > 
> > The "good news" is that these are logstash indexes, which are by date and  
> > are not written to post the date. So I think the move will still be okay,  
> > as there is no "index/\*" files for any shard.
> > 
> > But for future reference how does one "merge". (In ES or via the OS).  
> > Could we export/import? (again how). Sorry these might newbie  
> > questions....
> > 
> > On Fri, Dec 7, 2012 at 11:44 AM, Igor Motov [imo...@gmail.com](mailto:imo...@gmail.com) wrote:
> > 
> > > Now, since you already started the node, it might be tricky. If you  
> > > indexed something after node was started, Elasticsearch autorefreshed some  
> > > data, or segment merge occurred it might have created some files in the  
> > > new directory. So, you cannot simply overwrite directories on drive B if  
> > > they have some files in them, you might loose some data. You need to  
> > > carefully "merge" them together to make sure that you don't loose any files  
> > > (the state-??? file will be in both structures, you can just keep one of  
> > > them).
> > > 
> > > On Friday, December 7, 2012 11:28:32 AM UTC-5, Kubes wrote:
> > > 
> > > > Thanks for the info.
> > > > 
> > > > A few more questions nn "moving" index
> > > > 
> > > > I have added the 2nd drive via the path.data. Now tt look like ES now  
> > > > has created an directory for every index on the additional (new) drive. In  
> > > > each has the shard directory (shard number) with the index, \_state and  
> > > > translog subdirectories. There is a state file.
> > > > 
> > > > So to move a index from initial drive (Drive A) to the new (Drive B),  
> > > > and I just shutdown ES and move the file structure of that index,  
> > > > overwriting what is on Drive B?
> > > > 
> > > > Thanks
> > > > 
> > > > On Fri, Dec 7, 2012 at 10:43 AM, Igor Motov [imo...@gmail.com](mailto:imo...@gmail.com) wrote:
> > > > 
> > > > > 1. When you add new devices, Elasticsearch will not move existing  
> > > > > files to the additional device immediately, existing files will remain on  
> > > > > the old devices. However, as new files are created Elasticsearch will  
> > > > > create them on a device with the most available space, which means that all  
> > > > > new files will be created on new devices until they fill up. So, basically,  
> > > > > the process of creating new segments and merging old segments that  
> > > > > elasticsearch goes through as it indexes new data will eventually balance  
> > > > > things out.
> > > > > 
> > > > > 2. Yes, you can shut down node move indices to the new drive, replace  
> > > > > path.data in config and start the node.
> > > > > 
> > > > > On Thursday, December 6, 2012 1:10:03 PM UTC-5, Kubes wrote:
> > > > > 
> > > > > > All,
> > > > > > 
> > > > > > 1. If one adds additional devices post to a running server will es  
> > > > > > balance (move) the existing index to "even" out the drives (both space and  
> > > > > > io)?
> > > > > > 
> > > > > > 2. Can indexes be moved to a new drive?
> > > > > > 
> > > > > > Thanks
> > > > > > 
> > > > > > --
> > > > 
> > > > --
> > 
> > --

--

---

<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 6, 2017, 3:00am UTC](https://discuss.elastic.co/t/multiple-path-data-and-stripping/9976/8 "2017-07-06T03:00:49Z")

</div>


