How long does trash stay before getting deleted?

I believe my trash has been the same for what seems like more than 7 days so does it stay for longer in any case? Can I check how long it’s been stored?

Hi @Eleos ,

Trash should remain for only 7 days.

If you are seeing trash for longer than 7 days, can you please provide some evidence for the team to review?

I’m not sure if it’s been there for more than 7 days or not, I may just be mistaken the timeframe. Is there a way to check how long it’s been there?

You can try to search the logs for collector

I ran this command and got the following along with the sat id and deleted piece id for each count item. The number changes randomly and keeps going forever though.

sudo docker logs storagenode | grep “collector”

Result:

collect {“process”: “storagenode”, “count”: 458}

For bash:

For Windows PowerShell:

1 Like

Using bash with modified command for /mnt location:

TOTAL 0 MB
count

Dashboard trash reports:

199.36MB

I provided a command to see do you have pieces older than 7 days.
If you just want to see how much it takes in total, you need to use an du -s --si /mnt/storj/storagenode/storage/trash command instead, where /mnt/storj/storagenode is a path to your data location.

The information on the dashboard is taken from the databases. So if your databases are ok (you may check that: https://support.storj.io/hc/en-us/articles/360029309111-How-to-fix-a-database-disk-image-is-malformed), then you probably have issues with filewalkers or the used-space-filewalker is disabled (it’s enabled by default). If you have errors related to any of filewalkers (search for walk|retain|trash and error|failed|ERROR), then I would suggest to enable a used-space-filewalker on startup and disable a lazy one:

Do not forget to save the config and restart the node.

Oh okay I see. The second command reports: 207M

1 Like