elasticsearch-operator icon indicating copy to clipboard operation
elasticsearch-operator copied to clipboard

Process for changing StorageClass without loosing data

Open wjimenez5271 opened this issue 7 years ago • 1 comments

Is there a known path to change the StorageClass without loosing the data? For instance, say we discover our workload needs more IOPS and we want to switch to a higher throughput data store, can we do so without loosing our data?

Perhaps this is outside the scope of what can be done with an abstract storage class, but wanted to ask just in case. Thanks!

wjimenez5271 avatar Apr 04 '18 05:04 wjimenez5271

The operator currently doesn't support updates in StateFulSet. You can do it manually changing node by node, the steps for increasing disk size on the node es-data-es-data-logging-cluster-eu-west-1a-0 will be something like this:

  • Scale operator to 0 replicas
  • Scale statefulset es-data-logging-cluster-eu-west-1a to 0 replica
  • Dump pvc es-data-es-data-logging-cluster-eu-west-1a-0 to yaml
  • Delete pvc es-data-es-data-logging-cluster-eu-west-1a-0
  • Recreated pvc with the desired storage size using the dumped file
  • Scale statefulset es-data-logging-cluster-eu-west-1a to 1 replica
  • Wait until Elasticsearch sync all shards
  • Scale operator to 1 replicas

Do it again for all other data nodes!!

gianrubio avatar Apr 07 '18 09:04 gianrubio