Hi All
I had ES cluster with 3 (data+master) & 1 co-ordinator node. I wanted set the default replication to 2, hence i following the below steps.
The ES cluster was fine and there were more than 100 shards and working well since 3-4 weeks.
- Logged into all 4 ES nodes & killed the elastic daemon
- Added the below lines to elasticsearch.yml in all 4 nodes
index.number_of_replicas : 2 - Restarted the ES node..
- ES nodes didnt start..looking into the log and found information as specified below
- Removed the index.number_of_replicas : 2 from yml file
- restarted all the ES nodes..
- Cluster is up and running..
The min master settings:
discovery.zen.minimum_master_nodes: 3
My Question here is :
when I issue /_cat/indices?v , i see only .kibana index and the 100+ olds ones got deleted. Why the shards got deleted?
Error in log file when ES started with index.number_of_replicas : 2 in config file..
[2017-03-31T14:38:54,798][WARN ][o.e.c.s.SettingsModule ] [dev_es_node_3a]
Found index level settings on node level configuration.
Since elasticsearch 5.x index level settings can NOT be set on the nodes
configuration like the elasticsearch.yaml, in system properties or command line
arguments.In order to upgrade all indices the settings must be updated via the
/${index}/_settings API. Unless all settings are dynamic all indices must be closed
in order to apply the upgradeIndices created in the future should use index templates
to set default values.
Please ensure all required values are updated on all indices by executing:
curl -XPUT 'http://localhost:9200/_all/_settings?preserve_existing=true' -d '{
"index.number_of_replicas" : "2"
}'