# When will trash update?

**URL:** <https://forum.storj.io/t/when-will-trash-update/26107>\
**Category:** troubleshooting\
**Tags:** trash\
**Created:** [May 6, 2024, 6:25pm UTC](https://forum.storj.io/t/when-will-trash-update/26107 "2024-05-06T18:25:16Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![flwstern](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/flwstern/32/7821_2.png) [@flwstern](https://forum.storj.io/u/flwstern)\
**Post date:** [May 6, 2024, 6:25pm UTC](https://forum.storj.io/t/when-will-trash-update/26107/1 "2024-05-06T18:25:17Z")

</div>

My trash on many of my dashboard wont decrease even when alot of trash has been deleted.

 ![image](https://storj-s3.bcdn.literatehosting.net/original/3X/d/f/dff01b75622137b7107671b133b26c62da9f9b9c.png)

![image](https://storj-s3.bcdn.literatehosting.net/original/3X/2/5/25d9c0a5ad10251afc073252a01c5620bc9cf044.png)

Which results that i dont get any incoming data cause the nodes thinks its full.

 ![image](https://storj-s3.bcdn.literatehosting.net/original/3X/4/0/40a6ddc7e2fcc6f48fdcd0d7139e3e0cd0323c55.png)

 ![image](https://storj-s3.bcdn.literatehosting.net/original/3X/b/3/b3e51dfcff2967d3b72b2b45e328f7a290d7b9fa.png)

Its been over 120TB trash for over 3 weeks now.

---

<div class="post-metadata">

**Author:** ![pasatmalo](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/pasatmalo/32/1127_2.png) [@pasatmalo](https://forum.storj.io/u/pasatmalo)\
**Post date:** [May 6, 2024, 6:39pm UTC](https://forum.storj.io/t/when-will-trash-update/26107/2 "2024-05-06T18:39:02Z")

</div>

Are you getting any errors in the logs?

If I dont remember incorrectly, the used space file walker should also check for files in trash, therefore running it should force update the DBs.

---

<div class="post-metadata">

**Author:** ![Ambifacient](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/ambifacient/32/7815_2.png) [@Ambifacient](https://forum.storj.io/u/Ambifacient)\
**Post date:** [May 6, 2024, 6:43pm UTC](https://forum.storj.io/t/when-will-trash-update/26107/3 "2024-05-06T18:43:50Z")

</div>

Since the introduction of the lazy `trash-cleanup-filewalker`, it appears that it no longer updates the trash usage in the database after emptying trash.

Your options to obtain the true trash value are:

1. Run the `used-space-filewalker`
2. Manually obtain the trash usage in bytes and update the database. For example, assuming you have `sqlite3` installed:

```auto
DATABASE_PATH=/your/path/to/directory/that/contains/storj/dbs
TRASH_PATH=/your/path/to/storj/node/trash/data
NODE_DOCKER_NAME=storagenode

TRASH_USED_BYTES=$(du -sb "$TRASH_PATH" | cut -f1)
sqlite3 "$DATABASE_PATH"/piece_spaced_used.db "PRAGMA journal_mode=WAL; UPDATE piece_space_used SET total = $TRASH_USED_BYTES WHERE satellite_id = 'trashtotal';"
docker container restart $NODE_DOCKER_NAME

```

Either way, to maintain the truth of this trash value, you will need to disable the lazy filewalker or wait for the lazy `trash-cleanup-filewalker` to be fixed.

---

<div class="post-metadata">

**Author:** ![flwstern](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/flwstern/32/7821_2.png) [@flwstern](https://forum.storj.io/u/flwstern)\
**Post date:** [May 6, 2024, 6:44pm UTC](https://forum.storj.io/t/when-will-trash-update/26107/4 "2024-05-06T18:44:52Z")

</div>

Well the trash has been deleted as the used data in the example above. is 7 TB and i have 7.7TB used according to the OS and 8,14TB free. So i do not have 9TB trash it should remove that from the numbers in the dashboard cause that is not correct.

---

<div class="post-metadata">

**Author:** ![flwstern](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/flwstern/32/7821_2.png) [@flwstern](https://forum.storj.io/u/flwstern)\
**Post date:** [May 6, 2024, 6:47pm UTC](https://forum.storj.io/t/when-will-trash-update/26107/5 "2024-05-06T18:47:24Z")

</div>

> [@Ambifacient](#):
>
> Either way, to maintain the truth of this trash value, you will need to disable the lazy filewalker or wait for the lazy `trash-cleanup-filewalker` to be fixed.

gahh… so much issues all the time…

---

<div class="post-metadata">

**Author:** ![flwstern](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/flwstern/32/7821_2.png) [@flwstern](https://forum.storj.io/u/flwstern)\
**Post date:** [May 6, 2024, 6:52pm UTC](https://forum.storj.io/t/when-will-trash-update/26107/6 "2024-05-06T18:52:44Z")

</div>

When will you fix this issue storj?

---

<div class="post-metadata">

**Author:** ![snorkel](https://storj.bcdn.literatehosting.com/letter_avatar/snorkel/32/5_5575768a8748004e209b776fc1b2916d.png) [@snorkel](https://forum.storj.io/u/snorkel)\
**Post date:** [May 6, 2024, 7:11pm UTC](https://forum.storj.io/t/when-will-trash-update/26107/7 "2024-05-06T19:11:32Z")

</div>

Turn the lazzy walker off by setting false in config or docker run.  
Turn the start up piece scan on, by setting it to true.  
Restart the node. Let it finish the walk; it can take days.  
The values will be updated.

---

<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:** [May 7, 2024, 4:37am UTC](https://forum.storj.io/t/when-will-trash-update/26107/8 "2024-05-07T04:37:34Z")

</div>

I would notify the team, but the work likely will speed-up if you would like to help, could you please submit an issue on [Issues · storj/storj · GitHub](https://github.com/storj/storj/issues) or send a pull request? - we glad to accept any contribution from the Community!

---

<div class="post-metadata">

**Author:** ![jammerdan](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/jammerdan/32/1121_2.png) [@jammerdan](https://forum.storj.io/u/jammerdan)\
**Post date:** [May 7, 2024, 5:05am UTC](https://forum.storj.io/t/when-will-trash-update/26107/9 "2024-05-07T05:05:02Z")

</div>

> [@snorkel](#):
>
> Turn the lazzy walker off

Do we need that for a simple recalculation?  
Wouldn’t the used space file walker go over the trash as well?

---

<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:** [May 7, 2024, 6:14am UTC](https://forum.storj.io/t/when-will-trash-update/26107/10 "2024-05-07T06:14:12Z")

</div>

For recalculation the enabled scan on startup is enough, but to keep databases updated you seems need to turn off the lazy mode.

---

<div class="post-metadata">

**Author:** ![naxbc](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/naxbc/32/1125_2.png) [@naxbc](https://forum.storj.io/u/naxbc)\
**Post date:** [May 7, 2024, 7:22am UTC](https://forum.storj.io/t/when-will-trash-update/26107/11 "2024-05-07T07:22:19Z")

</div>

Even with lazyfilwwalker turned off it won’t work.  
Enable pieces scan on startup also not working.  
I’ve commented both and now I’m just leaving it to run.  
I have this issue for almost 2 months now.

---

<div class="post-metadata">

**Author:** ![jammerdan](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/jammerdan/32/1121_2.png) [@jammerdan](https://forum.storj.io/u/jammerdan)\
**Post date:** [May 7, 2024, 4:00pm UTC](https://forum.storj.io/t/when-will-trash-update/26107/12 "2024-05-07T16:00:34Z")

</div>

I can confirm. I restarted the nodes which had enabled scan on startup and all of them updated the trash space.  
So even the nodes that had reported as full are now receiving ingress again.

---

<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:** [May 10, 2024, 1:04pm UTC](https://forum.storj.io/t/when-will-trash-update/26107/13 "2024-05-10T13:04:16Z")

</div>

If you commented out both, then your node uses the lazy mode and the used-space-filewalker on start.

---

<div class="post-metadata">

**Author:** ![naxbc](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/naxbc/32/1125_2.png) [@naxbc](https://forum.storj.io/u/naxbc)\
**Post date:** [May 10, 2024, 1:41pm UTC](https://forum.storj.io/t/when-will-trash-update/26107/14 "2024-05-10T13:41:08Z")

</div>

This is my node’s config:

“storage2.piece-scan-on-startup: true”  
“# pieces.enable-lazy-filewalker: false”

What should I set in order to have this working?

---

<div class="post-metadata">

**Author:** ![donald.m.motsinger](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/donald.m.motsinger/32/71_2.png) [@donald.m.motsinger](https://forum.storj.io/u/donald.m.motsinger)\
**Post date:** [May 10, 2024, 1:45pm UTC](https://forum.storj.io/t/when-will-trash-update/26107/15 "2024-05-10T13:45:46Z")

</div>

Just let the scan finish

> [@How do I empty the trash?](https://forum.storj.io/t/how-do-i-empty-the-trash/15485/68):
>
> I think the startup scan is a different process which doesn’t write to the logs. When I ran it on 2 nodes recently it scanned about 100GB per hour. Just watch the iops of the hard disk. While it’s 100% the scan is still running.

---

<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:** [May 10, 2024, 4:13pm UTC](https://forum.storj.io/t/when-will-trash-update/26107/16 "2024-05-10T16:13:46Z")

</div>

To fix the current discrepancy the enabled used-space-filewalker on start is enough (you may comment out the option `storage2.piece-scan-on-startup: true`, because this is a default value).

But to keep the trash usage updated on your dashboard you may temporary disable the lazy mode, i.e. uncomment the option `# pieces.enable-lazy-filewalker: false`,  
So the resulted settings change may look like:

```auto
# storage2.piece-scan-on-startup: true
pieces.enable-lazy-filewalker: false

```

save the config and restart the node.

When the used-space-filewalker will finish its work for all satellites, it will update databases with collected values and your dashboard should show less discrepancy. The disabled lazy mode will allow all remained filewalkers run with a normal priority and updates databases in time, so discrepancy should become negligible.  
In any case you will need to wait until all of them will finish their work for all trusted satellites:

> [@Filewalker status](https://forum.storj.io/t/filewalker-status/25325/5):
>
> Logs should be at least info level Used space filewalker Task: Calculates disk usage by scanning all pieces and updates the local node databases afterwards with these values docker logs storagenode -f 2\>&1 | grep "used-space-filewalker" | grep -E "started|finished" GC filewalker Task: Based on a [Bloom filter](https://forum.storj.io/t/how-bloom-filters-work/12104/2) it marks pieces as expired for removal by the retain process docker logs storagenode -f 2\>&1 | grep "gc-filewalker" | grep -E "started|finished" Trash-cleanup filewalker Task: Deletes p…
