How to assign unassigned shards


(Eran Kutner-2) #1

Hi,
I'm trying to copy indexes from an old ES cluster running 0.16.4 to a new
one running 0.18.5.
The old cluster was using the FS gateway and the new one is using the local
GW. So I copied the indices directory from the old FS GW under the new
/nodes/0/ directory and the old metadata content under the new _state
I expected this to work and the server does indeed see all the indices but
all the shards are listed as unassigned and the metadata file which was
metadata-268 on the old cluster revered to metadata-2 after I started the
server.

Is there a way to explicitly assign those shards to a master server?

Thanks,
Eran


(Shay Banon) #2

This does not work, if you want to switch gateway implementations, you need
to reindex.

On Thu, Dec 1, 2011 at 6:20 PM, Eran Kutner eran@gigya-inc.com wrote:

Hi,
I'm trying to copy indexes from an old ES cluster running 0.16.4 to a new
one running 0.18.5.
The old cluster was using the FS gateway and the new one is using the
local GW. So I copied the indices directory from the old FS GW under the
new /nodes/0/ directory and the old metadata content under the new _state
I expected this to work and the server does indeed see all the indices but
all the shards are listed as unassigned and the metadata file which was
metadata-268 on the old cluster revered to metadata-2 after I started the
server.

Is there a way to explicitly assign those shards to a master server?

Thanks,
Eran


(Michael Sick) #3

Shay,

Will it work even with the same Gateway? Just curious if this survives
upgrades in ES/Lucene.

--Mike

On Thu, Dec 1, 2011 at 11:23 AM, Shay Banon kimchy@gmail.com wrote:

This does not work, if you want to switch gateway implementations, you
need to reindex.

On Thu, Dec 1, 2011 at 6:20 PM, Eran Kutner eran@gigya-inc.com wrote:

Hi,
I'm trying to copy indexes from an old ES cluster running 0.16.4 to a new
one running 0.18.5.
The old cluster was using the FS gateway and the new one is using the
local GW. So I copied the indices directory from the old FS GW under the
new /nodes/0/ directory and the old metadata content under the new _state
I expected this to work and the server does indeed see all the indices
but all the shards are listed as unassigned and the metadata file which was
metadata-268 on the old cluster revered to metadata-2 after I started the
server.

Is there a way to explicitly assign those shards to a master server?

Thanks,
Eran


(Shay Banon) #4

Yes, using the same gateway allows for upgrade without reindexing (I think
thats what you mean).

On Thu, Dec 1, 2011 at 6:40 PM, Michael Sick <
michael.sick@serenesoftware.com> wrote:

Shay,

Will it work even with the same Gateway? Just curious if this survives
upgrades in ES/Lucene.

--Mike

On Thu, Dec 1, 2011 at 11:23 AM, Shay Banon kimchy@gmail.com wrote:

This does not work, if you want to switch gateway implementations, you
need to reindex.

On Thu, Dec 1, 2011 at 6:20 PM, Eran Kutner eran@gigya-inc.com wrote:

Hi,
I'm trying to copy indexes from an old ES cluster running 0.16.4 to a
new one running 0.18.5.
The old cluster was using the FS gateway and the new one is using the
local GW. So I copied the indices directory from the old FS GW under the
new /nodes/0/ directory and the old metadata content under the new _state
I expected this to work and the server does indeed see all the indices
but all the shards are listed as unassigned and the metadata file which was
metadata-268 on the old cluster revered to metadata-2 after I started the
server.

Is there a way to explicitly assign those shards to a master server?

Thanks,
Eran


(Michael Sick) #5

It is, I didn't know if the formats changed over time such that either
Lucene or ES would not understand the old index/format.

On Thu, Dec 1, 2011 at 11:57 AM, Shay Banon kimchy@gmail.com wrote:

Yes, using the same gateway allows for upgrade without reindexing (I think
thats what you mean).

On Thu, Dec 1, 2011 at 6:40 PM, Michael Sick <
michael.sick@serenesoftware.com> wrote:

Shay,

Will it work even with the same Gateway? Just curious if this survives
upgrades in ES/Lucene.

--Mike

On Thu, Dec 1, 2011 at 11:23 AM, Shay Banon kimchy@gmail.com wrote:

This does not work, if you want to switch gateway implementations, you
need to reindex.

On Thu, Dec 1, 2011 at 6:20 PM, Eran Kutner eran@gigya-inc.com wrote:

Hi,
I'm trying to copy indexes from an old ES cluster running 0.16.4 to a
new one running 0.18.5.
The old cluster was using the FS gateway and the new one is using the
local GW. So I copied the indices directory from the old FS GW under the
new /nodes/0/ directory and the old metadata content under the new _state
I expected this to work and the server does indeed see all the indices
but all the shards are listed as unassigned and the metadata file which was
metadata-268 on the old cluster revered to metadata-2 after I started the
server.

Is there a way to explicitly assign those shards to a master server?

Thanks,
Eran


(Eran Kutner-2) #6

Thanks Shay. Using the FS gateway worked.


(Shay Banon) #7

cool, but, when you can, I highly recommend moving to the local gateway :slight_smile:

On Thu, Dec 1, 2011 at 8:45 PM, Eran Kutner eran@gigya-inc.com wrote:

Thanks Shay. Using the FS gateway worked.


(system) #8