# "Disk quota exceeded" Exception when mounting elasticsearch volume on EFS

**URL:** <https://discuss.elastic.co/t/disk-quota-exceeded-exception-when-mounting-elasticsearch-volume-on-efs/246021>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [August 23, 2020, 1:29pm UTC](https://discuss.elastic.co/t/disk-quota-exceeded-exception-when-mounting-elasticsearch-volume-on-efs/246021 "2020-08-23T13:29:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahmed75](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@ahmed75](https://discuss.elastic.co/u/ahmed75)\
**Post date:** [August 23, 2020, 1:29pm UTC](https://discuss.elastic.co/t/disk-quota-exceeded-exception-when-mounting-elasticsearch-volume-on-efs/246021/1 "2020-08-23T13:29:49Z")

</div>

I'm running EFK Stack on my EKS cluster and i'm mounting elasticsearch volume on EFS so my data won't be lost when the container is restarted, however after few months my elasticsearch pod raised this exception " **Disk quota exceeded**" i think its related to storage space.  
Here is elasticsearch deployment :

```
apiVersion: apps/v1
kind: Deployment
metadata:
  name: elasticsearch
  namespace: tools
spec:
  replicas: 1
  selector:
    matchLabels:
      app: elasticsearch
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: elasticsearch
    spec:
      containers:
      - env:
        - name: discovery.type
          valueFrom:
            configMapKeyRef:
              key: discovery.type
              name: tools-config
        image: docker.elastic.co/elasticsearch/elasticsearch:7.6.0
        imagePullPolicy: IfNotPresent
        livenessProbe:
          failureThreshold: 3
          initialDelaySeconds: 20
          periodSeconds: 5
          successThreshold: 1
          tcpSocket:
            port: transport
          timeoutSeconds: 1
        name: elasticsearch
        ports:
        - containerPort: 9200
          name: http
          protocol: TCP
        - containerPort: 9300
          name: transport
          protocol: TCP
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: /_cluster/health
            port: http
            scheme: HTTP
          initialDelaySeconds: 20
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 5
        volumeMounts:
        - mountPath: /usr/share/elasticsearch/data
          name: elasticsearch-volume
      initContainers:
      - command:
        - sh
        - -c
        - chown -R 1000:1000 /usr/share/elasticsearch/data
        image: busybox
        imagePullPolicy: Always
        name: fix-permissions
        securityContext:
          privileged: true
        volumeMounts:
        - mountPath: /usr/share/elasticsearch/data
          name: elasticsearch-volume
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
      volumes:
      - name: elasticsearch-volume
        persistentVolumeClaim:
          claimName: elasticsearch-storage-pvc
```

---

<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:** [August 23, 2020, 1:48pm UTC](https://discuss.elastic.co/t/disk-quota-exceeded-exception-when-mounting-elasticsearch-volume-on-efs/246021/2 "2020-08-23T13:48:46Z")

</div>

According to [this page in the docs](https://www.elastic.co/guide/en/elasticsearch/plugins/7.9/cloud-aws-best-practices.html) EFS is not recommended for use as storage with Elasticsearch.

---

<div class="post-metadata">

**Author:** ![ahmed75](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@ahmed75](https://discuss.elastic.co/u/ahmed75)\
**Post date:** [August 23, 2020, 1:55pm UTC](https://discuss.elastic.co/t/disk-quota-exceeded-exception-when-mounting-elasticsearch-volume-on-efs/246021/3 "2020-08-23T13:55:03Z")

</div>

> [@Christian\_Dahlqvist](#):
>
> ng to [this pa](https://www.elastic.co/guide/en/elasticsearch/plugins/7.9/cloud-aws-best-practices.html)

I don't have any other alternative is there any fix to this ?

---

<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:** [August 23, 2020, 2:03pm UTC](https://discuss.elastic.co/t/disk-quota-exceeded-exception-when-mounting-elasticsearch-volume-on-efs/246021/4 "2020-08-23T14:03:13Z")

</div>

Not that I know of as it is an issue with EFS. You [might be able to use EBS instead](https://aws.amazon.com/premiumsupport/knowledge-center/eks-persistent-storage/).

---

<div class="post-metadata">

**Author:** ![ahmed75](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@ahmed75](https://discuss.elastic.co/u/ahmed75)\
**Post date:** [August 23, 2020, 2:06pm UTC](https://discuss.elastic.co/t/disk-quota-exceeded-exception-when-mounting-elasticsearch-volume-on-efs/246021/5 "2020-08-23T14:06:20Z")

</div>

ok thanks

---

<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:** [September 20, 2020, 2:06pm UTC](https://discuss.elastic.co/t/disk-quota-exceeded-exception-when-mounting-elasticsearch-volume-on-efs/246021/6 "2020-09-20T14:06:22Z")

</div>

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