# Cluster stats "Disk Available"

**URL:** <https://discuss.elastic.co/t/cluster-stats-disk-available/313604>\
**Category:** Elasticsearch\
**Created:** [September 3, 2022, 2:48pm UTC](https://discuss.elastic.co/t/cluster-stats-disk-available/313604 "2022-09-03T14:48:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [September 3, 2022, 2:48pm UTC](https://discuss.elastic.co/t/cluster-stats-disk-available/313604/1 "2022-09-03T14:48:00Z")

</div>

Dear,

Does any one have an idea on how /\_cluster/stats computes total disk for the whole cluster ? any specific filter behind the scene on `node.roles` ?

Bellow is the result of cluster stats API, it show disk space less than the real space disk on all nodes of the cluster.

The sum of total disk from node stats is larger that cluster stats result

![image](https://us1.discourse-cdn.com/elastic/original/3X/c/1/c10a38d08e9a1155111fb9cbd4184f449185c434.png)  
 ![image (1)](https://us1.discourse-cdn.com/elastic/original/3X/d/b/db585421b960d109ac0f69a468e940fb5b0c1eb8.png)

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [September 3, 2022, 3:59pm UTC](https://discuss.elastic.co/t/cluster-stats-disk-available/313604/2 "2022-09-03T15:59:13Z")

</div>

What is the difference?

Converting the value in bytes to TB matches the information.

example in python:

```auto
Python 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> total_in_bytes = 40673342521344
>>> available_in_bytes = 38623244267520
>>> total_tb = total_in_bytes / 1024 / 1024 / 1024 / 1024
>>> available_tb = available_in_bytes / 1024 / 1024 / 1024 / 1024
>>> 
>>> print(total_tb)
36.99218952655792
>>> print(available_tb)
35.12763602659106
>>> 

```

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [September 3, 2022, 4:16pm UTC](https://discuss.elastic.co/t/cluster-stats-disk-available/313604/3 "2022-09-03T16:16:35Z")

</div>

This is the result of `GET _cat/allocation?v`  
I have a total of 140TB of disk dispatched on all nodes

| disk.indices | disk.used | disk.avail | disk.total | disk.percent | host | ip | node |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 362.3kb | 419.1gb | 7.7tb | 8.1tb | 5 | hot | ip | es\_node01 |
| 347.7kb | 116.4gb | 2.1tb | 2.2tb | 5 | hot | ip | es\_node02 |
| 496.4kb | 745gb | 13.7tb | 14.4tb | 5 | hot | ip | es\_node03 |
| 5.7mb | 745gb | 13.7tb | 14.4tb | 5 | hot | ip | es\_node04 |
| 22.3kb | 97.8gb | 1.7tb | 1.8tb | 5 | hot | ip | es\_node05 |
| 1.9mb | 745gb | 13.7tb | 14.4tb | 5 | hot | ip | es\_node06 |
| 40.7mb | 419.1gb | 7.7tb | 8.1tb | 5 | hot | ip | es\_node07 |
| 19.2kb | 423.7gb | 7.7tb | 8.2tb | 5 | hot | ip | es\_node08 |
| 81.9kb | 116.4gb | 2.1tb | 2.2tb | 5 | hot | ip | es\_node09 |
| 2.7mb | 116.4gb | 2.1tb | 2.2tb | 5 | hot | ip | es\_node10 |
| 40.7mb | 419.1gb | 7.7tb | 8.1tb | 5 | hot | ip | es\_node11 |
| 225b | 745gb | 13.7tb | 14.4tb | 5 | hot | ip | es\_node12 |
| 27.9kb | 745gb | 13.7tb | 14.4tb | 5 | hot | ip | es\_node13 |
| 81.9kb | 745gb | 13.7tb | 14.4tb | 5 | hot | ip | es\_node14 |
| 27.9kb | 116.4gb | 2.1tb | 2.2tb | 5 | hot | ip | es\_node15 |
| 351.8kb | 419.1gb | 7.7tb | 8.1tb | 5 | hot | ip | es\_node16 |
| 329.7kb | 419.1gb | 7.7tb | 8.1tb | 5 | hot | ip | es\_node17 |
| 4.8mb | 102.4gb | 1.8tb | 1.9tb | 5 | hot | ip | es\_node18 |

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [September 3, 2022, 4:56pm UTC](https://discuss.elastic.co/t/cluster-stats-disk-available/313604/4 "2022-09-03T16:56:13Z")

</div>

Related discussion here  
[https://discuss.elastic.co/t/cluster-not-reporting-actual-available-space](https://discuss.elastic.co/t/cluster-not-reporting-actual-available-space)

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [September 4, 2022, 9:54am UTC](https://discuss.elastic.co/t/cluster-stats-disk-available/313604/5 "2022-09-04T09:54:33Z")

</div>

> [@ylasri](#):
>
> Related discussion here

Does that answer it?

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [September 4, 2022, 10:10am UTC](https://discuss.elastic.co/t/cluster-stats-disk-available/313604/6 "2022-09-04T10:10:38Z")

</div>

Yes @DavidTurner  
I can see also ongoing ticket on github for this problem

---

<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:** [October 2, 2022, 10:11am UTC](https://discuss.elastic.co/t/cluster-stats-disk-available/313604/7 "2022-10-02T10:11:30Z")

</div>

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