# CLI dashboard shows incorrect disk usage

**URL:** <https://forum.storj.io/t/cli-dashboard-shows-incorrect-disk-usage/26772>\
**Category:** troubleshooting\
**Tags:** docker\
**Created:** [June 23, 2024, 6:58am UTC](https://forum.storj.io/t/cli-dashboard-shows-incorrect-disk-usage/26772 "2024-06-23T06:58:16Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ninja](https://storj.bcdn.literatehosting.com/letter_avatar/ninja/32/5_5575768a8748004e209b776fc1b2916d.png) [@ninja](https://forum.storj.io/u/ninja)\
**Post date:** [June 23, 2024, 6:58am UTC](https://forum.storj.io/t/cli-dashboard-shows-incorrect-disk-usage/26772/1 "2024-06-23T06:58:17Z")

</div>

Hello, I have a node that I once assigned around 10.7TB of storage. The cli dashboard shows that 10.59TB is in use and the node has stopped accepting uploads, while `df -h` shows that only 6TB is in use. What could be wrong?

Update: The used-space filewalker finished successfully last week. But the problem persists.

---

<div class="post-metadata">

**Author:** ![nerdatwork](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/nerdatwork/32/1135_2.png) [@nerdatwork](https://forum.storj.io/u/nerdatwork)\
**Post date:** [June 23, 2024, 7:08am UTC](https://forum.storj.io/t/cli-dashboard-shows-incorrect-disk-usage/26772/2 "2024-06-23T07:08:13Z")

</div>

> [@Disk usage discrepancy?](https://forum.storj.io/t/disk-usage-discrepancy/24715):
>
> And yet my filesystem saids 14.49TB is being used. Why don’t the dashboard’s figures even agree, and why are they both under what’s actually used?

---

<div class="post-metadata">

**Author:** ![ninja](https://storj.bcdn.literatehosting.com/letter_avatar/ninja/32/5_5575768a8748004e209b776fc1b2916d.png) [@ninja](https://forum.storj.io/u/ninja)\
**Post date:** [June 23, 2024, 7:30am UTC](https://forum.storj.io/t/cli-dashboard-shows-incorrect-disk-usage/26772/3 "2024-06-23T07:30:06Z")

</div>

I’ve read that post. But what happens to my node is different. Because on my node the actual disk usage is much smaller than what the dashboard reports.

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [June 23, 2024, 7:36am UTC](https://forum.storj.io/t/cli-dashboard-shows-incorrect-disk-usage/26772/4 "2024-06-23T07:36:42Z")

</div>

This is exactly the same issue. Your databases are not updated with correct values.  
Please search for errors related to the databases in your logs, I would also recommend to check them:

> **[How to fix a "database disk image is malformed"](https://support.storj.io/hc/en-us/articles/360029309111-How-to-fix-a-database-disk-image-is-malformed)**
>
> Problem
> Sometimes a Storage Node Operator may encounter the "database disk image is malformed" error in their log. This could happen during unplanned shutdown or reboot. The error indicates that on...

Or do you mean that the CLI dashboard shows different values from the web dashboard?

---

<div class="post-metadata">

**Author:** ![ninja](https://storj.bcdn.literatehosting.com/letter_avatar/ninja/32/5_5575768a8748004e209b776fc1b2916d.png) [@ninja](https://forum.storj.io/u/ninja)\
**Post date:** [June 23, 2024, 7:39am UTC](https://forum.storj.io/t/cli-dashboard-shows-incorrect-disk-usage/26772/5 "2024-06-23T07:39:32Z")

</div>

Thank you. I will check it out.

---

<div class="post-metadata">

**Author:** ![ninja](https://storj.bcdn.literatehosting.com/letter_avatar/ninja/32/5_5575768a8748004e209b776fc1b2916d.png) [@ninja](https://forum.storj.io/u/ninja)\
**Post date:** [June 23, 2024, 8:39am UTC](https://forum.storj.io/t/cli-dashboard-shows-incorrect-disk-usage/26772/6 "2024-06-23T08:39:16Z")

</div>

I’ve checked and integrity of all databases are ok. What else can I try?

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [June 23, 2024, 9:14am UTC](https://forum.storj.io/t/cli-dashboard-shows-incorrect-disk-usage/26772/7 "2024-06-23T09:14:11Z")

</div>

The next step is to search for any errors related to databases in your logs.  
And by the way, it would be good if you also check that used-space-filewalkers are finished too for each trusted satellite.  
You need also to remove the data from the untrusted ones:

> [@How To Forget Untrusted Satellites](https://forum.storj.io/t/how-to-forget-untrusted-satellites/23821):
>
> Following the [announcement](https://forum.storj.io/t/announcement-storj-to-shut-down-europe-north-1-and-us2/22956) to decommission Europe-north-1 and US2 satellites, manually deleting the remaining data of these satellites from the node can be a tedious task as it requires finding the blobs folder name for each satellite, so we wanted to improve the storagenode CLI to semi-automate cleaning up a satellite data after it is marked as untrusted. The storagenode CLI (versions from 1.88.0) provides a forget-satellite subcommand to remove satellites from the trust cache and clean up the…

---

<div class="post-metadata">

**Author:** ![ninja](https://storj.bcdn.literatehosting.com/letter_avatar/ninja/32/5_5575768a8748004e209b776fc1b2916d.png) [@ninja](https://forum.storj.io/u/ninja)\
**Post date:** [June 23, 2024, 9:41am UTC](https://forum.storj.io/t/cli-dashboard-shows-incorrect-disk-usage/26772/8 "2024-06-23T09:41:26Z")

</div>

I’ve searched the logs for `[Dd]atabase` and `db[.]` but didn’t find any error message. Also, I can see only 4 dirs under `storage/blobs` dir. So data for the 2 decommissioned satellites has been deleted.

---

<div class="post-metadata">

**Author:** ![ninja](https://storj.bcdn.literatehosting.com/letter_avatar/ninja/32/5_5575768a8748004e209b776fc1b2916d.png) [@ninja](https://forum.storj.io/u/ninja)\
**Post date:** [June 23, 2024, 9:49am UTC](https://forum.storj.io/t/cli-dashboard-shows-incorrect-disk-usage/26772/9 "2024-06-23T09:49:32Z")

</div>

Also, last week, I saw those used-space-filewalkers finished messages for each satellite in the log.

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [June 23, 2024, 11:23am UTC](https://forum.storj.io/t/cli-dashboard-shows-incorrect-disk-usage/26772/10 "2024-06-23T11:23:50Z")

</div>

Then your used space on the dashboard should pretty match the numbers from the OS.  
However, you need to request the usage with a `--si` option, not `-h` to have the same measure units as a dashboard.  
I.e.

```auto
df --si -T

```

and/or

```auto
du --si -d 1 /mnt/storj/storagenode/storage

```

---

<div class="post-metadata">

**Author:** ![ninja](https://storj.bcdn.literatehosting.com/letter_avatar/ninja/32/5_5575768a8748004e209b776fc1b2916d.png) [@ninja](https://forum.storj.io/u/ninja)\
**Post date:** [June 25, 2024, 3:08am UTC](https://forum.storj.io/t/cli-dashboard-shows-incorrect-disk-usage/26772/11 "2024-06-25T03:08:50Z")

</div>

But `df --si` shows 7.0TB, which is still far from 10.59TB on cli dashboard.

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [June 25, 2024, 6:11am UTC](https://forum.storj.io/t/cli-dashboard-shows-incorrect-disk-usage/26772/12 "2024-06-25T06:11:46Z")

</div>

Could you please show the result of the

```auto
df --si -T

```

and the result of the

```auto
docker exec -it storagenode ./dashboard.sh

```

---

<div class="post-metadata">

**Author:** ![ninja](https://storj.bcdn.literatehosting.com/letter_avatar/ninja/32/5_5575768a8748004e209b776fc1b2916d.png) [@ninja](https://forum.storj.io/u/ninja)\
**Post date:** [June 25, 2024, 11:52pm UTC](https://forum.storj.io/t/cli-dashboard-shows-incorrect-disk-usage/26772/13 "2024-06-25T23:52:55Z")

</div>

Here’s the output of the two commands:

 ![IMG_0382](https://storj-s3.bcdn.literatehosting.net/original/3X/9/5/95b48d56aa885078e3676081d4eba9502d629473.jpeg)  
 ![IMG_0380](https://storj-s3.bcdn.literatehosting.net/original/3X/a/5/a59829876b884cb9573fec85f058881acb7120f0.jpeg)

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [June 26, 2024, 7:54am UTC](https://forum.storj.io/t/cli-dashboard-shows-incorrect-disk-usage/26772/14 "2024-06-26T07:54:07Z")

</div>

And how much do you have as an allocation?

For now it clearly look like a problem either with a used-space-filewalker failed during the way or problems with databases.  
I would recommend to check your logs for errors related to a filewalker and databases.  
If you disabled a scan on startup (it’s enabled by default), please enable it back and restart the node. If you have errors with databases (e.g. “database is locked” or “malformed”), please consider to fix them if they are corrupted and/or move them to another disk/SSD if they are locked.

---

<div class="post-metadata">

**Author:** ![ninja](https://storj.bcdn.literatehosting.com/letter_avatar/ninja/32/5_5575768a8748004e209b776fc1b2916d.png) [@ninja](https://forum.storj.io/u/ninja)\
**Post date:** [June 27, 2024, 9:25am UTC](https://forum.storj.io/t/cli-dashboard-shows-incorrect-disk-usage/26772/15 "2024-06-27T09:25:32Z")

</div>

It’s used to be set to 10.7TB. But now I’m migrating the node to another drive. So I lowered it to 7TB.

used-space-filewalker finished successfully 1-2 weeks ago. But I will re-run it after the migration finishes.

---

<div class="post-metadata">

**Author:** ![ninja](https://storj.bcdn.literatehosting.com/letter_avatar/ninja/32/5_5575768a8748004e209b776fc1b2916d.png) [@ninja](https://forum.storj.io/u/ninja)\
**Post date:** [June 27, 2024, 9:28am UTC](https://forum.storj.io/t/cli-dashboard-shows-incorrect-disk-usage/26772/16 "2024-06-27T09:28:10Z")

</div>

Is there any tool to rebuild the database? For example, from the blobs/ or pull the data from satellites.

---

<div class="post-metadata">

**Author:** ![nerdatwork](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/nerdatwork/32/1135_2.png) [@nerdatwork](https://forum.storj.io/u/nerdatwork)\
**Post date:** [June 27, 2024, 11:10am UTC](https://forum.storj.io/t/cli-dashboard-shows-incorrect-disk-usage/26772/17 "2024-06-27T11:10:49Z")

</div>

> [@ninja](#):
>
> Is there any tool to rebuild the database?

Depends on the situation. There is a method to fix corrupted DB and another method to recreate them fresh. Did you find your databse to be corrupt ?

---

<div class="post-metadata">

**Author:** ![ninja](https://storj.bcdn.literatehosting.com/letter_avatar/ninja/32/5_5575768a8748004e209b776fc1b2916d.png) [@ninja](https://forum.storj.io/u/ninja)\
**Post date:** [June 28, 2024, 3:11am UTC](https://forum.storj.io/t/cli-dashboard-shows-incorrect-disk-usage/26772/18 "2024-06-28T03:11:06Z")

</div>

I followed [this guide](https://support.storj.io/hc/en-us/articles/360029309111-How-to-fix-a-database-disk-image-is-malformed) but found no corrupted database.

---

<div class="post-metadata">

**Author:** ![ninja](https://storj.bcdn.literatehosting.com/letter_avatar/ninja/32/5_5575768a8748004e209b776fc1b2916d.png) [@ninja](https://forum.storj.io/u/ninja)\
**Post date:** [June 28, 2024, 3:11am UTC](https://forum.storj.io/t/cli-dashboard-shows-incorrect-disk-usage/26772/19 "2024-06-28T03:11:58Z")

</div>

I found a relevant post here: [Disk usage discrepancy? - #787 by Vadim](https://forum.storj.io/t/disk-usage-discrepancy/24715/787)

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [June 28, 2024, 4:41am UTC](https://forum.storj.io/t/cli-dashboard-shows-incorrect-disk-usage/26772/20 "2024-06-28T04:41:02Z")

</div>

Then you do not need to re-create these databases, you may just allow the filewalker to fix the discrepancy.  
If you wouldn’t have any errors related to a filewalker and/or the database - it should update the usage. Please note, you need to have all filewalkers successfully finished for all trusted satellites.

Since you did change the allocation to 7TB, it’s expected to see a 10.44TB used and -3.44TB Available (i.e. it’s an overusage now).  
However the difference between usage on the disk and the usage on the dashboard perhaps related to the wrongly updated usage for the trash (the 1.104.5 version has this bug), but it can be fixed by a filewalker as well.
