Shard recovery with only one node in the cluster

On Mon, 2012-09-24 at 13:26 -0700, Shantanu wrote:

I have an Elasticsearch cluster with 3 data nodes. I have set up the
indices to have 5 shards and 2 replicas/shard. I have noticed that if
I shut down the cluster and start just one node then the shards remain
unallocated. The shards get allocated when I start up all the other
nodes in the cluster. Is there any thing I can do so that atleast all
the primary shards are allocated even if there is just one node in the
cluster? Note the indices are recovered but not allocated, i.e. the
cluster health is red.

Change the number of replicas to 2. That will ensure that each of your
nodes has a copy of all of the data.

Alternatively, start all 3 nodes, then shut down 1 and wait for the
cluster to return to 'green'. Then you can shut down a second node, and
the remaining node will have all the data (although cluster health will
be yellow, because it is missing a replica)

clint

--

--