# Used space gets reset after restart

**URL:** <https://forum.storj.io/t/used-space-gets-reset-after-restart/28408>\
**Category:** troubleshooting\
**Tags:** filewalker, database\
**Created:** [October 31, 2024, 10:38am UTC](https://forum.storj.io/t/used-space-gets-reset-after-restart/28408 "2024-10-31T10:38:41Z")\
**Posts on this page:** 1\
**Showing post:** 61

<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:** [November 23, 2024, 7:53am UTC](https://forum.storj.io/t/used-space-gets-reset-after-restart/28408/61 "2024-11-23T07:53:30Z")

</div>

Ok. I was able to reproduce in `storj-up`.

> <https://github.com/storj/storj/issues/7269>
>
> \<!--
> Please make sure that we do not have any duplicates already open. 
> You ca…n ensure this by searching the issue list for this repository. 
> If there is a duplicate, please close your issue and add a comment to the 
> existing issue instead.
> 
> For more information about reporting issues, see
> https://github.com/storj/storj/blob/main/docs/storagenode/CONTRIBUTING.md
> 
> \---------------------------------------------------
> GENERAL SUPPORT INFORMATION
> \---------------------------------------------------
> 
> The GitHub issue tracker is for bug reports and feature requests.
> General support can be found at the following locations:
> 
> \- Storj Community Forum - https://forum.storj.io
> \- File a ticket at https://support.storj.io/
> 
> \---------------------------------------------------
> BUG REPORT INFORMATION
> \---------------------------------------------------
> \--\>
> 
> \*\*Description\*\*
> After restart of storagenode, the \`used-space-filewalker\` doesn't update the usage since v1.115.4
> 
> See https://forum.storj.io/t/used-space-gets-reset-after-restart/28408?u=alexey
> 
> \*\*Steps to reproduce the issue:\*\*
> 
> 
> 
> 1. used \`storj-up\` environment
> 2. upload several 128MiB files with TTL +2m (or any)
> 3. run \`docker compose exec storagenode1 storagenode dashboard --address=:30002\` to see a dashboard
> 4. Wait for the TTL collector chore to complete (better several hours)
> 5. Check the dashboard - it should show some non-zero value (perhaps the TTL collector doesn't update the usage again or not in all databases - we now have an additional database \`used\_space\_per\_prefix.db\`)
> 6. upload several 128MiB files with TTL
> 7. Make sure, that the usage value on the dashboard has changed
> 8. Restart the node:
> \`\`\`
> docker compose exec storagenode1 rm /var/lib/storj/.local/share/storj/storagenode/storage/trash/.trash-uses-day-dirs-indicator && docker compose restart storagenode1
> \`\`\`
> 9. The value would be the same, which was before uploading additional 128MiB files.
> 10. after the used-space-filewalker has completed the scan, the value will not change.
> 
> \*\*Describe the results you expected:\*\*
> The \`used-space-filewalker\` should calculate the used space correctly
> 
> \*\*Describe the results you received:\*\*
> The \`used-space-filewalker\` was finish in seconds, the used space will be invalid.
> 
> \*\*Possible Fix\*\*
> 
> Remove the \`used\_space\_per\_prefix.db\` database and restart the node, the used space value will be updated correctly.
> 
> \*\*Your environment\*\*
> 
> \- Operating system and version: any
> \- Additional environment details (Raspberry PI, Docker, VMWare, etc.): any

Just need to keep it running for more than 24h.

---

_[View the full topic](https://forum.storj.io/t/used-space-gets-reset-after-restart/28408)._
