# Moving to a different elasticsearch storage using ECK

**URL:** https://discuss.elastic.co/t/moving-to-a-different-elasticsearch-storage-using-eck/362304
**Category:** Elastic Cloud on Kubernetes (ECK)
**Created:** [July 1, 2024, 3:32pm UTC](https://discuss.elastic.co/t/moving-to-a-different-elasticsearch-storage-using-eck/362304 "2024-07-01T15:32:35Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![envycz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/envycz/32/46749_2.png) [@envycz](https://discuss.elastic.co/u/envycz)
#### Post date: [July 1, 2024, 3:32pm UTC](https://discuss.elastic.co/t/moving-to-a-different-elasticsearch-storage-using-eck/362304/1 "2024-07-01T15:32:35Z")

</div>

Hello, today I wanted to switch the type of storage our Elasticsearch (deployed with ECK operator) is using. I found [here](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-volume-claim-templates.html#k8s_updating_the_volume_claim_settings), that it should be possible by creating a new nodeSet with desired new configuration and deleting the old one.

However after I did exactly that, I see just one failing pod from the newly created nodeSet that is reporting the following:

```auto
can't add node {elasticsearch-es-elastic-0}{<same_id>}{<some_params>}, found existing node {elasticsearch-es-default-1}{<same_id>}{<some_params>} with the same id but is a different node instance

```

The only thing I have changed in our Elasticsearch resource specification is nodeSet.[0].name and volumeClaimTemplate.[0].spec.selector.matchLabels .  
What am I doing wrong? How can I move to a different storage while moving all existing data?

Thank you in advance 🙂

---

<div class="post-metadata">

### Author: ![BarS](https://avatars.discourse-cdn.com/v4/letter/b/ea5d25/32.png) [@BarS](https://discuss.elastic.co/u/BarS)
#### Post date: [July 16, 2024, 8:11am UTC](https://discuss.elastic.co/t/moving-to-a-different-elasticsearch-storage-using-eck/362304/2 "2024-07-16T08:11:58Z")

</div>

Hey 👋

Can you share your elasticsearch object (yaml) and StorageClass (if it's your production storageclass, don't forget to anonymize it) ?

---

<div class="post-metadata">

### Author: ![envycz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/envycz/32/46749_2.png) [@envycz](https://discuss.elastic.co/u/envycz)
#### Post date: [July 18, 2024, 7:13am UTC](https://discuss.elastic.co/t/moving-to-a-different-elasticsearch-storage-using-eck/362304/3 "2024-07-18T07:13:22Z")

</div>

Hello, sure here it is:  
Elasticsearch

```auto
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  annotations:
    eck.k8s.elastic.co/license: basic
    eck.k8s.elastic.co/orchestration-hints: '{"no_transient_settings":true,"service_accounts":true,"desired_nodes":{"version":4,"hash":"1105308204"}}'
    elasticsearch.k8s.elastic.co/cluster-uuid: xxx
    meta.helm.sh/release-name: eck
    meta.helm.sh/release-namespace: eck-npr-svc-01
  creationTimestamp: "2024-06-20T07:19:09Z"
  generation: 11
  labels:
    app.kubernetes.io/instance: eck
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: eck-elasticsearch
    helm.sh/chart: eck-elasticsearch-0.11.0
  name: elasticsearch
  namespace: eck-npr-svc-01
  resourceVersion: "xxx"
  uid: xxx
spec:
  auth:
    roles:
    - secretName: eck-access-config
  http:
    service:
      metadata: {}
      spec: {}
    tls:
      certificate: {}
  image: docker.elastic.co/elasticsearch/elasticsearch:8.14.1
  monitoring:
    logs: {}
    metrics: {}
  nodeSets:
  - config:
      node.store.allow_mmap: false
    count: 3
    name: default
    podTemplate:
      metadata:
        creationTimestamp: null
      spec:
        affinity:
          nodeAffinity:
            requiredDuringSchedulingIgnoredDuringExecution:
              nodeSelectorTerms:
              - matchExpressions:
                - key: agentpool
                  operator: In
                  values:
                  - eck0001
        containers:
        - name: elasticsearch
          resources:
            limits:
              cpu: "2"
              memory: 8Gi
        tolerations:
        - effect: NoExecute
          key: DeployEck
          operator: Exists
    volumeClaimTemplates:
    - metadata:
        name: elasticsearch-data
      spec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 1Ti
        selector:
          matchLabels:
            app: eck-npr
        storageClassName: azurefile-csi
  transport:
    service:
      metadata: {}
      spec: {}
    tls:
      certificate: {}
      certificateAuthorities: {}
  updateStrategy:
    changeBudget: {}
  version: 8.14.1

```

Were are using statically created Persistant Volumes that look like this:

```auto
apiVersion: v1
kind: PersistentVolume
metadata:
  annotations:
    pv.kubernetes.io/bound-by-controller: "yes"
    pv.kubernetes.io/provisioned-by: file.csi.azure.com
  creationTimestamp: "2024-06-19T13:57:08Z"
  finalizers:
  - kubernetes.io/pv-protection
  labels:
    app: eck-npr
  name: eck-npr-fs-pv-01
  resourceVersion: "xxx"
  uid: xxx
spec:
  accessModes:
  - ReadWriteOnce
  capacity:
    storage: 1Ti
  claimRef:
    apiVersion: v1
    kind: PersistentVolumeClaim
    name: elasticsearch-data-elasticsearch-es-default-2
    namespace: eck-npr-svc-01
    resourceVersion: "xxx"
    uid: xxx
  csi:
    driver: file.csi.azure.com
    nodeStageSecretRef:
      name: eck-npr-sa-access-key
      namespace: eck-npr-svc-01
    volumeAttributes:
      resourceGroup: xxx
      shareName: xxx
    volumeHandle: xxx
  mountOptions:
  - file_mode=0777
  - nobrl
  - mfsymlinks
  - gid=0
  - uid=0
  - dir_mode=0777
  - nosharesock
  - cache=strict
  persistentVolumeReclaimPolicy: Retain
  storageClassName: azurefile-csi
  volumeMode: Filesystem

```
