How to assign unassigned shards

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

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,

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

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

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

Thanks Shay. Using the FS gateway worked.

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.