# Issue while creating snapshot error - path.repo setting is empty

**URL:** <https://discuss.elastic.co/t/issue-while-creating-snapshot-error-path-repo-setting-is-empty/179064>\
**Category:** Elasticsearch\
**Created:** [April 30, 2019, 10:29am UTC](https://discuss.elastic.co/t/issue-while-creating-snapshot-error-path-repo-setting-is-empty/179064 "2019-04-30T10:29:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ronnie16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ronnie16/32/66399_2.png) [@Ronnie16](https://discuss.elastic.co/u/Ronnie16)\
**Post date:** [April 30, 2019, 10:29am UTC](https://discuss.elastic.co/t/issue-while-creating-snapshot-error-path-repo-setting-is-empty/179064/1 "2019-04-30T10:29:28Z")

</div>

I have a secure elasticsearch cluster running in kubernetes environment. I want to enable snapshots for the same. I added path.repo in config and also mounted persistent volume to be used as a repo.

path.repo: ["/mnt/snapshots"]

Using below volumeMount:

- name: elasticsearch-snapshots  
mountPath: /mnt/snapshots

Volumes:-

- name: elasticsearch-snapshots  
persistentVolumeClaim:  
claimName: snapshots

pvc.yaml:  
apiVersion: v1  
kind: PersistentVolumeClaim  
metadata:  
name: snapshots  
spec:  
accessModes:

- ReadWriteOnce  
resources:  
requests:  
storage: 10Gi

I used the api command to create repo but got below error -:

curl -XPUT --cacert crt.pem -u elastic:password "[https://es-coordinating.gbi-gotu.svc.lb.usrno1.mine.io:9200/\_snapshot/snapshot-repo](https://es-coordinating.gbi-gotu.svc.lb.usrno1.mine.io:9200/_snapshot/snapshot-repo)" -H 'Content-Type: application/json' -d'

{

"type": "fs",

"settings": {

"location": "/mnt/snapshots"

}

}

'

```
{"error":{"root_cause":[{"type":"repository_exception","reason":"[snapshot-repo] location [/mnt/snapshots] doesn't match any of the locations specified by path.repo because this setting is empty"}],"type":"repository_exception","reason":"[snapshot-repo] failed to create repository","caused_by":{"type":"repository_exception","reason":"[snapshot-repo] location [/mnt/snapshots] doesn't match any of the locations specified by path.repo because this setting is empty"}},"status":500}

```

I have added the same path.repo field to other nodes also but do I need to mount the same PVC to other nodes as well ?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 1, 2019, 6:19am UTC](https://discuss.elastic.co/t/issue-while-creating-snapshot-error-path-repo-setting-is-empty/179064/2 "2019-05-01T06:19:37Z")

</div>

All nodes in the cluster must have exactly the same setting and the path it points to must be a shared file system that all nodes can access.

---

<div class="post-metadata">

**Author:** ![Ronnie16](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ronnie16/32/66399_2.png) [@Ronnie16](https://discuss.elastic.co/u/Ronnie16)\
**Post date:** [May 1, 2019, 7:30am UTC](https://discuss.elastic.co/t/issue-while-creating-snapshot-error-path-repo-setting-is-empty/179064/3 "2019-05-01T07:30:18Z")

</div>

Thanks for the response. This has more to do with the kubernetes side issue as I'm unable to create a PVC with ReadWriteMany so as to share it among different pods.  
Do you know anything supported out of the box in kubernetes for this ?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 29, 2019, 7:30am UTC](https://discuss.elastic.co/t/issue-while-creating-snapshot-error-path-repo-setting-is-empty/179064/4 "2019-05-29T07:30:23Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
