When I check the log for “trash” on more than one node, the last entry I get is from 24th resp. 25th.
Now I am wondering if something is wrong.
One node has accumulated more than 600GB trash. Yet the last time I see “emptying trash started” in the logs is from the 24th.
Isn’t this expected to run at least once a day?
That’s why I wondering if everything is running like I should.
I would expect to see a line like emptying trash started every day in in the logs for each satellite.
However when I grep for “trash”, the last log line that contains the word “trash” is dated 25th of February:
2024-02-25T17:18:40Z INFO retain Moved pieces to trash during retain {"process": "storagenode", "Deleted pieces": 1403480, "Failed to delete": 100, "Pieces failed to read": 0, "Pieces count": 13374633, "Satellite ID": "12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S", "Duration": "57h33m9.51829974s", "Retain Status": "enabled"}
And this "Duration": "57h33m9.51829974s does it mean that it was running 57 hours moving pieces around?
It seems emptying trash has resumed today.
The last lines before that were from 24th:
2024-02-24T04:05:52Z INFO pieces:trash emptying trash started {"process": "storagenode", "Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs"}
Now I have new lines for all satellites starting on 28th:
2024-02-28T10:51:16Z INFO pieces:trash emptying trash started {"process": "storagenode", "Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs"}
I can also confirm that after I have seen these lines I checked the trash amount and it was lower than before. So some emptying has been done.
But does that mean trash has not been emptied for 3 days? If so why is this?
My understanding would be that this is a chore that shall be running every day.
I have also checked if I may have files that are too old in the trash. It is my understanding that So I ran a check for files older than 7 days and was surprised that it gave me 246GB of files older than 7 days. Again my believe was, files older than 7 days should not exist in trash.
But it did not run 3 days in a row and I did not do any manual restarts during that.
I have been running the command with mtime +7. This should count everything older than 7 days right? That returned 246GB of data in trash, older than 7 days.
The find/du command always takes ages…
Now it has finished. I have been running it with mtime +8 setting and it returned 143GB.
So something does not work right with the trash or I fail to understand how it should work.
My understanding is that there should be no files older than 7 day in the trash which is obviously not the case here.
these are pieces older than 7 days. So, it should delete them in the next start of piece:trash.
Could you please search in your logs "Node " (please note the space after “Node”), it should show lines when node is started. I suspect that it has restarts between piece:trash runs in these 3 days.
Then it’s interesting. I do not know, what can prevent from running a hardcoded chore.
Maybe clocks skew? It’s checked only on start, but… this is just an internal scheduler.
I saw few times that “pieces are deleted from trash after 7 days”
Well, one of my nodes has over 900GB of trash at least 3 weeks now. Nothing gets deleted.
And as all SNOs saw in last few days trash size increased even more.
Image shows 0.91TB after restart, somehow that 1.3TB from before restart didn’t even saved into db. Following this road, I’ll have node with 0 free space and full of (unpaid) trash.
Any advices how to resolve this issue by not deleting entire trash folder?
You’re fortunate, because my situation is quite different: I’m dealing with approximately 30TB of data that hasn’t been paid for, and there’s zero data in the trash.