Missing shards


(Okan) #1

Hey everyone,

We lost some cluster nodes and some of primary shards was lost. and I need to know how can I reindex remain data.
how can I fix this mess. Please help me to solve this situation.


(Okan) #2

Problem solved. reroute every failed shards in index.
Here is the exam;
POST /_cluster/reroute
{
"commands" : [ {
"allocate" : {
"index" : "index_name",
"shard" : 4,
"node" : "node_name",
"allow_primary": true
}
}
]
}


(Mark Walkom) #3

That won't reindex the data, it'll (likely) just create a new, but empty shard.


(Okan) #4

I tried to fix and recreate to missing shards but as you said shards are empty. This type of solution solved my problem but I want to learn right way to solve problem and how can reindex my data warkolm


(Mark Walkom) #5

Reindex your data using the same method you used to initially index it.


(system) #6